@beisen-platform/platform-dropdownlist
v1.0.27-rc.2
Published
平台dropdownlist组件,绑定平台元数据
Downloads
116
Readme
组件使用、扩展文档
提交
- npm install
- 修改代码后执行 npm run lib进行编译
- 更新package.json中的 version版本号
- push代码
- 在cmp.beisen.io站点,头部导航的《服务》中查看编译是否通过
使用参数
{
text: this.props.text || '',
value: this.props.value || '',
"cmp_id": "9960148c-1565-40cb-ba13-af74d9e0d276",
"cmp_name": "BeisenCloudDemosearchshengji_danxuanliebiao32",
"cmp_type": "BC_DropDownList",
"cmp_label": "职务dev",
"cmp_data": {
"title": "职务dev",
"field_name": "danxuanliebiao32",
"required": false, //必填
"cmp_state": "create",
"cmp_status": "editable",
"editdisplaystate": "editable",
"createdisplaystate": "editable",
"showdisplaystate": "readonly",
"datasourcename": "NativePlace",
"metaObjectName":"BeisenCloudDemo.searchshengji",
"dataType": "Text",
"multiple": true //true 或者false,单选或者多选
},
"search_data": {
metaFieldRelationIDPath: null,
metaobjectname: "BeisenCloudDemo.searchshengji",
opeartor: "eq",
seperator: "-"
},
"ifError": false, //true 或者false,是否显示错误状态
"biz_data": { "text": "" },
"validators": {},
"placeholder":"输入框内提示信息", //默认是"请选择"
"autoShowPanel": true, // true或者false, 异步获取数据时是否重新渲染组件
onChange: (value,target) => {}, //onchange回调事件
onFocus: (val)=> {} // focus时回调
}
组件使用
- npm install @beisen-cmps/platform-dropdownlist
- 该组件有两种使用方式, 第一种会走组件内部的获取数据方式,数据会存在state里,第二种会走外部传入的action
- import XXX from '@beisen-cmps/platform-dropdownlist'
- import {DropDownList} from '@beisen-cmps/platform-dropdownlist'
render() {
return <DropDownList {...this.props}/>;
}