2020-02-03 21:20:21 +08:00
|
|
|
# 折叠面板 Collapse
|
2020-02-03 21:07:58 +08:00
|
|
|
我看到它总被用在界面边栏的控制面板上。
|
|
|
|
## 演示
|
2019-12-02 03:57:34 +08:00
|
|
|
```demo
|
|
|
|
basic
|
|
|
|
accordion
|
|
|
|
nested
|
2020-03-18 15:56:59 +08:00
|
|
|
item-header-click
|
2019-12-02 03:57:34 +08:00
|
|
|
```
|
2020-02-03 21:07:58 +08:00
|
|
|
## V-model
|
|
|
|
|Prop|Event|
|
|
|
|
|-|-|
|
2020-03-08 19:24:07 +08:00
|
|
|
|expanded-names|expanded-names-change|
|
2020-02-03 21:07:58 +08:00
|
|
|
|
|
|
|
## Props
|
|
|
|
### Collapse Props
|
2020-02-07 23:40:07 +08:00
|
|
|
|名称|类型|默认值|说明|
|
2020-02-03 21:07:58 +08:00
|
|
|
|-|-|-|-|
|
2020-03-12 21:32:47 +08:00
|
|
|
|theme|`'light' \| 'dark'`|`null`||
|
2020-03-08 19:24:07 +08:00
|
|
|
|expanded-names|`Array`|`null`||
|
2020-02-03 21:07:58 +08:00
|
|
|
|accordion|`boolean`|`false`||
|
|
|
|
|
|
|
|
### Collapse Item Props
|
2020-02-07 23:40:07 +08:00
|
|
|
|名称|类型|默认值|说明|
|
2020-02-03 21:07:58 +08:00
|
|
|
|-|-|-|-|
|
|
|
|
|title|`string \| number`|`null`||
|
|
|
|
|name|`string \| number`||**必需**|
|
|
|
|
|
2020-02-03 21:20:21 +08:00
|
|
|
## Slots
|
|
|
|
### Collapse Slots
|
2020-02-07 23:40:07 +08:00
|
|
|
|名称|参数|说明|
|
2020-02-03 21:20:21 +08:00
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
|
|
|
|
|
|
|
### Collapse Item Slots
|
2020-02-07 23:40:07 +08:00
|
|
|
|名称|参数|说明|
|
2020-02-03 21:20:21 +08:00
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
2020-03-18 15:56:59 +08:00
|
|
|
|header|`()`||
|
2020-02-03 21:20:21 +08:00
|
|
|
|
2020-02-03 21:07:58 +08:00
|
|
|
## Event
|
2020-03-18 16:54:08 +08:00
|
|
|
### Collapse Event
|
2020-02-07 23:40:07 +08:00
|
|
|
|名称|参数|说明|
|
2020-02-03 21:07:58 +08:00
|
|
|
|-|-|-|
|
2020-03-18 15:56:59 +08:00
|
|
|
|expanded-names-change|`(expandedNames: Array<string>)`||
|
|
|
|
|item-header-click|`({ name: string, expanded: boolean, event: MouseEvent })`||
|