jsx-list
v2.0.6
Published
react xui x-list
Downloads
15
Maintainers
Readme
x-list
react list列表组件
npm
npm install --save jsx-list
demo
<List>
{
[{text:'demo1'},{text:'demo2'},{text:'demo3'},{text:'demo4'},{text:'demo5'},{text:'demo6'}].map( (item,index)=><Option key={index} onSelect={this.onSelectHandle.bind(this,item,index)}>{item.text}</Option>)
}
</List>
<List>
<Option>aaa</Option>
<Option>bbb</Option>
<Option>ccc</Option>
</List>
api
List
onChange(value,index)
改变选中状态,
onSelect(Item,index)
改变选中状态
selected :index
选中值的索引
value:any
选中值的value
值,Option
的value
或内容
data :[]
数据渲染
field:{text,value}
字段值,显示text
,onChange
返回value
className :''
样式类
showSearch :false
是否显示搜索框
Option
readOnly||disabled: false
只读状态
className :''
样式类
关于作者
https://github.com/tianxiangbing
组件github地址
https://github.com/react-xui/x-list
xui
react xui组件一直在持续更新中,欢迎大家关注https://github.com/react-xui