https://github.com/hyperlife1119/taro-plugin-vant-weapp
一个 taro 插件,用于改善 vant-weapp 在 taro 中的使用体验。
https://github.com/hyperlife1119/taro-plugin-vant-weapp
taro vant-weapp wechat
Last synced: about 1 year ago
JSON representation
一个 taro 插件,用于改善 vant-weapp 在 taro 中的使用体验。
- Host: GitHub
- URL: https://github.com/hyperlife1119/taro-plugin-vant-weapp
- Owner: HyperLife1119
- License: mit
- Created: 2022-04-01T16:55:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-13T10:08:24.000Z (over 1 year ago)
- Last Synced: 2025-04-10T09:41:29.553Z (about 1 year ago)
- Topics: taro, vant-weapp, wechat
- Language: TypeScript
- Homepage:
- Size: 382 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# taro-plugin-vant-weapp
一个 taro 插件,用于改善 vant-weapp 在 taro 中的使用体验。
## 功能
- 设置 vant-weapp 组件的属性默认值
- 标记 vant-weapp 中不可递归自身的组件
## 安装
```bash
$ npm i taro-plugin-vant-weapp -D
```
## 用法
### 1. 装配插件
```js
// Taro 项目配置
module.exports = {
// ...
plugins: [
'taro-plugin-vant-weapp',
// or
['taro-plugin-vant-weapp', {
// 配置
}]
]
}
```
### 2. 插件配置
| 参数 | 类型 | 描述 |
| ------------ | ------------------------------------- | ---------------------- |
| components | `Record>` | 修改、新增组件的属性 |
| nestElements | `Record` | 组件模版的循环次数 |
| voidElements | `string[]` | 组件是否可以渲染子元素 |