From b5ee3ea2e52613fa7a62f65bc08e875b9a22004c Mon Sep 17 00:00:00 2001 From: yuntian001 Date: Fri, 6 Jan 2023 13:46:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4meKeepAlive=20?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9A=84define=E5=B8=B8=E9=87=8F=20=EF=BC=88?= =?UTF-8?q?=E4=BB=8Evue=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/auto-imports.d.ts | 2 ++ vite.config.ts | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/types/auto-imports.d.ts b/types/auto-imports.d.ts index e8f19eb5..2936292b 100644 --- a/types/auto-imports.d.ts +++ b/types/auto-imports.d.ts @@ -3,6 +3,8 @@ export {}; declare global { const EffectScope: typeof import('vue')['EffectScope']; const ElLoading: typeof import('element-plus/es')['ElLoading']; + const ElMessage: typeof import('element-plus/es')['ElMessage']; + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']; const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']; const asyncComputed: typeof import('@vueuse/core')['asyncComputed']; const autoResetRef: typeof import('@vueuse/core')['autoResetRef']; diff --git a/vite.config.ts b/vite.config.ts index c88993c0..4185a9a1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -47,15 +47,6 @@ export default async (configEnv: ConfigEnv): Promise => { ], extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'], }, - /* eslint-disable */ - define: { - // __SSR__: `true`, - // __DEV__: mode === 'development' ? `true` : `false`, - // __COMPAT__: `false`, - // __FEATURE_SUSPENSE__: `true`, - // __FEATURE_PROD_DEVTOOLS__: `false`, - }, - /* eslint-disable */ build: { rollupOptions: { output: { From 31f3566858fddf4cf41ca300e1bbf8f617981547 Mon Sep 17 00:00:00 2001 From: yuntian001 Date: Fri, 6 Jan 2023 13:49:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E7=A6=81=E7=94=A8autoImport=20?= =?UTF-8?q?ts=E7=B1=BB=E5=9E=8B=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90?= =?UTF-8?q?=EF=BC=88=E5=B7=B2=E6=94=BE=E5=88=B0git=E4=B8=AD=E6=97=A0?= =?UTF-8?q?=E9=9C=80=E5=86=8D=E6=AC=A1=E7=94=9F=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/autoImportApi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/autoImportApi.ts b/plugins/autoImportApi.ts index 993d6de0..cd6d5d1f 100644 --- a/plugins/autoImportApi.ts +++ b/plugins/autoImportApi.ts @@ -9,6 +9,6 @@ export default () => // 自动加载API imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'], // 可以选择auto-imports.d.ts生成的位置,使用ts建议设置为'src/auto-imports.d.ts' - dts: pathResolve('types/auto-imports.d.ts'), + dts: false, // pathResolve('types/auto-imports.d.ts'), resolvers: [ElementPlusResolver()], });