跳到主要内容

eo-cmdb-instance-select

Insider
<eo-cmdb-instance-select>

构件 eo-cmdb-instance-select

Examples

Basic

Playground

Multiple Mode

Playground

Properties

NameDescriptionTypeDefaultRequired
name

字段名称

string
label

字段说明

string
required

是否必填

boolean
placeholder

字段placeholder

string
value

string | string[]
objectId

模型 id

string
disabled

是否禁用

boolean
allowClear

支持清除选项

boolean
mode

多选模式

string
pageSize

配置搜索接口的pageSize

number
instanceQuery

下拉框选项的过滤条件

any
fields

自定义 select 下拉选项的 label 和 value 字段

Partial<ComplexOption<string>>
minimumInputLength

输入多少个字符才触发搜索动作

number
extraSearchKey

配置额外的字段进行搜索

string[]
extraFields

配置接口需要返回的额外字段

string[]
popoverPositionType

下拉选项的渲染方式

"default" | "parent"
isMultiLabel

控制下拉框中的label显示一个或者多个

boolean
showSearchTip

下拉列表的最后一行是否显示提示

boolean
labelTemplate

可自定义label显示的模板

string
inputBoxStyle

输入框样式

React.CSSProperties
permission

按照权限过滤实例

Array<"read" | "update" | "operate">
showTooltip

下拉框中是否启用tooltip显示label全称

boolean
ignoreMissingFieldError

是否忽略不存在字段

boolean
showKeyField

实例通过showKey自定义展示

boolean
dropdownMatchSelectWidth

下拉菜单和选择器同宽

boolean
dropdownStyle

设置下拉框容器的样式

React.CSSProperties
blurAfterValueChanged

是否在选完值后取消聚焦

boolean
sort

配置接口返回数据的排序规则

Array<Record<string, number | string>>
useExternalCmdbApi

使用外部数据源

boolean
externalSourceId

外部数据源id

string

Events

NameDescriptionEvent Detail
changestring | string[]
change.v2ComplexOption
options.change{ options: ComplexOption[]; name: string }

Type references

ComplexOption

<T = string | number>
NameDescriptionTypeDefaultRequired
labelstring[] | string
valueT
user_iconstring