antd picker

const seasons = [
 
{
label: '2013',
value: '2013',
},
{
label: '2014',
value: '2014',
},
];
 <Picker
          data={seasons}
          title="选择类别"
          cols={1}
        
          extra="请选择(可选)"
          value={this.state.sValue}
          onChange={v =>{ this.setState({ sValue: v } );/*(alert(v)*/}}
          onOk={v =>{ /*this.setState({ sValue: v });alert(v) */} }
        >
          <List.Item arrow="horizontal">类别</List.Item>
        </Picker>
      

 

posted @ 2020-10-10 16:45  cnchengv  阅读(409)  评论(0编辑  收藏  举报