[improvement] List: add loading slot (#1804)

This commit is contained in:
neverland 2018-09-14 15:02:59 +08:00 committed by GitHub
parent 44c8b2c492
commit 82b037a576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 8 deletions

View File

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

View File

@ -164,7 +164,7 @@ export default {
| 名称 | 说明 | slot-scope |
|-----------|-----------|-----------|
| default | 自定义文本 | - |
| - | 自定义文本 | - |
| icon | 自定义图标 | checked: 是否为选中状态 |
### Checkbox 方法

View File

@ -96,7 +96,7 @@ export default {
| name | Description |
|-----------|-----------|
| default | Content |
| - | Content |
| value | Custom value |
| icon | Custom icon |
| title | Custom title |

View File

@ -108,7 +108,7 @@ export default {
| 名称 | 说明 |
|-----------|-----------|
| default | 面板内容 |
| - | 面板内容 |
| value | 自定义显示内容 |
| icon | 自定义`icon` |
| title | 自定义`title` |

View File

@ -72,3 +72,10 @@ Use ref to get list instance and call instance methods
| Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------|
| check | - | - | Check scroll position |
### Slot
| Name | Description |
|-----------|-----------|
| - | List content |
| loading | Custom loading tips |

View File

@ -72,3 +72,10 @@ export default {
| 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------|
| check | - | - | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 |
### Slot
| 名称 | 说明 |
|-----------|-----------|
| - | 列表内容 |
| loading | 自定义底部加载中提示 |

View File

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

View File

@ -83,6 +83,6 @@ Vue.use(SubmitBar);
| 名称 | 说明 |
|-----------|-----------|
| default | 自定义订单栏左侧内容 |
| - | 自定义订单栏左侧内容 |
| top | 自定义订单栏上方内容 |
| tip | 提示文案中的额外操作和说明 |

View File

@ -7,7 +7,7 @@
<van-info :info="info" />
</div>
<div :class="b('text')">
<slot :active="active"/>
<slot :active="active" />
</div>
</div>
</template>

View File

@ -51,4 +51,4 @@ Vue.use(Tag);
| 名称 | 说明 |
|-----------|-----------|
| default | 自定义 Tag 显示内容 |
| - | 自定义 Tag 显示内容 |