eo-user-or-user-group-select
Insider
<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 | 模型列表(按需传递 USER/USER_GROUP 的模型定义,用于显示对应实例名称) 注:get object ref 被滥用,这里先暂不支持自动拉取。 | 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 | |
themeVariant | 主题变体 | "default" | "elevo" |
Events
Name | Description | Event Detail |
---|---|---|
change | string[] | UserOrUserGroupSelectValue |
Type references
UserOrUserGroupSelectValue
Name | Description | Type | Default | Required |
---|---|---|---|---|
selectedUser | string[] | ✅ | ||
selectedUserGroup | string[] | ✅ |