File tree Expand file tree Collapse file tree 2 files changed +7388
-0
lines changed Expand file tree Collapse file tree 2 files changed +7388
-0
lines changed Original file line number Diff line number Diff line change 67
67
</Wrapper >
68
68
</Code >
69
69
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
+
70
98
<script >
71
99
import Basic from ' ~comps/collapse/demo/basic' ;
72
100
import Accordion from ' ~comps/collapse/demo/accordion' ;
You can’t perform that action at this time.
0 commit comments