people-picker-react-test
v0.0.52
Published
发布 people-picker react版本组件
Downloads
22
Maintainers
Readme
people-picker react版本使用文档
安装:
npm install people-picker-react --registry https://gtsartifact.jfrog.io/artifactory/api/npm/pwc-cn-gts-bs-fcs-npm/
引入组件:
import PeoplePicker from 'people-picker-react';
代码
<PeoplePicker
params={{ queryType: "Staff", termFlag: "ALL" }}
selectProps={{
disabled: false,
size: "large",
mode: 'multiple',
placeholder: "Please Search Users",
}}
defaultValue={peopleDefaultData}
onSelect={peopleChange}
/>
Attributes
| Parameter | Description | Type | Defaults | | ----------- | ---------------- | -------- | --------------| | selectProps | select属性 | object | selectProps 默认属性 | | params | 后端接口参数 | object | { queryType: "All", termFlag: "ALL" } | | defaultValue | 指定默认选中条目 | object[] | [] |
selectProps Attributes
支持select透传 | Parameter | Description | Type | Defaults | | ----------- | ---------------- | -------- | --------------| | disabled | 是否禁用 | boolean | false | | mode | 设置 Select 的模式为多选或标签,不填为单选 | multiple | tags | - | | placeholder | 选择框默认文本 | string | Please Search User | | size | 选择框大小 | large | middle | small | middle | | ... | ... | ... | ... |
params
| Parameter | Description | Type | Defaults | | ----------- | ---------------- | -------- | --------------| | queryType | 搜索数据类型,支持 Staff, All, Group | string | Staff | | termFlag | “ALL”查询所有人员, “N”只查在职人员, “Y”只查离职人员 | string | N |