An open API service indexing awesome lists of open source software.

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 中的使用体验。

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[]` | 组件是否可以渲染子元素 |