行业选择器
npm i --save @kne/react-industry-select
全国城市选择器
- 行业类别
- 选择行业类别,可支持多选,数据可以自己扩展
- IndustrySelect(@kne/react-industry-select),Antd(antd)
const {createIndustrySelect,DisplayIndustry}=IndustrySelect;
const {Button}=Antd;
const BaseExample = ()=>{
return <Button onClick={()=>{
createIndustrySelect({
defaultValue:["040"]
})
}}>
<DisplayIndustry id={"040"}>{(list)=>list.chName}</DisplayIndustry>
</Button>
};
render(<BaseExample />);
属性名 | 说明 | 类型 | 默认值 |
---|---|---|---|
title | 模态框标题 | string | - |
size | 选择数量 | boolean | 1 |
defaultValue | 默认选中项 | array | - |
onChange | 选中触发事件 | function(value) | - |
参数同上
属性名 | 说明 | 类型 | 默认值 |
---|---|---|---|
id | 选中的项的id | string | - |