x-collapse
v1.0.8
Published
react xui 开发插件的折叠组件
Downloads
3
Maintainers
Readme
x-collapse
react折叠组件
NPM
npm install --save x-collapse
代码示例
<Collapse defaultActive={["1"]} bordered={true} expandIconPosition="right">
<Collapse.Panel key="1" title="abc">
123123
</Collapse.Panel>
<Collapse.Panel key="2" title="abc">
123123
</Collapse.Panel>
<Collapse.Panel key="3" title="abc">
123123
</Collapse.Panel>
</Collapse>
<h2>手风琴模式</h2>
<Collapse defaultActive={["1"]} accordion={true}>
<Collapse.Panel key="1" title="abc">
123123
</Collapse.Panel>
<Collapse.Panel key="2" title="abc">
123123
</Collapse.Panel>
<Collapse.Panel key="3" title="abc">
123123
</Collapse.Panel>
</Collapse>
API
defaultValue:[]||string
默认选中项,为数组或string 与表单元素一致,有value和defaultValue,对应Panel的key值
bordered:true
是否有边框,默认为true
accordion:false
手风琴模式
expandIconPosition:"left"||"right"
展开图标显示的位置,默认为left
Panel
key:String
唯一标识
title:String||ReactNode
头部标题
children:any
展开的内容