feat: naive add AutoComplete

pull/324/head
xingyu4j 2026-01-26 14:59:34 +08:00
parent cdcbd58f0e
commit 0a7ead980a
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,9 @@ import { $t } from '@vben/locales';
import { message } from '#/adapter/naive';
import { FileUpload, ImageUpload } from '#/components/upload';
const NAutoComplete = defineAsyncComponent(() =>
import('naive-ui/es/auto-complete').then((res) => res.NAutoComplete),
);
const NButton = defineAsyncComponent(() =>
import('naive-ui/es/button').then((res) => res.NButton),
);
@ -103,6 +106,7 @@ const withDefaultPlaceholder = <T extends Component>(
export type ComponentType =
| 'ApiSelect'
| 'ApiTreeSelect'
| 'AutoComplete'
| 'Checkbox'
| 'CheckboxGroup'
| 'DatePicker'
@ -154,6 +158,7 @@ async function initComponentAdapter() {
visibleEvent: 'onVisibleChange',
},
),
AutoComplete: NAutoComplete,
Checkbox: NCheckbox,
CheckboxGroup: (props, { attrs, slots }) => {
let defaultSlot;