Skip to content

Commit 01a1e3a

Browse files
committed
update component collapse 's document
1 parent 64a1f93 commit 01a1e3a

File tree

2 files changed

+7388
-0
lines changed

2 files changed

+7388
-0
lines changed

docs/components/data-display/collapse.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,34 @@
6767
</Wrapper>
6868
</Code>
6969

70+
## API
71+
72+
### Collapse
73+
74+
| 参数 | 说明 | 类型 | 默认值 |
75+
| --- | --- | --- | --- |
76+
| activeKey(v-model) | 当前激活 tab 面板的 key | string\[] \| string | 默认无,accordion模式下默认第一个元素 |
77+
| defaultActiveKey | 初始化选中面板的 key | string ||
78+
79+
### 事件
80+
| 事件名称 | 说明 | 回调参数 |
81+
| --- | --- | --- |
82+
| change | 切换面板的回调 | function(key) |
83+
84+
### Collapse.Panel
85+
86+
| 参数 | 说明 | 类型 | 默认值 |
87+
| --- | --- | --- | --- |
88+
| disabled | 禁用后的面板展开与否将无法通过用户交互改变 | boolean | false |
89+
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |
90+
| header | 面板头内容 | string \| slot ||
91+
| key | 对应 activeKey | string ||
92+
93+
:::tip
94+
header 提供插槽prop `{ isActive }`
95+
`v-slot:header="{ isActive }"`
96+
:::
97+
7098
<script>
7199
import Basic from '~comps/collapse/demo/basic';
72100
import Accordion from '~comps/collapse/demo/accordion';

0 commit comments

Comments
 (0)