AutoComplete 自动生成
规则
js
const rule = {
type: "autoComplete",
title: "自动完成",
field: "auto",
value: "xaboy",
inject: true,
props: {}
}完整配置项:naive-ui_AutoComplete
value :String
Props
| 名称 | 类型 | 默认值 | 说明 | 版本 |
|---|---|---|---|---|
| blur-after-select | boolean | false | 选中后是否 blur | |
| clear-after-select | boolean | false | 选中后是否清空 | |
| clearable | boolean | false | 自动填充是否支持可清除 | |
| disabled | boolean | false | 自动填充是否禁用 | |
| get-show | (value: string) => boolean | undefined | 根据输入值在聚焦的状态中决定是否显示菜单 | |
| input-props | HTMLInputAttributes | undefined | 自动填充中 input 元素的属性 | |
| loading | boolean | false | 是否展示加载状态 | |
| options | Array<string | AutoCompleteOption | AutoCompleteGroupOption> | [] | 自动填充的自定义选项 | |
| placeholder | string | '请输入' | 自动填充的提示信息 | |
| 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) => VNodeChild | undefined | 选项标签渲染函数 | 2.24.0 |
| render-option | (info: { node: VNode, option: SelectOption | SelectGroupOption, selected: boolean }) => VNodeChild | undefined | 选项的渲染函数 | 2.24.0 |
| size | 'small' | 'medium' | 'large' | 'medium' | 自动填充的尺寸大小 | |
| on-blur | (event: FocusEvent) => void | undefined | blur 时触发的回调函数 | |
| on-focus | (event: FocusEvent) => void | undefined | focus 时触发的回调函数 | |
| on-select | (value: string) => void | undefined | select 选中时触发的回调函数 | |
| on-update:value | (value: string | null) => void | undefined | 可控数据更新时触发的回调函数 |


