1.0.26-rc.4 • Published 4 years ago
@beisen-platform/platform-user-selector v1.0.26-rc.4
组件使用、扩展文档
提交
- 修改package.json中的devDependencies里依赖版本, @beisen/gulp-lib -> 0.1.1; @beisen/storybook-lib -> 0.3.0
- npm install
- 修改代码后执行 npm run lib进行编译
- 更新package.json中的 version版本号
- push代码
- 在cmp.beisen.io站点,头部导航的《服务》中查看编译是否通过
人员组件 接口自定义配置
{
//获取常用联系人接口
"getUserUrl" : {
"url": ""
,"method": "GET"
},
//获取下属接口
"getStaffUrl" : {
"url": ""
,"method": "GET"
},
//获取部门详细信息
"getDeptUrl" : {
"url": ""
,"method": "GET"
},
//获取部门下人员列表
"getDeptUserUrl" : {
"url": ""
,"method": "GET"
},
//搜索人员接口
"getSearchUserUrl" : {
"url": ""
,"method": "GET"
}
}
可以配置部分参数,如果参数为空则请求系统默认接口
const config = {
titaHost: getBSGlobal('apiPath'),
tenantId: getBSGlobal('tenantInfo').Id,
userId: getBSGlobal('loginUserInfo').Id,
application: getBSGlobal('application'),
cloudHost: getBSGlobal('cloudHost') || '',// || '//cloud.italent.link',
}
表单组件请求url添加 formState参数
使用参数
{
text: this.props.text || '',
value: this.props.value || '',
"avatars":{
"222":{ //头像,key要和value里对应
"hasAvatar":false,
"color":"#f0c75a"
}
},
"cmp_id": "c569ca1e-e58b-4a54-8a82-274ebc654162",
"cmp_name": "Onwer",
"cmp_type": "BC_UserSelect",
"cmp_label": "所有者",
"cmp_data": {
"AllowSearchNull": "1",
"title": "所有者",
"field_name": "BeisenCloudDemo.searchshengji.Onwer",
"metaObjectName":"BeisenCloudDemo.searchshengji",
"required": false,
"cmp_state": "create",
"cmp_status": "editable",
"editdisplaystate": "editable",
"createdisplaystate": "editable",
"showdisplaystate": "readonly",
"datasourcename": "BCStaffDataSource",
"IsShowHeadPic": true,
"dataType": "Text",
"singleSelect": false //单选or多选
},
"search_data": {
metaFieldRelationIDPath: null,
metaobjectname: "BeisenCloudDemo.searchshengji",
opeartor: "eq",
seperator: "-"
},
"biz_data": { "text": "" },
"validators": {},
"singleSelect": false //单选or多选
"usersDataFromProps": true // true or false,审批参数
styleTitle: 'rightFlush', // "upAndDown" , "rightFlush", "leftFlush", label的位置上下还是左右
onChange: (value) => {} //回调事件
}
组件使用
- npm install @beisen-cmps/platform-user-selector
- 该组件有两种使用方式, 第一种会走组件内部的获取数据方式,数据会存在state里,第二种会走外部传入的action
- import XXX from '@beisen-cmps/platform-user-selector'
- import {UserSelector} from '@beisen-cmps/platform-user-selector'
render() {
return <UserSelector {...this.props}/>;
}
1.0.26-rc.4
4 years ago
1.0.26-rc.3
4 years ago
1.0.26-rc.2
5 years ago
1.0.26-rc.1
5 years ago
1.0.26
5 years ago
1.0.25
5 years ago
1.0.24-rc.1
5 years ago
1.0.24
5 years ago
1.0.23-rc.16
5 years ago
1.0.23-rc.15
5 years ago
1.0.23-rc.14
5 years ago
1.0.23-rc.13
5 years ago
1.0.23-rc.12
5 years ago
1.0.23-rc.11
5 years ago
1.0.23-rc.10
5 years ago
1.0.23-rc.7
5 years ago
1.0.23-rc.6
5 years ago
1.0.23-rc.5
5 years ago
1.0.23-rc.4
5 years ago
1.0.23-rc.3
5 years ago
1.0.23-rc.2
5 years ago
1.0.23-rc.1
5 years ago
1.0.23
5 years ago
1.0.22
5 years ago
1.0.21
5 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.54
5 years ago