Taro: 引用 vant-weapp

Created on 24 Aug 2018  ·  3Comments  ·  Source: NervJS/taro

引入了vant-weapp的组件库,由于组件库使用的单位都是小写px,所以经taro编译后变成了rpx,导致界面元素非常小。。有没有在不修改组件库的情况下解决该问题。。另:不清楚vant-weapp的设计稿尺寸

Most helpful comment

搞定了,加上
weapp: {
module: {
postcss: {
pxtransform: {
selectorBlackList: [
/^.van-.*?$/
]
}
}
}
}

All 3 comments

@ruixiu https://nervjs.github.io/taro/size.html#%E9%85%8D%E7%BD%AE 可以按这里来关掉转换

搞定了,加上
weapp: {
module: {
postcss: {
pxtransform: {
selectorBlackList: [
/^.van-.*?$/
]
}
}
}
}

非常棒👍

Was this page helpful?
0 / 5 - 0 ratings