modelValue | string | number | null | null | 选中的值。 |
options | SelectorOption[] | 必需 | 选项数组。每项可以带 disabled、description 和 action。只要有一项的 action 不是空的,弹出层就变成两列网格,点操作不会改选择。 |
placeholder | string | Select… / 请选择 | 占位符文本。未设置语言时为英文,提供 zh-CN 后为中文。 |
searchable | boolean | false | 是否支持搜索。 |
clearable | boolean | false | 是否可清除。 |
hasClear | boolean | false | 选中值时显示清除按钮,清除会把 null 交给 change。和旧名 clearable 等价,两者任一为真即生效。 |
disabled | boolean | false | 是否禁用。 |
disabledMessage | string | — | 禁用原因。和 disabled 一起用时,鼠标悬停或键盘聚焦会弹出提示,触发器靠 aria-disabled 保持可聚焦,但仍然打不开列表。不用再在外面套 Tooltip:禁用的控件收不到悬停事件。旧名 disabledReason 等价。 |
size | 'sm' | 'md' | 'lg' | 'md' | 选择器尺寸。 |
variant | 'input' | 'secondary' | 'ghost' | 'default' | 'default' | input 和旧名 default 都是带边框的输入框。secondary 对齐次要按钮。ghost 去掉边框,适合工具栏。后两种上的 attached 状态会收成独立说明。 |
isLabelHidden | boolean | false | 视觉上隐藏标签,读屏仍然读得到。 |
containerClass / containerStyle | class / style | — | 加到字段外壳。不会落到触发按钮上。 |
controlClass / controlStyle | class / style | — | 加到画边框的本体。根上直接写的 class 和 style 也落在这里。 |
status | 'default' | 'error' | 'warning' | 'success' | 'default' | 状态样式。 |
label | string | — | 可见标签。不传时用占位文本作为隐藏的无障碍名称。 |
description | string | — | 标签下方的说明。 |
isReadOnly | boolean | false | 只读。值还在,可以聚焦并提交,但不能打开、清除。不变暗。和禁用同时设置时按禁用处理。 |
isLoading | boolean | false | 触发器显示加载指示。加载完成前不显示空状态。 |
isOptional | boolean | false | 在标签旁标成可选。 |
isRequired | boolean | false | 在标签旁标成必填,并设置 aria-required。 |
indicatorPosition | 'start' | 'end' | 'end' | 单选标记放在选项的哪一侧。没选中时默认的勾不占位。主题把勾换成圆点后,没选中的行也会画出空心圆。 |
emptyText | string | 无匹配项 / No matches | 没有任何选项时的文案。 |
emptySearchText | string | 未找到结果 / No results found | 搜索没有命中时的文案。 |