Elements

组件

手风琴 Accordion

Accordion:折叠面板。行与行之间有细线,展开内容淡入显示,箭头以回弹曲线切换。部件:Root、Item、ItemTrigger、ItemContent、ItemIndicator。

#基础用法

accordion/basic Vue React

Interfaces are warm paper, content is ink, hierarchy is light — never pure white, never a hard pop.

#属性

#ItemContent

纯造型的部件——自身没有属性,沿用部件结构的共享样式。

#ItemContext

纯造型的部件——自身没有属性,沿用部件结构的共享样式。

#ItemIndicator

纯造型的部件——自身没有属性,沿用部件结构的共享样式。

#ItemTrigger

纯造型的部件——自身没有属性,沿用部件结构的共享样式。

#Item

属性类型默认值描述
disabledboolean | undefined是否禁用手风琴项
valuestring手风琴项的值

#Root

属性类型默认值描述
collapsiblebooleanfalse手风琴项展开后能否关闭
defaultValuestring[]默认展开的手风琴项;无需控制手风琴值时使用
disabledboolean是否禁用手风琴项
idstring组件内部状态机的唯一标识
idsPartial<{ root: string; item(value: string): string; itemContent(value: string): string; itemTrigger(value: string): string; }>手风琴内各元素的 id;便于组合使用
modelValuestring[]手风琴的 v-model 值
multiplebooleanfalse是否允许同时展开多个手风琴项
orientation'horizontal' | 'vertical'"vertical"手风琴项的方向,可为 horizontal 或 vertical