mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
24 lines
683 B
Markdown
24 lines
683 B
Markdown
## Capsule 胶囊
|
||
|
||
### 使用指南
|
||
在 index.json 中引入组件
|
||
```json
|
||
{
|
||
"usingComponents": {
|
||
"zan-capsule": "/packages/capsule/index"
|
||
}
|
||
}
|
||
```
|
||
|
||
### 代码演示
|
||
Panel 提供了一块白色的展示区域,使用方式如下
|
||
```html
|
||
<zan-capsule color="#38f" leftText="1折扣" rightText="限购一份" />
|
||
```
|
||
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|
||
|-----------|-----------|-----------|-------------|-------------|
|
||
| type | capsule的主体颜色 | String | ''(有danger这个主题色) | |
|
||
| color | 自定义capsule颜色 | String | - | |
|
||
| leftText | 左侧文案 | String | - | |
|
||
| rightText | 右侧文案 | String | - | |
|