A taro plugin to improve vant-weapp experience in taro.
npm install taro-plugin-vant-weapp一个 taro 插件,用于改善 vant-weapp 在 taro 中的使用体验。
- 设置 vant-weapp 组件的属性默认值
- 标记 vant-weapp 中不可递归自身的组件
``bash`
$ npm i taro-plugin-vant-weapp -D
`js`
// Taro 项目配置
module.exports = {
// ...
plugins: [
'taro-plugin-vant-weapp',
// or
['taro-plugin-vant-weapp', {
// 配置
}]
]
}
| 参数 | 类型 | 描述 |
| ------------ | ------------------------------------- | ---------------------- |
| components | Record | 修改、新增组件的属性 |Record
| nestElements | | 组件模版的循环次数 |string[]` | 组件是否可以渲染子元素 |
| voidElements |