jsx-list

2.0.6 • Public • Published

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值,Optionvalue或内容

data :[]

数据渲染

field:{text,value}

字段值,显示textonChange返回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

Package Sidebar

Install

npm i jsx-list

Weekly Downloads

11

Version

2.0.6

License

MIT

Unpacked Size

87.7 kB

Total Files

25

Last publish

Collaborators

  • tianxiangbing