继承
none
用法
<Accordion style="height:250px">
<AccordionPanel :title="'Title1'">
<p>Content1</p>
</AccordionPanel>
<AccordionPanel :title="'Title2'">
<p>Content2</p>
</AccordionPanel>
<AccordionPanel :title="'Title3'">
<p>Content3</p>
</AccordionPanel>
</Accordion>
属性
名称 |
类型 |
描述 |
默认 |
border |
boolean |
定义是否显示边框。 |
true |
multiple |
boolean |
为True时展开多个面板。 |
false |
animte |
boolean |
定义展开或折叠面板时是否显示动画效果。 |
false |
selectedIndex |
number,array |
已初始化的选中面板索引。 |
0 |
事件
名称 |
参数 |
描述 |
panelSelect |
panel |
选中面板时触发 |
panelUnselect |
panel |
未选中面板时触发。 |
方法
名称 |
参数 |
返回值 |
描述 |
select |
index |
void |
选择指定的面板。 |
unselect |
index |
void |
取消选择指定的面板。 |
getPanel |
index |
AccordionPanel |
获得指定面板。 |
getPanelIndex |
panel |
number |
获得指定面板索引。 |
getSelectedIndex |
none |
number |
获取第一个选中面板的索引。 |
getSelectedPanel |
none |
AccordionPanel |
获取第一个选中的面板。 |
getSelectedPanels |
none |
AccordionPanel[] |
获取所有选中的面板 |