Autocomplete (自动完成)

组合框:文本输入 + 过滤建议列表(v-model 字符串);支持 allowCustomValue 与手动过滤。

基础用法

Basic.vue

自定义值

值: —

CustomValue.vue

可清除

Clearable.vue

错误 / 禁用

请选择一个有效城市

ErrorDisabled.vue

颜色

Colors.vue

远程搜索(loading + debounce)

confirmed value:

RemoteSearch.vue

自定义选项(#option 插槽)

CustomOption.vue

属性

属性类型默认值说明
options *readonly T[]
allowCustomValuebooleantrue
ariaLabelstring""
clearablebooleanfalse
colorKunUIColor"default"
darkBorderbooleantrue
debouncenumber0
descriptionstring""
disabledbooleanfalse
errorstring""
isInvalidbooleanfalse
labelstring""
loadingbooleanfalse
loadingTextstring"加载中…"
manualFilterbooleanfalse
modelValuestring""
namestringundefined
noResultTextstring"无匹配项"
placeholderstring""
roundedKunUIRoundedundefined
sizeKunUISize"md"