2019-10-11 19:04:22 +08:00
|
|
|
# Collapse
|
2020-01-27 20:16:25 +08:00
|
|
|
I saw it appears in many side control panels.
|
|
|
|
## Demos
|
2019-10-11 19:04:22 +08:00
|
|
|
```demo
|
|
|
|
basic
|
|
|
|
accordion
|
|
|
|
nested
|
2020-03-18 15:56:59 +08:00
|
|
|
item-header-click
|
2020-01-27 20:16:25 +08:00
|
|
|
```
|
|
|
|
## V-model
|
|
|
|
|Prop|Event|
|
|
|
|
|-|-|
|
2020-03-08 19:24:07 +08:00
|
|
|
|expanded-names|expanded-names-change|
|
2020-01-27 20:16:25 +08:00
|
|
|
|
|
|
|
## Props
|
|
|
|
### Collapse
|
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
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-01-27 20:16:25 +08:00
|
|
|
|accordion|`boolean`|`false`||
|
|
|
|
|
|
|
|
### Collapse Item
|
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|title|`string \| number`|`null`||
|
2020-02-03 21:07:58 +08:00
|
|
|
|name|`string \| number`||**required**|
|
2020-01-27 20:16:25 +08:00
|
|
|
|
2020-02-03 21:20:21 +08:00
|
|
|
## Slots
|
|
|
|
### Collapse Slots
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
|
|
|
|
|
|
|
### Collapse Item Slots
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
2020-03-18 15:56:59 +08:00
|
|
|
|header|`()`||
|
2020-02-03 21:20:21 +08:00
|
|
|
|
2020-01-27 20:16:25 +08:00
|
|
|
## Event
|
2020-03-18 16:54:08 +08:00
|
|
|
### Collapse Event
|
2020-01-27 20:16:25 +08:00
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
2020-03-18 15:56:59 +08:00
|
|
|
|expanded-names-change|`(expandedNames: Array<string>)`||
|
|
|
|
|item-header-click|`({ name: string, expanded: boolean, event: MouseEvent })`||
|