mirror of
https://github.com/youzan/vant.git
synced 2026-01-21 01:15:55 +08:00
feat(CollapseItem): add label slot (#8934)
* feat(CollapseItem): add label slot * docs: upd
This commit is contained in:
@@ -144,13 +144,14 @@ export default {
|
||||
|
||||
### CollapseItem Slots
|
||||
|
||||
| Name | Description |
|
||||
| ---------- | ----------------- |
|
||||
| default | Content |
|
||||
| value | Custom value |
|
||||
| icon | Custom icon |
|
||||
| title | Custom title |
|
||||
| right-icon | Custom right icon |
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------ |
|
||||
| default | Content |
|
||||
| title | Custom header title |
|
||||
| value | Custom header value |
|
||||
| label `v3.1.1` | Custom header label |
|
||||
| icon | Custom header left icon |
|
||||
| right-icon | Custom header right icon |
|
||||
|
||||
### CollapseItem Methods
|
||||
|
||||
|
||||
@@ -142,13 +142,14 @@ export default {
|
||||
|
||||
### CollapseItem Slots
|
||||
|
||||
| 名称 | 说明 |
|
||||
| ---------- | ------------------------------ |
|
||||
| default | 面板内容 |
|
||||
| value | 自定义显示内容 |
|
||||
| icon | 自定义 `icon` |
|
||||
| title | 自定义 `title` |
|
||||
| right-icon | 自定义右侧按钮,默认是 `arrow` |
|
||||
| 名称 | 说明 |
|
||||
| -------------- | -------------------- |
|
||||
| default | 面板内容 |
|
||||
| title | 自定义标题栏左侧内容 |
|
||||
| value | 自定义标题栏右侧内容 |
|
||||
| label `v3.1.1` | 自定义标题栏描述信息 |
|
||||
| icon | 自定义标题栏左侧图标 |
|
||||
| right-icon | 自定义标题栏右侧图标 |
|
||||
|
||||
### CollapseItem 方法
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ exports[`should render slots of CollapseItem correctly 1`] = `
|
||||
this is icon
|
||||
<div class="van-cell__title">
|
||||
this is title
|
||||
<div class="van-cell__label">
|
||||
this is label
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
this is value
|
||||
|
||||
@@ -85,9 +85,10 @@ test('should render slots of CollapseItem correctly', () => {
|
||||
<Collapse v-model={this.active}>
|
||||
<CollapseItem
|
||||
v-slots={{
|
||||
icon: () => 'this is icon',
|
||||
title: () => 'this is title',
|
||||
value: () => 'this is value',
|
||||
icon: () => 'this is icon',
|
||||
label: () => 'this is label',
|
||||
'right-icon': () => 'this is right icon',
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user