1.0.8 • Published 5 years ago

x-collapse v1.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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

展开的内容

关于作者

https://github.com/tianxiangbing

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago