@beisen-cmps/platform-dropdownlist

0.0.115 • Public • Published

组件使用、扩展文档

提交

  1. npm install
  2. 修改代码后执行 npm run lib进行编译
  3. 更新package.json中的 version版本号
  4. push代码
  5. 在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时回调
  translation: {
      emptyText: '空(未填写)',
      cmpUxDropDownList: {
          cmpUxDropDown: {
              searchText: '搜索',
              confirmText: '确定'
          }
      }
  }
}

组件使用

  1. npm install @beisen-cmps/platform-dropdownlist
  2. 该组件有两种使用方式, 第一种会走组件内部的获取数据方式,数据会存在state里,第二种会走外部传入的action
  3. import XXX from '@beisen-cmps/platform-dropdownlist'
  4. import {DropDownList} from '@beisen-cmps/platform-dropdownlist'
render() {
  return <DropDownList {...this.props}/>;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @beisen-cmps/platform-dropdownlist

Weekly Downloads

2

Version

0.0.115

License

ISC

Unpacked Size

59.2 kB

Total Files

18

Last publish

Collaborators

  • beisencorp