跳到主要内容

eo-user-or-user-group-select

Insider
<eo-user-or-user-group-select>

构件 eo-user-or-user-group-select

Examples

Basic

Playground

Properties

NameDescriptionTypeDefaultRequired
name

字段名称

string
label

字段说明

string
required

是否必填

boolean
placeholder

字段placeholder

string
value

string[] | UserOrUserGroupSelectValue
objectList

模型列表(按需传递 USER/USER_GROUP 的模型定义,用于显示对应实例名称)

注:get object ref 被滥用,这里先暂不支持自动拉取。

Partial<CmdbModels.ModelCmdbObject>[]
query

用户和用户组search接口的query,此参数比较适用于,两者接口需要参数相同的情况 advanced

Record<string, any>
userQuery

针对USER/instance/_search接口的query,此参数比较适用于,可能只需要针对用户做筛选的情况

Record<string, any>
userGroupQuery

针对USER_GROUP/instance/_search接口的query,此参数比较适用于,可能只需要针对用户组做筛选的情况

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 时,输入的valueuser.group.change事件输出的 detail 都为string[]格式。

boolean false
disabled

是否禁用

boolean
isMultiple

是否多选,默认为多选

boolean true
staticList

固定白名单列表,该列表中的值用户不能取消。

string[]
hideAddMeQuickly

快速选择我

boolean true
themeVariant

主题变体

"default" | "elevo"

Events

NameDescriptionEvent Detail
changestring[] | UserOrUserGroupSelectValue

Type references

UserOrUserGroupSelectValue

NameDescriptionTypeDefaultRequired
selectedUserstring[]
selectedUserGroupstring[]