react-industry-select 描述

行业选择器

安装

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 />); API 其他属性参考antd modal的props

属性名 说明 类型 默认值
title 模态框标题 string -
size 选择数量 boolean 1
defaultValue 默认选中项 array -
onChange 选中触发事件 function(value) -
IndustrySelect.createIndustrySelect

参数同上

IndustrySelect.DisplayIndustry 这是一个组件
属性名 说明 类型 默认值
id 选中的项的id string -

版权声明:

1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。
2、网站不提供资料下载,如需下载请到原作者页面进行下载。