[Doc] props title

This commit is contained in:
陈嘉涵 2019-05-03 09:37:24 +08:00
parent 921f8a88fb
commit e3cb465dc2
101 changed files with 279 additions and 283 deletions

View File

@ -74,7 +74,7 @@ ActionSheet will get another style if there is a `title` prop.
</van-action-sheet>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -87,7 +87,7 @@ ActionSheet will get another style if there is a `title` prop.
| get-container | Return the mount node for action-sheet | `String | () => HTMLElement` | - |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -79,7 +79,7 @@ export default {
</van-action-sheet>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -92,7 +92,7 @@ export default {
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | - | - |
| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -101,7 +101,7 @@ export default {
### actions
`API`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`
`Props`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`
| key | 说明 |
|------|------|

View File

@ -57,7 +57,7 @@ export default {
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -75,7 +75,7 @@ export default {
| tel-validator | The method to validate tel | `(tel: string) => boolean` | - |
| validator | Custom validator | `(key, value) => string` | - | 1.3.9 |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -88,7 +88,7 @@ export default {
| change-detail | Triggered when address detail changed | value: address detail |
| change-default | Triggered when switch default address | value: checked |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -55,7 +55,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -73,7 +73,7 @@ export default {
| tel-validator | 手机号格式校验函数 | `string => boolean` | - | - |
| validator | 自定义校验函数 | `(key, value) => string` | - | 1.3.9 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -86,7 +86,7 @@ export default {
| change-detail | 修改详细地址时触发 | value: 详细地址内容 |
| change-default | 切换是否使用默认地址时触发 | value: 是否选中 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -63,7 +63,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -74,7 +74,7 @@ export default {
| switchable | Whether to allow switch address | `Boolean` | `true` |
| add-button-text | Add button text | String | `Add new address` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -93,7 +93,7 @@ export default {
| tel | Phone | `String | Number` |
| address | Address | `String` |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -65,7 +65,7 @@ export default {
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -76,7 +76,7 @@ export default {
| disabled-text | 不可配送提示文案 | `String` | - | 1.3.0 |
| switchable | 是否允许切换地址 | `Boolean` | `true` | 1.3.8 |
### Event
### Events
| 事件名 | 说明 | 回调参数 | 版本 |
|------|------|------|------|
@ -97,7 +97,7 @@ export default {
| tel | 收货人手机号 | `String | Number` |
| address | 收货地址 | `String` |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -37,7 +37,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -51,7 +51,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
| confirm-button-text | Text of confirm button | `String` | `Confirm` |
| cancel-button-text | Text of cancel button | `String` | `Cancel` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -35,7 +35,7 @@ Vue.use(Area);
<van-area :area-list="areaList" :columns-num="2" title="标题" />
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -49,7 +49,7 @@ Vue.use(Area);
| confirm-button-text | 确认按钮文字 | `String` | `确认` | 1.5.3 |
| cancel-button-text | 取消按钮文字 | `String` | `取消` | 1.5.3 |
### Event
### Events
| 事件 | 说明 | 回调参数 |
| --- | --- | --- |

View File

@ -68,7 +68,7 @@ Vue.use(Button);
<van-button size="mini">Mini</van-button>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -90,7 +90,7 @@ Vue.use(Button);
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - |
| replace | If true, the navigation will not leave a history record | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -78,7 +78,7 @@ Vue.use(Button);
<van-button size="mini">迷你按钮</van-button>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -101,7 +101,7 @@ Vue.use(Button);
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | 1.6.5 |
| replace | 跳转时是否替换当前页面历史 | `Boolean` | `false` | 1.6.5 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -42,7 +42,7 @@ Use slot to custom content.
</van-card>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -58,13 +58,13 @@ Use slot to custom content.
| thumb-link | Thumb link URL | `String` | - |
| lazy-load | Whether to enable thumb lazy loadshould register [Lazyload](#/en-US/lazyload) component | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
| click | Triggered when clicked | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -42,7 +42,7 @@ Vue.use(Card);
</van-card>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -58,13 +58,13 @@ Vue.use(Card);
| thumb-link | 点击左侧图片后的跳转链接 | `String` | - | 1.3.4 |
| lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `Boolean` | `false` | 1.5.0 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -90,14 +90,14 @@ Vue.use(Cell).use(CellGroup);
</van-cell-group>
```
### CellGroup API
### CellGroup Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| title | Group title | `String` | - |
| border | Whether to show outer border | `Boolean` | `true` |
### Cell API
### Cell Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -120,13 +120,13 @@ Vue.use(Cell).use(CellGroup);
| value-class | Value className | `any` | - |
| label-class | Label className | `any` | - |
### Cell Event
### Cell Events
| Event | Description | Arguments |
|------|------|------|
| click | Triggered when click cell | - |
### Cell Slot
### Cell Slots
| Name | Description |
|------|------|

View File

@ -94,14 +94,14 @@ Vue.use(Cell).use(CellGroup);
</van-cell>
```
### CellGroup API
### CellGroup Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| title | 分组标题 | `String` | `-` | 1.6.9 |
| border | 是否显示外边框 | `Boolean` | `true` | - |
### Cell API
### Cell Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -124,13 +124,13 @@ Vue.use(Cell).use(CellGroup);
| value-class | 右侧内容额外类名 | `any` | - | 1.4.8 |
| label-class | 描述信息额外类名 | `any` | - | 1.4.8 |
### Cell Event
### Cell Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击单元格时触发 | - |
### Cell Slot
### Cell Slots
| 名称 | 说明 |
|------|------|

View File

@ -134,7 +134,7 @@ export default {
```
### Checkbox API
### Checkbox Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -146,7 +146,7 @@ export default {
| label-position | Can be set to `left` | `String` | `right` |
| checked-color | Checked color | `String` | `#1989fa` | - |
### CheckboxGroup API
### CheckboxGroup Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -154,20 +154,20 @@ export default {
| disabled | Disable all checkboxes | `Boolean` | `false` |
| max | Maximum amount of checked options | `Number` | `0`(Unlimited) |
### Checkbox Event
### Checkbox Events
| Event | Description | Parameters |
|------|------|------|
| change | Triggered when value changed | current value |
| click | Triggered when click checkbox | event: Event |
### CheckboxGroup Event
### CheckboxGroup Events
| Event | Description | Parameters |
|------|------|------|
| change | Triggered when value changed | current value |
### Checkbox Slot
### Checkbox Slots
| Name | Description | slot-scope |
|------|------|------|

View File

@ -137,7 +137,7 @@ export default {
}
```
### Checkbox API
### Checkbox Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -149,7 +149,7 @@ export default {
| label-position | 文本位置,可选值为 `left` | `String` | `right` | 1.1.11 |
| checked-color | 选中状态颜色 | `String` | `#1989fa` | 1.4.3 |
### CheckboxGroup API
### CheckboxGroup Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -157,20 +157,20 @@ export default {
| disabled | 是否禁用所有复选框 | `Boolean` | `false` | - |
| max | 设置最大可选数0 为无限制 | `Number` | `0` | - |
### Checkbox Event
### Checkbox Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
| click | 点击复选框时触发 | event: Event |
### CheckboxGroup Event
### CheckboxGroup Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
### Checkbox Slot
### Checkbox Slots
| 名称 | 说明 | slot-scope |
|------|------|------|

View File

@ -53,7 +53,7 @@ export default {
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -68,7 +68,7 @@ export default {
| stroke-width | Stroke width | `Number` | `40` |
| clockwise | Is clockwise | `Boolean` | `true` |
### Cell Slot
### Slots
| Name | Description |
|------|------|

View File

@ -54,7 +54,7 @@ export default {
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -69,7 +69,7 @@ export default {
| stroke-width | 进度条宽度 | `Number` | `40` | - |
| clockwise | 是否顺时针增加 | `Boolean` | `true` | - |
### Circle Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -85,9 +85,7 @@ Setting `type` to `flex` to enable flex layout
```
### API
#### Row
### Row Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -97,7 +95,7 @@ Setting `type` to `flex` to enable flex layout
| justify | Flex main axiscan be set to end/center/space-around/space-between | `String` | `start` |
| align | Flex cross axis, be set to center/bottom | `String` | `top` |
#### Col
### Col Props
| Attribute | Description | Type | Default |
|------|------|------|------|

View File

@ -86,9 +86,7 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
</van-row>
```
### API
#### Row
### Row Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -98,7 +96,7 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
| justify | Flex 主轴对齐方式,可选值为 `end` `center` <br> `space-around` `space-between` | `String` | `start` | 1.1.9 |
| align | Flex 交叉轴对齐方式,可选值为 `center` `bottom` | `String` | `top` | 1.1.9 |
#### Col
### Col Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|

View File

@ -71,7 +71,7 @@ export default {
### Collapse API
### Collapse Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -79,13 +79,13 @@ export default {
| accordion | Whether to be accordion mode | `Boolean` | `false` |
| border | Whether to show outer border | `Boolean` | `true` |
### Collapse Event
### Collapse Events
| Event | Description | Arguments |
|------|------|------|
| change | Triggered when switch panel | activeNames: `string | array` |
### CollapseItem API
### CollapseItem Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -102,7 +102,7 @@ export default {
| value-class | Value className | `String` | - |
| label-class | Label className | `String` | - |
### CollapseItem Slot
### CollapseItem Slots
| Name | Description |
|------|------|

View File

@ -83,7 +83,7 @@ export default {
### Collapse API
### Collapse Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -91,13 +91,13 @@ export default {
| accordion | 是否开启手风琴模式 | `Boolean` | `false` | - |
| border | 是否显示外边框 | `Boolean` | `true` | 1.6.9 |
### Collapse Event
### Collapse Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换面板时触发 | activeNames: `string | array` |
### CollapseItem API
### CollapseItem Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|------|
@ -114,7 +114,7 @@ export default {
| value-class | 右侧内容额外类名 | `String` | - | 1.4.8 |
| label-class | 描述信息额外类名 | `String` | - | 1.4.8 |
### CollapseItem Slot
### CollapseItem Slots
| 名称 | 说明 |
|------|------|

View File

@ -131,7 +131,7 @@ export default {
```
### ContactCard API
### ContactCard Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -140,13 +140,13 @@ export default {
| tel | Phone | `String` | - |
| add-text | Add card text | `String` | `Add contact info` |
### ContactCard Event
### ContactCard Events
| Event | Description | Arguments |
|------|------|------|
| click | Triggered when clicked | - |
### ContactList API
### ContactList Props
| Attribute | Description | Type | Default |
|------|------|------|------|------|
@ -154,7 +154,7 @@ export default {
| list | Contact list | `Array` | `[]` |
| add-text | Add button text | `String` | `Add new contact` |
### ContactList Event
### ContactList Events
| Event | Description | Arguments |
|------|------|------|
@ -162,7 +162,7 @@ export default {
| edit | Triggered when click edit button | item: contact objectindex |
| select | Triggered when select contact | item: contact object |
### ContactEdit API
### ContactEdit Props
| Attribute | Description | Type | Default |
|------|------|------|------|------|
| contact-info | Contact Info | `Object` | `[]` |
@ -171,7 +171,7 @@ export default {
| is-deleting | Whether to show delete button loading status | `Boolean` | `false` |
| tel-validator | The method to validate tel | `(tel: string) => boolean` | - |
### ContactEdit Event
### ContactEdit Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -130,7 +130,7 @@ export default {
/>
```
### ContactCard API
### ContactCard Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -139,13 +139,13 @@ export default {
| tel | 联系人手机号 | `String` | - | - |
| add-text | 添加时的文案提示 | `String` | `添加订单联系人信息` | - |
### ContactCard Event
### ContactCard Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
### ContactList API
### ContactList Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -153,7 +153,7 @@ export default {
| list | 联系人列表 | `Array` | `[]` | - |
| add-text | 新建按钮文案 | `String` | `新建联系人` | - |
### ContactList Event
### ContactList Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -161,7 +161,7 @@ export default {
| edit | 点击编辑按钮时触发 | item: 当前联系人对象index: 索引 |
| select | 切换选中的联系人时触发 | item: 当前联系人对象index: 索引 |
### ContactEdit API
### ContactEdit Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -171,7 +171,7 @@ export default {
| is-deleting | 是否显示删除按钮加载动画 | `Boolean` | `false` | - |
| tel-validator | 手机号格式校验函数 | `(tel: string) => boolean` | - | - |
### ContactEdit Event
### ContactEdit Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -65,7 +65,7 @@ export default {
}
```
### CouponCell API
### CouponCell Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -76,7 +76,7 @@ export default {
| border | Whether to show innner border | `Boolean` | `true` |
| currency | Currency symbol | `String` | `¥` |
### CouponList API
### CouponList Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -93,7 +93,7 @@ export default {
| input-placeholder | Input placeholder | `String` | `Coupon code` |
| currency | Currency symbol | `String` | `¥` |
### CouponList Event
### CouponList Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -66,7 +66,7 @@ export default {
```
### CouponCell API
### CouponCell Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -77,7 +77,7 @@ export default {
| border | 是否显示内边框 | `Boolean` | `true` | 1.3.10 |
| currency | 货币符号 | `String` | `¥` | - | 1.5.0 |
### CouponList API
### CouponList Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -96,7 +96,7 @@ export default {
| show-exchange-bar | 是否展示兑换栏 | `Boolean` | `true` | - |
| currency | 货币符号 | `String` | `¥` | - | 1.5.0 |
### CouponList Event
### CouponList Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -108,7 +108,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|------|
@ -127,7 +127,7 @@ export default {
| cancel-button-text | Text of cancel button | `String` | `Cancel` |
| visible-item-count | Count of visible columns | `Number` | `5` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -109,7 +109,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -129,7 +129,7 @@ export default {
| cancel-button-text | 取消按钮文字 | `String` | `取消` | 1.0.4 |
| visible-item-count | 可见的选项个数 | `Number` | `5` | 1.0.4 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -131,7 +131,7 @@ export default {
| beforeClose | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: function) => void | - |
| getContainer | Return the mount node for Dialog | `String | () => HTMLElement` | `body` |
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -151,7 +151,7 @@ export default {
| before-close | Callback before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: function) => void | - |
| get-container | Return the mount node for Dialog | `String | () => HTMLElement` | `body` |
### Event
### Events
| Event | Description | Parameters |
|------|------|------|

View File

@ -134,9 +134,9 @@ export default {
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | 1.1.6 |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | `body` | 1.6.11 |
### API
### Props
通过组件调用 `Dialog` 时,支持以下 API
通过组件调用 `Dialog` 时,支持以下 Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -156,7 +156,7 @@ export default {
| before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | 1.1.6 |
| get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | `body` | 1.1.6 |
### Event
### Events
通过组件调用 `Dialog` 时,支持以下事件:

View File

@ -109,7 +109,7 @@ Use button slot to insert button
</van-cell-group>
```
### API
### Props
Field support all native properties of input tagsuch as `maxlength``placeholder``autofocus`
@ -136,7 +136,7 @@ Field support all native properties of input tagsuch as `maxlength`、`placeh
| left-icon | Left side icon name | `String` | - |
| right-icon | Right side icon name | `String` | - |
### Event
### Events
Field support all native events of input tagsuch as `focus``blur``keypress`
@ -156,7 +156,7 @@ Use ref to get field instance and call instance methods
| focus | - | - | Trigger input focus |
| blur | - | - | Trigger input blur |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -116,7 +116,7 @@ Vue.use(Field);
</van-cell-group>
```
### API
### Props
Field 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``autofocus`
@ -143,7 +143,7 @@ Field 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pla
| left-icon | 输入框左侧图标名称或图片链接,可选值见 Icon 组件 | `String` | - | 1.5.7 |
| right-icon | 输入框尾部图标名称或图片链接,可选值见 Icon 组件 | `String` | - | 1.5.7 |
### Event
### Events
Field 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress`
@ -163,7 +163,7 @@ Field 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
| focus | - | - | 获取输入框焦点 |
| blur | - | - | 取消输入框焦点 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -85,7 +85,7 @@ Use `info` prop to show messages in upper right corner of icon
</van-goods-action>
```
### API
### Props
#### GoodsAction

View File

@ -84,7 +84,7 @@ export default {
</van-goods-action>
```
### API
### Props
#### GoodsAction

View File

@ -53,7 +53,7 @@ import 'vant/lib/icon/local.css';
<van-icon class-prefix="my-icon" name="extra" />
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -64,7 +64,7 @@ import 'vant/lib/icon/local.css';
| class-prefix | ClassName prefix | `String` | `van-icon` |
| tag | HTML Tag | `String` | `i` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -56,7 +56,7 @@ import 'vant/lib/icon/local.css';
<van-icon class-prefix="my-icon" name="extra" />
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -67,7 +67,7 @@ import 'vant/lib/icon/local.css';
| class-prefix | 类名前缀 | `String` | `van-icon` | 1.2.1 |
| tag | HTML 标签 | `String` | `i` | 1.6.10 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -114,14 +114,14 @@ export default {
| max-zoom | Max zoom | `Number` | `3` |
| min-zoom | Min zoom | `Number` | `1/3` |
### Event
### Events
| Event | Description | Parameters |
|------|------|------|
| close | Triggered when close | { index, url } |
| change | Triggered when current image change | index: index of current image |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -111,9 +111,9 @@ export default {
| maxZoom | 手势缩放时,最大缩放比例 | `Number` | `3` | 1.6.14 |
| minZoom | 手势缩放时,最小缩放比例 | `Number` | `1/3` | 1.6.14 |
### API
### Props
通过组件调用 `ImagePreview` 时,支持以下 API
通过组件调用 `ImagePreview` 时,支持以下 Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -128,7 +128,7 @@ export default {
| max-zoom | 手势缩放时,最大缩放比例 | `Number` | `3` | 1.6.14 |
| min-zoom | 手势缩放时,最小缩放比例 | `Number` | `1/3` | 1.6.14 |
### Event
### Events
通过组件调用 `ImagePreview` 时,支持以下事件:
@ -137,7 +137,7 @@ export default {
| close | 关闭时触发 | { index: 索引, url: 图片链接 } |
| change | 切换当前图片时触发 | index, 当前图片的索引 |
### Slot
### Slots
通过组件调用 `ImagePreview` 时,支持以下插槽:

View File

@ -91,7 +91,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -105,7 +105,7 @@ export default {
| immediate-check | Whether to check loading position immediately after mounted | `Boolean` | `true` |
| direction | Scroll directioncan be set to `up` | `String` | `down` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -119,7 +119,7 @@ Use ref to get list instance and call instance methods
|------|------|------|------|
| check | - | - | Check scroll position |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -98,7 +98,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -112,7 +112,7 @@ export default {
| immediate-check | 是否在初始化时立即执行滚动位置检查 | `Boolean` | `true` | - |
| direction | 滚动触发加载的方向,可选值为`up` | `String` | `down` | 1.6.16 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -126,7 +126,7 @@ export default {
|------|------|------|------|
| check | - | - | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -29,7 +29,7 @@ Vue.use(Loading);
<van-loading size="24px">Loading...</van-loading>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -38,7 +38,7 @@ Vue.use(Loading);
| size | Icon size | `String | Number` | `30px` |
| text-size | Text font size | `String | Number` | `14px` |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -29,7 +29,7 @@ Vue.use(Loading);
<van-loading size="24px">加载中...</van-loading>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -38,7 +38,7 @@ Vue.use(Loading);
| size | 加载图标大小 | `String | Number` | `30px` | - |
| text-size | 文字大小 | `String | Number` | `14px` | 2.0.0 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -44,7 +44,7 @@ export default {
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -56,7 +56,7 @@ export default {
| border | Whether to show bottom border | `Boolean` | `true` |
| z-index | Z-index | `Number` | `1` |
### Slot
### Slots
| Name | Description |
|------|------|
@ -64,7 +64,7 @@ export default {
| left | Custom left side content |
| right | Custom right side content |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -45,7 +45,7 @@ export default {
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -57,7 +57,7 @@ export default {
| border | 是否显示下边框 | `Boolean` | `true` | 1.4.7 |
| z-index | 元素 z-index | `Number` | `1` | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|
@ -65,7 +65,7 @@ export default {
| left | 自定义左侧区域内容 |
| right | 自定义右侧区域内容 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -46,7 +46,7 @@ Vue.use(NoticeBar);
</van-notice-bar>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -60,14 +60,14 @@ Vue.use(NoticeBar);
| color | Text color | `String` | `#f60` |
| background | Background color | `String` | `#fff7cc` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
| click | Triggered when click NoticeBar | - |
| close | Triggered when closed | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -54,7 +54,7 @@ Vue.use(NoticeBar);
</van-notice-bar>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -68,14 +68,14 @@ Vue.use(NoticeBar);
| color | 文本颜色 | `String` | `#f60` | - |
| background | 滚动条背景 | `String` | `#fff7cc` | - |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
| close | 关闭时触发 | - |
### Slot
### Slots
| 名称 | 内容 |
|------|------|

View File

@ -47,7 +47,7 @@ export default {
| Notify.setDefaultOptions | `options` | `void` | Set default options of all notifies |
| Notify.resetDefaultOptions | - | `void` | Reset default options of all notifies |
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|

View File

@ -59,7 +59,7 @@ export default {
/>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -75,7 +75,7 @@ export default {
| hide-on-click-outside | Whether to hide keyboard when click outside | `Boolean` | `true` |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -86,7 +86,7 @@ export default {
| show | Triggered when keyboard is fully displayed. | - |
| hide | Triggered when keyboard is fully hidden. | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -59,7 +59,7 @@ export default {
/>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -75,7 +75,7 @@ export default {
| hide-on-click-outside | 点击外部时是否收起键盘 | `Boolean` | `true` | - |
| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -86,7 +86,7 @@ export default {
| show | 键盘完全弹出时触发 | - |
| hide | 键盘完全收起时触发 | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -50,7 +50,7 @@ export default {
/>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -64,7 +64,7 @@ export default {
| show-page-size | Count of page size to show | `Number` | `5` |
| force-ellipses | Whether to show ellipses | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -52,7 +52,7 @@ export default {
/>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -66,7 +66,7 @@ export default {
| show-page-size | 显示的页码个数 | `Number` | `5` | - |
| force-ellipses | 显示省略号 | `Boolean` | `false` | - |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -29,7 +29,7 @@ Vue.use(Panel);
</van-panel>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -38,7 +38,7 @@ Vue.use(Panel);
| desc | Description | `String` | - |
| status | Status | `String` | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -31,7 +31,7 @@ Vue.use(Panel);
</van-panel>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -40,7 +40,7 @@ Vue.use(Panel);
| status | 状态 | `String` | - | - |
| icon | 标题左侧图标名称或图片链接,可选值见 Icon 组件 | `String` | - | 1.3.8 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -59,7 +59,7 @@ export default {
/>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -69,7 +69,7 @@ export default {
| info | Bottom info | `String` | - |
| error-info | Bottom error info | `String` | - |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -60,7 +60,7 @@ export default {
/>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -70,7 +70,7 @@ export default {
| info | 输入框下方文字提示 | `String` | - | - |
| error-info | 输入框下方错误提示 | `String` | - | - |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -134,7 +134,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
<van-picker :columns="columns" loading />
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -149,7 +149,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
| visible-item-count | Count of visible columns | `Number` | `5` |
| default-index | Default value index of single column picker | `Number` | `0` |
### Event
### Events
Picker events will pass different parameters according to the columns are single or multiple
| Event | Description | Arguments |
@ -158,7 +158,7 @@ Picker events will pass different parameters according to the columns are single
| cancel | Triggered when click cancel button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes |
| change | Triggered when current option changed | Single columnPicker instance, current valuecurrent index<br>Multiple columnsPicker instance, current valuescolumn index |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -143,7 +143,7 @@ export default {
<van-picker :columns="columns" loading />
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -158,7 +158,7 @@ export default {
| visible-item-count | 可见的选项个数 | `Number` | `5` | - |
| default-index | 单列选择器的默认选中项索引,<br>多列选择器请参考下方的 Columns 配置 | `Number` | `0` | 1.6.9 |
### Event
### Events
Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
@ -168,7 +168,7 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
| cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
| change | 选项改变时触发 | 单列Picker 实例,选中值,选中值对应的索引<br>多列Picker 实例,所有列选中值,当前列对应的索引 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -35,7 +35,7 @@ Use `position` prop to set popup display position
</van-popup>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -50,7 +50,7 @@ Use `position` prop to set popup display position
| lazy-render | Whether to lazy render util appeared | `Boolean` | `true` |
| get-container | Return the mount node for Popup | `String | () => HTMLElement` | - |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -35,7 +35,7 @@ export default {
</van-popup>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -50,7 +50,7 @@ export default {
| lock-scroll | 是否锁定背景滚动 | `Boolean` | `true` | 1.0.0 |
| lazy-render | 是否在显示弹层时才渲染节点 | `Boolean` | `true` | 1.1.5 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -48,7 +48,7 @@ Use `pivot-text` to custom textuse `color` to custom bar color
/>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|

View File

@ -50,7 +50,7 @@ Vue.use(Progress);
/>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|

View File

@ -39,7 +39,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -54,14 +54,14 @@ export default {
| disabled | Whether to disable | `Boolean` | `false` |
### Event
### Events
| Event | Description | Parameters |
|------|------|------|
| refresh | Triggered when pull refresh | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -40,7 +40,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -54,13 +54,13 @@ export default {
| head-height | 顶部内容高度 | `Number` | `50` | - |
| disabled | 是否禁用 | `Boolean` | `false` | 1.1.10 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| refresh | 下拉刷新时触发 | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -88,7 +88,7 @@ export default {
</van-radio-group>
```
### Radio API
### Radio Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -99,26 +99,26 @@ export default {
| label-position | Can be set to `left` | `String` | `right` |
| checked-color | Checked color | `String` | `#1989fa` | - |
### RadioGroup API
### RadioGroup Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | Name of checked radio | `any` | - |
| disabled | Diable all radios | `Boolean` | `false` |
### Radio Event
### Radio Events
| Event | Description | Parameters |
|------|------|------|
| click | Triggered when click radio | event: Event |
### RadioGroup Event
### RadioGroup Events
| Event | Description | Parameters |
|------|------|------|
| change | Triggered when value changed | current value |
### Radio Slot
### Radio Slots
| Name | Description | slot-scope |
|------|------|------|

View File

@ -92,7 +92,7 @@ export default {
</van-radio-group>
```
### Radio API
### Radio Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -103,26 +103,26 @@ export default {
| label-position | 文本位置,可选值为 `left` | `String` | `right` | 1.1.13 |
| checked-color | 选中状态颜色 | `String` | `#1989fa` | 1.4.5 |
### RadioGroup API
### RadioGroup Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| v-model | 当前选中项的标识符 | 任意类型 | - | - |
| disabled | 是否禁用所有单选框 | `Boolean` | `false` | - |
### Radio Event
### Radio Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击单选框时触发 | event: Event |
### RadioGroup Event
### RadioGroup Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前选中项的 name |
### Radio Slot
### Radio Slots
| 名称 | 说明 | slot-scope |
|------|------|------|

View File

@ -86,7 +86,7 @@ export default {
<van-rate v-model="value" readonly />
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -102,7 +102,7 @@ export default {
| disabled | Whether to disable rate | `Boolean` | `false` |
| disabled-color | Disabled color | `String` | `#bdbdbd` |
### Event
### Events
| Event | Description | Parameters |
|------|------|------|

View File

@ -86,7 +86,7 @@ export default {
<van-rate v-model="value" readonly />
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -102,7 +102,7 @@ export default {
| disabled | 是否禁用评分 | `Boolean` | `false` | - |
| disabled-color | 禁用时的颜色 | `String` | `#bdbdbd` | - |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -56,7 +56,7 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
</van-search>
```
### API
### Props
Search support all native properties of input tagsuch as `maxlength``placeholder``autofocus`
@ -71,7 +71,7 @@ Search support all native properties of input tagsuch as `maxlength`、`place
| error | Whether to show error info | `Boolean` | `false` |
| input-align | Input text align, can be set to `center` `right` | `String` | `left` |
### Event
### Events
Search support all native events of input tagsuch as `focus``blur``keypress`
@ -81,7 +81,7 @@ Search support all native events of input tagsuch as `focus`、`blur`、`keyp
| search | Triggered when confirm search | - |
| clear | Triggered when click clear icon | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -48,7 +48,7 @@ Tips: 在 `van-search` 外层增加 form 标签,并且 action 不为空,即
</van-search>
```
### API
### Props
Search 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``autofocus`
@ -63,7 +63,7 @@ Search 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pl
| error | 是否将输入内容标红 | `Boolean` | `false` | - |
| input-align | 输入框内容对齐方式,可选值为 `center` `right` | `String` | `left` | - |
### Event
### Events
Search 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress`
@ -73,7 +73,7 @@ Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`
| search | 确定搜索 | - |
| clear | 点击清除按钮后触发 | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -40,19 +40,19 @@ export default {
};
```
### Sidebar API
### Sidebar Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| active-key | Index of chosen item | `String | Number` | `0` |
### Sidebar Event
### Sidebar Events
| Event | Description | Arguments |
|------|------|------|
| change | Triggered when item changed | key: index of current item |
### SidebarItem API
### SidebarItem Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -60,7 +60,7 @@ export default {
| info | Info Message | `String | Number` | `''` |
| url | Link | `String` | - |
### SidebarItem Event
### SidebarItem Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -40,19 +40,19 @@ export default {
};
```
### Sidebar API
### Sidebar Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| active-key | 当前导航项的索引 | `String | Number` | `0` | - |
### Sidebar Event
### Sidebar Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换当前导航项时触发 | key: 当前导航项的索引 |
### SidebarItem API
### SidebarItem Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -60,7 +60,7 @@ export default {
| info | 提示消息 | `String | Number` | `''` | - |
| url | 跳转链接 | `String` | - | - |
### SidebarItem Event
### SidebarItem Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -47,7 +47,7 @@ export default {
}
};
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|

View File

@ -54,7 +54,7 @@ export default {
};
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|

View File

@ -96,7 +96,7 @@ Vue.use(Sku);
</van-sku>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -118,7 +118,7 @@ Vue.use(Sku);
| message-config | Message related config | `Object` | `{}` |
| get-container | Return the mount node for sku | `String | () => HTMLElement` | - |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -137,7 +137,7 @@ Use ref to get sku instance and call instance methods
|------|------|------|------|
| getSkuData | - | skuData | Get current skuData |
### Slot
### Slots
| Name | Description |
|------|------|
@ -270,7 +270,7 @@ messageConfig: {
}
```
#### Event Params Data Structure
#### Events Params Data Structure
```javascript
skuData: {

View File

@ -97,7 +97,7 @@ Vue.use(Sku);
</van-sku>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -121,7 +121,7 @@ Vue.use(Sku);
| initial-sku | 默认选中的sku具体参考高级用法 | `Object` | `{}` | - |
| show-soldout-sku | 是否展示售罄的sku如果展示则为置灰不可选状态不展示则直接隐藏 | `Boolean` | `true` | - |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
@ -140,7 +140,7 @@ Vue.use(Sku);
|------|------|------|------|
| getSkuData | - | skuData | 获取当前 skuData |
### Slot
### Slots
Sku 组件默认划分好了若干区块,这些区块都定义成了插槽,可以按需进行替换。区块顺序见下表:

View File

@ -82,7 +82,7 @@ export default {
</div>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|------|
@ -96,13 +96,13 @@ export default {
| inactive-color | Inactive color of bar | `String` | `#e5e5e5` |
| vertical | Whether to display vertical | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
| change | Triggered after value change | value: current rate |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -83,7 +83,7 @@ Slider 垂直展示时,高度为 100% 父元素高度
</div>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -97,13 +97,13 @@ Slider 垂直展示时,高度为 100% 父元素高度
| inactive-color | 进度条默认颜色 | `String` | `#e5e5e5` | 1.5.1 |
| vertical | 是否垂直展示 | `Boolean` | `false` | 1.6.13 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 进度值改变后触发 | value: 当前进度 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -78,7 +78,7 @@ export default {
/>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -92,7 +92,7 @@ export default {
| async-change | Whether to enable async change | `Boolean` | `false` | - |
| input-width | Input width | `String` | `30px` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -81,7 +81,7 @@ export default {
/>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -95,7 +95,7 @@ export default {
| async-change | 是否开启异步变更,开启后需要手动控制输入值 | `Boolean` | `false` | - |
| input-width | 输入框宽度,须指定单位 | `String` | `30px` | 1.6.13 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -64,7 +64,7 @@ export default {
</van-steps>
```
### Steps API
### Steps Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -75,7 +75,7 @@ export default {
| active-icon | Active icon name | `String` | `checked` |
| inactive-icon | Active icon name | `String` | - |
### Step Slot
### Step Slots
| Name | Description |
|------|------|

View File

@ -68,7 +68,7 @@ export default {
</van-steps>
```
### Steps API
### Steps Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -78,7 +78,7 @@ export default {
| active-icon | 激活状态底部图标,可选值见 Icon 组件 | `String` | `checked` | 1.6.9 |
| inactive-icon | 未激活状态底部图标,可选值见 Icon 组件 | `String` | - | 2.0.0 |
### Step Slot
### Step Slots
| 名称 | 说明 |
|------|------|

View File

@ -60,7 +60,7 @@ Use slot to add custom contents.
</van-submit-bar>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -75,13 +75,13 @@ Use slot to add custom contents.
| decimal-length | Number of digits to appear after the decimal point | `Number` | `2` |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
| submit | Triggerd when click submit button | - |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -63,7 +63,7 @@ Vue.use(SubmitBar);
</van-submit-bar>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -78,13 +78,13 @@ Vue.use(SubmitBar);
| decimal-length | 价格小数点后位数 | `Number` | `2` | 1.6.15 |
| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| submit | 按钮点击事件回调 | - |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -56,7 +56,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -65,7 +65,7 @@ export default {
| on-close | Callback function before close | `Function` | - |
| disabled | Whether to disabled swipe | `Boolean` | `false` |
### Slot
### Slots
| Name | Description |
|------|------|
@ -73,7 +73,7 @@ export default {
| left | content of left scrollable area |
| right | content of right scrollabe area |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -56,7 +56,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -65,7 +65,7 @@ export default {
| on-close | 关闭时的回调函数 | `Function` | - | - |
| disabled | 是否禁用滑动 | `Boolean` | `false` | 1.3.4 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|
@ -73,7 +73,7 @@ export default {
| left | 左侧滑动内容 |
| right | 右侧滑动内容 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -118,7 +118,7 @@ export default {
}
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -133,7 +133,7 @@ export default {
| width | Set Swiper Item Width | `Number` | `0` |
| height | Set Swiper Item Height | `Number` | `0` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
@ -147,7 +147,7 @@ Use ref to get swipe instance and call instance methods
|------|------|------|------|
| swipeTo | index: target index | void | Swipe to target index |
### Slot
### Slots
| Name | Description |
|------|------|

View File

@ -118,7 +118,7 @@ export default {
}
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -153,7 +153,7 @@ export default {
|------|------|------|------|
| swipeTo | index: 目标位置的索引 | void | 滚动到目标位置 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|

View File

@ -50,7 +50,7 @@ use `loading` property to keep component in loading state
</van-cell-group>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -66,7 +66,7 @@ use `loading` property to keep component in loading state
| active-value | Value when active | `any` | `true` |
| inactive-value | Value when inactive | `any` | `false` |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -49,7 +49,7 @@ export default {
</van-cell-group>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -65,7 +65,7 @@ export default {
| active-value | 打开时的值 | `any` | `true` | 1.5.6 |
| inactive-value | 关闭时的值 | `any` | `false` | 1.5.6 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -92,7 +92,7 @@ export default {
};
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -105,7 +105,7 @@ export default {
| active-value | Value when active | `any` | `true` |
| inactive-value | Value when inactive | `any` | `false` |
### Event
### Events
| Event | Description | Parameters |
|------|------|------|

View File

@ -92,7 +92,7 @@ export default {
};
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -105,7 +105,7 @@ export default {
| active-value | 打开时的值 | `any` | `true` | 1.5.6 |
| inactive-value | 关闭时的值 | `any` | `false` | 1.5.6 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -146,7 +146,7 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
</van-tabs>
```
### Tabs API
### Tabs Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -167,28 +167,28 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
| ellipsis | Whether to ellipsis too long title | `Boolean` | `true` |
| lazy-render | Whether to enable tab content lazy render | `Boolean` | `true` |
### Tab API
### Tab Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| title | Title | `String` | - |
| disabled | Whether to disable tab | `Boolean` | `false` |
### Tabs Slot
### Tabs Slots
| Name | Description |
|------|------|
| nav-left | Custom nav left content |
| nav-right | Custom nav right content |
### Tab Slot
### Tab Slots
| Name | Description |
|------|------|
| default | Content of tab |
| title | Custom tab title |
### Tabs Event
### Tabs Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -150,7 +150,7 @@ export default {
</van-tabs>
```
### Tabs API
### Tabs Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -171,28 +171,28 @@ export default {
| ellipsis | 是否省略过长的标题文字 | `Boolean` | `true` | 1.5.0 |
| lazy-render | 是否开启标签页内容延迟渲染 | `Boolean` | `true` | 1.6.6 |
### Tab API
### Tab Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| title | 标题 | `String` | - | - |
| disabled | 是否禁用标签 | `Boolean` | `false` | - |
### Tabs Slot
### Tabs Slots
| 名称 | 说明 |
|------|------|
| nav-left | 标题左侧内容 |
| nav-right | 标题右侧内容 |
### Tab Slot
### Tab Slots
| 名称 | 说明 |
|------|------|
| default | 标签页内容 |
| title | 自定义标签 |
### Tabs Event
### Tabs Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -63,7 +63,7 @@ export default {
}
```
### Tabbar API
### Tabbar Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -73,13 +73,13 @@ export default {
| active-color | Color of active tab item | `String` | `#1989fa` |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` |
### Tabbar Event
### Tabbar Events
| Event | Description | Arguments |
|------|------|------|
| change | Triggered when change active tab | active: index of current tab |
### TabbarItem API
### TabbarItem Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -90,7 +90,7 @@ export default {
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - |
| replace | If true, the navigation will not leave a history record | `Boolean` | `false` |
### TabbarItem Slot
### TabbarItem Slots
| Name | Description | slot-scope |
|------|------|------|

View File

@ -78,7 +78,7 @@ export default {
</van-tabbar>
```
### Tabbar API
### Tabbar Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -88,13 +88,13 @@ export default {
| active-color | 选中标签的颜色 | `String` | `#1989fa` | 1.5.1 |
| safe-area-inset-bottom | 是否开启 iPhone X 底部安全区适配,需要在 `viewport` meta 标签中设置 `viewport-fit=cover` | `Boolean` | `false` | 1.6.15 |
### Tabbar Event
### Tabbar Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换标签时触发 | active: 当前选中标签 |
### TabbarItem API
### TabbarItem Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -105,7 +105,7 @@ export default {
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
| replace | 跳转时是否替换当前页面历史 | `Boolean` | `false` | - |
### TabbarItem Slot
### TabbarItem Slots
| 名称 | 说明 | slot-scope |
|------|------|------|

View File

@ -63,7 +63,7 @@ Vue.use(Tag);
<van-tag size="large">Tag</van-tag>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -76,13 +76,13 @@ Vue.use(Tag);
| text-color | Text color | `String` | `white` |
### Slot
### Slots
| Name | Description |
|------|------|
| default | Default slot |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -71,7 +71,7 @@ Vue.use(Tag);
<van-tag size="large">标签</van-tag>
```
### API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
@ -83,13 +83,13 @@ Vue.use(Tag);
| mark | 是否为标记样式 | `Boolean` | `false` | - |
| text-color | 文本颜色,优先级高于`color`属性 | `String` | `white` | 1.5.0 |
### Slot
### Slots
| 名称 | 说明 |
|------|------|
| default | 自定义 Tag 显示内容 |
### Event
### Events
| 事件名 | 说明 | 回调参数 |
|------|------|------|

View File

@ -43,9 +43,9 @@ export default {
}
```
### API
### Props
#### API
#### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -54,7 +54,7 @@ export default {
| main-Active-index | The index of selected parent node | `Number` | `0` |
| active-id | Id of selected item | `String | Number` | `0` |
#### Event
#### Events
| Event | Description | Arguments |
|------|------|------|

View File

@ -43,7 +43,7 @@ export default {
}
```
### API
### Props
#### 传入参数

View File

@ -57,7 +57,7 @@ You can set native properties such as `accpet`、`multiple` on Uploader, and the
</van-uploader>
```
### API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
@ -69,13 +69,13 @@ You can set native properties such as `accpet`、`multiple` on Uploader, and the
| after-read | Hook after reading the file | `Function` | - |
| max-size | Max size of file | `Number` | - |
### Event
### Events
| Event | Description | Arguments |
|------|------|------|
| oversize | Triggered when file size over limit | Same as after-read |
### Slot
### Slots
| Name | Description |
|------|------|

Some files were not shown because too many files have changed in this diff Show More