最近开始用antd-mobile,我发现直接使用的话,组件都是非常巨大,和给的样例严重不符。
比如我看了tabbar的源代码,默认高度竟然是100px。
lib/tab-bar/style/index.less 127:
height: @tab-bar-height;//@tab-bar-height实际上是100px
其他的一些也都是偏大。
如:
另外我只是npm相关内容配好webpack和bablerc之后直接复制粘贴样例。
请问这是哪里的问题,有朋友了解么
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
antd 有自己的一套高清屏幕兼容方案,你需要正确设置 viewport。
参见:antd mobile 0.8 以上版本「高清」方案设置
加入
<meta name="viewport" >
并正确设置其属性值