From 4959d0f1b991c64ebdfc7adc3e912ce4fbd02e51 Mon Sep 17 00:00:00 2001 From: chansee97 Date: Thu, 23 May 2024 08:43:47 +0800 Subject: [PATCH] fix: add naive hooks --- build/plugins.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build/plugins.ts b/build/plugins.ts index 3e93ad2..3da638f 100644 --- a/build/plugins.ts +++ b/build/plugins.ts @@ -29,7 +29,22 @@ export function createVitePlugins(env: ImportMetaEnv) { // auto import api of lib AutoImport({ - imports: ['vue', 'vue-router', 'pinia', '@vueuse/core', 'vue-i18n'], + imports: [ + 'vue', + 'vue-router', + 'pinia', + '@vueuse/core', + 'vue-i18n', + { + 'naive-ui': [ + 'useDialog', + 'useMessage', + 'useNotification', + 'useLoadingBar', + 'useModal', + ], + }, + ], include: [ /\.[tj]sx?$/, /\.vue$/,