[Doc] default slot name

This commit is contained in:
陈嘉涵 2019-04-30 17:32:00 +08:00
parent 2bb01b4a63
commit cd0720954c
65 changed files with 97 additions and 98 deletions

View File

@ -94,7 +94,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| select | 选中选项时触发,禁用或加载状态下不会触发 | item: 选项对应的对象, index: 选择对应的索引 |
| cancel | 取消按钮点击时触发 | - |

View File

@ -92,7 +92,7 @@ export default {
| Name | Description |
|------|------|
| - | Custom content below postal |
| default | Custom content below postal |
### Methods

View File

@ -75,7 +75,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| save | 点击保存按钮时触发 | content表单内容 |
| focus | 输入框聚焦时触发 | key: 聚焦的输入框对应的 key |
@ -90,7 +90,7 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 在邮政编码下方插入内容 |
| default | 在邮政编码下方插入内容 |
### 方法

View File

@ -95,7 +95,7 @@ export default {
### Slot
| 名称 | 说明 |
| Name | Description |
|------|------|
| - | Custom content after list |
| default | Custom content after list |
| top | Custom content before list |

View File

@ -78,7 +78,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 | 版本 |
| 事件名 | 说明 | 回调参数 | 版本 |
|------|------|------|------|
| add | 点击新增按钮时触发 | - | - |
| edit | 点击编辑按钮时触发 | item: 地址对象index: 索引 | - |
@ -101,5 +101,5 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 在列表下方插入内容 |
| default | 在列表下方插入内容 |
| top | 在顶部插入内容 |

View File

@ -97,7 +97,7 @@ Vue.use(Button);
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击按钮,且按钮状态不为加载或禁用时触发 | event: Event |
| touchstart | 原生 touchstart 事件 | event: TouchEvent |

View File

@ -66,7 +66,7 @@ Use slot to custom content.
### Slot
| name | Description |
| Name | Description |
|------|------|
| title | Custom title |
| desc | Custom description |

View File

@ -60,7 +60,7 @@ Vue.use(Card);
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |

View File

@ -128,9 +128,9 @@ Vue.use(Cell).use(CellGroup);
### Cell Slot
| name | Description |
| Name | Description |
|------|------|
| - | Default slot |
| default | Default slot |
| icon | Custom icon |
| title | Custom title |
| label | Custom label |

View File

@ -126,7 +126,7 @@ Vue.use(Cell).use(CellGroup);
### Cell Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击单元格时触发 | - |
@ -134,7 +134,7 @@ Vue.use(Cell).use(CellGroup);
| 名称 | 说明 |
|------|------|
| - | 自定义`value`显示内容 |
| default | 自定义`value`显示内容 |
| title | 自定义标题显示内容 |
| label | 自定义标题下方描述显示内容 |
| icon | 自定义左侧图标 |

View File

@ -171,7 +171,7 @@ export default {
| Name | Description | slot-scope |
|------|------|------|
| - | Custom label | - |
| default | Custom label | - |
| icon | Custom icon | checked: whether to be checked |
### Checkbox Methods

View File

@ -159,22 +159,22 @@ export default {
### Checkbox Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
| click | 点击复选框时触发 | event: Event |
### CheckboxGroup Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
### Checkbox 插槽
### Checkbox Slots
| 名称 | 说明 | slot-scope |
|------|------|------|
| - | 自定义文本 | - |
| default | 自定义文本 | - |
| icon | 自定义图标 | checked: 是否为选中状态 |
### Checkbox 方法

View File

@ -70,6 +70,6 @@ export default {
### Cell Slot
| name | Description |
| Name | Description |
|------|------|
| - | custom text content |
| default | custom text content |

View File

@ -73,4 +73,4 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 自定义文字内容 |
| default | 自定义文字内容 |

View File

@ -104,9 +104,9 @@ export default {
### CollapseItem Slot
| name | Description |
| Name | Description |
|------|------|
| - | Content |
| default | Content |
| value | Custom value |
| icon | Custom icon |
| title | Custom title |

View File

@ -93,7 +93,7 @@ export default {
### Collapse Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换面板时触发 | activeNames: `string | array` |
@ -118,7 +118,7 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 面板内容 |
| default | 面板内容 |
| value | 自定义显示内容 |
| icon | 自定义`icon` |
| title | 自定义`title` |

View File

@ -141,7 +141,7 @@ export default {
### ContactCard Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
@ -155,7 +155,7 @@ export default {
### ContactList Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| add | 点击新增按钮时触发 | - |
| edit | 点击编辑按钮时触发 | item: 当前联系人对象index: 索引 |
@ -173,7 +173,7 @@ export default {
### ContactEdit Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| save | 点击保存按钮时触发 | content表单内容 |
| delete | 点击删除按钮时触发 | content表单内容 |

View File

@ -98,7 +98,7 @@ export default {
### CouponList Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 优惠券切换回调 | index, 选中优惠券的索引 |
| exchange | 兑换优惠券回调 | code, 兑换码 |

View File

@ -131,13 +131,13 @@ export default {
### Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当值变化时触发的事件 | picker 实例 |
| confirm | 点击完成按钮时触发的事件 | 当前 value |
| cancel | 点击取消按钮时触发的事件 | - |
### change事件
### change 事件
`change`事件中,可以获取到`picker`实例,对`picker`进行相应的更新等操作:

View File

@ -157,7 +157,7 @@ Use ref to get field instance and call instance methods
### Slot
| name | Description |
| Name | Description |
|------|------|
| label | Custom label |
| left-icon | Custom left icon |

View File

@ -69,6 +69,6 @@ import 'vant/lib/icon/local.css';
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击图标时触发 | - |

View File

@ -123,7 +123,7 @@ export default {
### Slot
| name | Description |
| Name | Description |
|------|------|
| index | Custom index |

View File

@ -145,7 +145,6 @@ export default {
|------|------|
| index | 自定义页码内容 |
### onClose 回调参数
| 参数名 | 说明 | 类型 |

View File

@ -123,5 +123,5 @@ Use ref to get list instance and call instance methods
| Name | Description |
|------|------|
| - | List content |
| default | List content |
| loading | Custom loading tips |

View File

@ -114,7 +114,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| load | 滚动条与底部距离小于 offset 时触发 | - |
@ -130,5 +130,5 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 列表内容 |
| default | 列表内容 |
| loading | 自定义底部加载中提示 |

View File

@ -58,7 +58,7 @@ export default {
### Slot
| name | Description |
| Name | Description |
|------|------|
| title | Custom title |
| left | Custom left side content |

View File

@ -67,7 +67,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click-left | 点击左侧按钮时触发 | - |
| click-right | 点击右侧按钮时触发 | - |

View File

@ -71,6 +71,6 @@ Vue.use(NoticeBar);
| Name | Description |
|------|------|
| - | Notice text content |
| default | Notice text content |
| left-icon | Custom left icon |
| right-icon | Custom right icon |

View File

@ -70,7 +70,7 @@ Vue.use(NoticeBar);
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
| close | 关闭时触发 | - |

View File

@ -88,6 +88,6 @@ export default {
### Slot
| name | Description |
| Name | Description |
|------|------|
| title-left | Custom title left content |

View File

@ -77,7 +77,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| input | 点击按键时触发 | key: 按键内容 |
| delete | 点击删除键时触发 | - |

View File

@ -68,6 +68,6 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 页码改变时触发 | - |

View File

@ -40,8 +40,8 @@ Vue.use(Panel);
### Slot
| name | Description |
| Name | Description |
|------|------|
| - | Default slot |
| default | Default slot |
| header | Custom header |
| footer | Custom footer |

View File

@ -44,6 +44,6 @@ Vue.use(Panel);
| 名称 | 说明 |
|------|------|
| - | 自定义内容 |
| default | 自定义内容 |
| header | 自定义 header |
| footer | 自定义 footer |

View File

@ -72,6 +72,6 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| focus | 输入框聚焦时触发 | - |

View File

@ -160,7 +160,7 @@ Picker events will pass different parameters according to the columns are single
### Slot
| name | Description |
| Name | Description |
|------|------|
| title | Custom title |

View File

@ -162,7 +162,7 @@ export default {
Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
| cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |

View File

@ -52,7 +52,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| open | 打开弹出层时触发 | - |
| opened | 打开弹出层且动画结束后触发 | - |

View File

@ -63,9 +63,9 @@ export default {
### Slot
| name | Description |
| Name | Description |
|------|------|
| - | Default slot |
| default | Default slot |
| normal | Content of head when at normal status |
| pulling | Content of head when at pulling |
| loosing | Content of head when at loosing |

View File

@ -56,7 +56,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| refresh | 下拉刷新时触发 | - |
@ -64,7 +64,7 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 自定义内容 |
| default | 自定义内容 |
| normal | 非下拉状态时顶部内容 |
| pulling | 下拉过程中顶部内容 |
| loosing | 释放过程中顶部内容 |

View File

@ -122,5 +122,5 @@ export default {
| Name | Description | slot-scope |
|------|------|------|
| - | Custom label | - |
| default | Custom label | - |
| icon | Custom icon | checked: whether to be checked |

View File

@ -112,19 +112,19 @@ export default {
### Radio Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击单选框时触发 | event: Event |
### RadioGroup Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前选中项的 name |
### Radio 插槽
### Radio Slots
| 名称 | 说明 | slot-scope |
|------|------|------|
| - | 自定义文本 | - |
| default | 自定义文本 | - |
| icon | 自定义图标 | checked: 是否为选中状态 |

View File

@ -104,6 +104,6 @@ export default {
### Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当前分值变化时触发的事件 | 当前分值 |

View File

@ -83,7 +83,7 @@ Search support all native events of input tagsuch as `focus`、`blur`、`keyp
### Slot
| name | Description |
| Name | Description |
|------|------|
| action | Custom right button, displayed when `showAction` is true |
| left-icon | Custom left icon |

View File

@ -67,7 +67,7 @@ Search 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pl
Search 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress`
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| cancel | 取消搜索 | - |
| search | 确定搜索 | - |

View File

@ -48,7 +48,7 @@ export default {
### Sidebar Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换当前导航项时触发 | key: 当前导航项的索引 |
@ -62,6 +62,6 @@ export default {
### SidebarItem Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | key: 当前导航项的索引 |

View File

@ -123,7 +123,7 @@ Vue.use(Sku);
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| add-cart | 点击添加购物车回调 | skuData: Object |
| buy-clicked | 点击购买回调 | skuData: Object |

View File

@ -99,7 +99,7 @@ Slider 垂直展示时,高度为 100% 父元素高度
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 进度值改变后触发 | value: 当前进度 |

View File

@ -97,7 +97,7 @@ export default {
### Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
| overlimit | 点击不可用的按钮时触发 | - |

View File

@ -85,6 +85,6 @@ Use slot to add custom contents.
| Name | Description |
|------|------|
| - | Custom left content |
| default | Custom left content |
| top | Custom top content |
| tip | Custom tips |

View File

@ -80,7 +80,7 @@ Vue.use(SubmitBar);
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| submit | 按钮点击事件回调 | - |
@ -88,6 +88,6 @@ Vue.use(SubmitBar);
| 名称 | 说明 |
|------|------|
| - | 自定义订单栏左侧内容 |
| default | 自定义订单栏左侧内容 |
| top | 自定义订单栏上方内容 |
| tip | 提示文案中的额外操作和说明 |

View File

@ -67,9 +67,9 @@ export default {
### Slot
| name | Description |
| Name | Description |
|------|------|
| - | custom content |
| default | custom content |
| left | content of left scrollable area |
| right | content of right scrollabe area |

View File

@ -69,13 +69,13 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 自定义显示内容 |
| default | 自定义显示内容 |
| left | 左侧滑动内容 |
| right | 右侧滑动内容 |
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |

View File

@ -149,7 +149,7 @@ Use ref to get swipe instance and call instance methods
### Slot
| name | Description |
| Name | Description |
|------|------|
| - | Content |
| default | Content |
| indicator | Custom indicator |

View File

@ -135,13 +135,13 @@ export default {
### Swipe 事件
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 每一页轮播结束后触发 | index, 当前页的索引 |
### SwipeItem 事件
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |
@ -153,9 +153,9 @@ export default {
|------|------|------|------|
| swipeTo | index: 目标位置的索引 | void | 滚动到目标位置 |
### 插槽
### Slot
| 名称 | 说明 |
|------|------|
| - | 轮播内容 |
| default | 轮播内容 |
| indicator | 自定义指示器 |

View File

@ -67,6 +67,6 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 开关状态切换回调 | checked: 是否选中开关 |

View File

@ -107,6 +107,6 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 开关状态切换回调 | checked: 是否选中开关 |

View File

@ -176,14 +176,14 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
### Tabs Slot
| name | Description |
| Name | Description |
|------|------|
| nav-left | Custom nav left content |
| nav-right | Custom nav right content |
### Tab Slot
| name | Description |
| Name | Description |
|------|------|
| default | Content of tab |
| title | Custom tab title |

View File

@ -194,7 +194,7 @@ export default {
### Tabs Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击标签时触发 | index标签索引title标题 |
| change | 当前激活的标签改变时触发 | index标签索引title标题 |

View File

@ -90,7 +90,7 @@ export default {
### Tabbar Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| change | 切换标签时触发 | active: 当前选中标签 |

View File

@ -78,9 +78,9 @@ Vue.use(Tag);
### Slot
| name | Description |
| Name | Description |
|------|------|
| - | Default slot |
| default | Default slot |
### Event

View File

@ -87,10 +87,10 @@ Vue.use(Tag);
| 名称 | 说明 |
|------|------|
| - | 自定义 Tag 显示内容 |
| default | 自定义 Tag 显示内容 |
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| click | 点击时触发 | - |

View File

@ -56,7 +56,7 @@ export default {
#### 事件
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| navclick | 左侧导航点击时,触发的事件 | index被点击的导航的索引 |
| itemclick | 右侧选择项被点击时,会触发的事件 | data: 该点击项的数据 |

View File

@ -79,7 +79,7 @@ You can set native properties such as `accpet`、`multiple` on Uploader, and the
| Name | Description |
|------|------|
| - | Custom icon |
| default | Custom icon |
### Parematers of before-read、after-read

View File

@ -69,7 +69,7 @@ export default {
### Event
| 事件名 | 说明 | 参数 |
| 事件名 | 说明 | 回调参数 |
|------|------|------|
| oversize | 文件大小超过限制时触发 | 同 after-read |
@ -77,7 +77,7 @@ export default {
| 名称 | 说明 |
|------|------|
| - | 自定义 uploader 内容 |
| default | 自定义 uploader 内容 |
### before-read、after-read 回调参数