Skip to content

AutoComplete 自动生成

规则

js
{
    type: "autoComplete",
    title: "自动完成",
    field: "auto",
    value: "xaboy",
    inject: true,
    props: {}
}
{
    type: "autoComplete",
    title: "自动完成",
    field: "auto",
    value: "xaboy",
    inject: true,
    props: {}
}

参考:naive-ui_AutoComplete

value :String

Props

名称类型默认值说明版本
blur-after-selectbooleanfalse选中后是否 blur
clear-after-selectbooleanfalse选中后是否清空
clearablebooleanfalse自动填充是否支持可清除
disabledbooleanfalse自动填充是否禁用
get-show(value: string) => booleanundefined根据输入值在聚焦的状态中决定是否显示菜单
input-propsHTMLInputAttributesundefined自动填充中 input 元素的属性
loadingbooleanfalse是否展示加载状态
optionsArray<string | AutoCompleteOption | AutoCompleteGroupOption>[]自动填充的自定义选项
placeholderstring'请输入'自动填充的提示信息
placement'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'bottom-start'自动填充的弹出位置2.25.0
render-label(option: SelectOption | SelectGroupOption, selected: boolean) => VNodeChildundefined选项标签渲染函数2.24.0
render-option(info: { node: VNode, option: SelectOption | SelectGroupOption, selected: boolean }) => VNodeChildundefined选项的渲染函数2.24.0
size'small' | 'medium' | 'large''medium'自动填充的尺寸大小
on-blur(event: FocusEvent) => voidundefinedblur 时触发的回调函数
on-focus(event: FocusEvent) => voidundefinedfocus 时触发的回调函数
on-select(value: string) => voidundefinedselect 选中时触发的回调函数
on-update:value(value: string | null) => voidundefined可控数据更新时触发的回调函数