林旭祥 2 hete
szülő
commit
d430612868
2 módosított fájl, 9 hozzáadás és 2 törlés
  1. 8 0
      src/types/auto-imports.d.ts
  2. 1 2
      vite.config.ts

+ 8 - 0
src/types/auto-imports.d.ts

@@ -296,6 +296,10 @@ declare module 'vue' {
   interface GlobalComponents {}
   interface ComponentCustomProperties {
     readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
+    readonly ElLoading: UnwrapRef<typeof import('element-plus/es')['ElLoading']>
+    readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
+    readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
+    readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
     readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
     readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
     readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
@@ -575,6 +579,10 @@ declare module '@vue/runtime-core' {
   interface GlobalComponents {}
   interface ComponentCustomProperties {
     readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
+    readonly ElLoading: UnwrapRef<typeof import('element-plus/es')['ElLoading']>
+    readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
+    readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
+    readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
     readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
     readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
     readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>

+ 1 - 2
vite.config.ts

@@ -1,7 +1,6 @@
 import { UserConfig, ConfigEnv, loadEnv, defineConfig } from 'vite';
 import createPlugins from './vite/plugins';
 import path from 'path';
-import { gitCommitHashPlugin } from "vite-plugin-git-commit-hash";
 const timeStamp = new Date().getTime();
 export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
   const env = loadEnv(mode, process.cwd());
@@ -15,7 +14,7 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
       extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
     },
     // https://cn.vitejs.dev/config/#resolve-extensions
-    plugins: [createPlugins(env, command === 'build'),gitCommitHashPlugin()],
+    plugins: createPlugins(env, command === 'build'),
     server: {
       host: '0.0.0.0',
       port: Number(env.VITE_APP_PORT),