林旭祥 3 周之前
父節點
當前提交
3a2935a4e2
共有 4 個文件被更改,包括 11 次插入3 次删除
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 8 0
      src/types/auto-imports.d.ts
  4. 1 1
      src/views/set/index.vue

+ 1 - 1
.env.development

@@ -8,4 +8,4 @@ VITE_APP_CONTEXT_PATH = '/'
 # 获取配置项
 VITE_APP_BASE_CTRL = 'https://allctrltst.tropsx.com'
 # 获取git提交记录编码
-VITE_GIT_HASH = `git rev-parse HEAD`
+VITE_GIT_COMMIT_HASH=$(git rev-parse HEAD)

+ 1 - 1
.env.production

@@ -8,4 +8,4 @@ VITE_APP_CONTEXT_PATH = '/'
 # 获取配置项
 VITE_APP_BASE_CTRL = 'https://allctrl.tropsx.com'
 # 获取git提交记录编码
-VITE_GIT_HASH = `git rev-parse HEAD`
+VITE_GIT_COMMIT_HASH=$(git rev-parse HEAD)

+ 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 - 1
src/views/set/index.vue

@@ -79,7 +79,7 @@ const confirmExit = () => {
 };
 
 onMounted(() => {
-  gitSha1.value = `${__VITE_GIT_HASH__}`
+  gitSha1.value = import.meta.env.VITE_GIT_COMMIT_HASH
 })
 </script>