eo-user-or-user-group-select
<eo-user-or-user-group-select>
构件 eo-user-or-user-group-select
Examples
Basic
Properties
Name | Description | Type | Default | Required |
---|---|---|---|---|
name | 字段名称 | string | ||
label | 字段说明 | string | ||
required | 是否必填 | boolean | ||
placeholder | 字段placeholder | string | ||
value | 值 | string[] | UserOrUserGroupSelectValue | ||
objectList | 模型列表,不传该属性构件内部会发请求获取该列表,如果需要传该属性则优先使用外部传进来的数据,该数据来自"providers-of-cmdb.cmdb-object-api-get-object-ref" 如 demo 所示 advanced | Partial<CmdbModels.ModelCmdbObject>[] | ||
query | 用户和用户组 | Record<string, any> | ||
userQuery | 针对 | Record<string, any> | ||
userGroupQuery | 针对 | Record<string, any> | ||
optionsMode | 支持选择用户、用户组或者两者 { "optionType": "button", "options": [ { "label": "All", "value": "all" }, { "label": "User", "value": "user", "icon": { "lib": "antd", "icon": "user", "theme": "outlined" } }, { "label": "Group", "value": "group", "icon": { "lib": "antd", "icon": "usergroup-add", "theme": "outlined" } } ] } | "user" | "group" | "all" | "all" | |
mergeUseAndUserGroup | 是否合并用户和用户组数据,当设置为 true 时,输入的 | boolean | false | |
disabled | 是否禁用 | boolean | ||
isMultiple | 是否多选,默认为多选 | boolean | true | |
staticList | 固定白名单列表,该列表中的值用户不能取消。 | string[] | ||
hideAddMeQuickly | 快速选择我 | boolean | true |
Events
Name | Description | Event Detail |
---|---|---|
change | string[] | UserOrUserGroupSelectValue |
Type references
UserOrUserGroupSelectValue
Name | Type | Required | Description |
---|---|---|---|
selectedUser | string[] | ✅ | |
selectedUserGroup | string[] | ✅ |