From 8311afa7128560d4183377f7e1e0338bf1d7644b Mon Sep 17 00:00:00 2001 From: Hooray Hu <304327508@qq.com> Date: Mon, 18 Dec 2023 00:15:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor!:=20=E5=BA=94=E7=94=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20app.enableAppSetting=20=E8=BF=81=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E6=96=87=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.production | 2 ++ .env.test | 2 ++ src/layouts/index.vue | 4 +++- src/settings.default.ts | 1 - src/types/global.d.ts | 5 ----- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index fb6bab9e0..975a1f4d1 100755 --- a/.env.development +++ b/.env.development @@ -1,3 +1,5 @@ +# 应用配置面板 +VITE_APP_SETTING = true # 页面标题 VITE_APP_TITLE = Fantastic-admin 基础版 # 接口请求地址,会设置到 axios 的 baseURL 参数上 diff --git a/.env.production b/.env.production index a1b6cf465..acdefa5a7 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,5 @@ +# 应用配置面板 +VITE_APP_SETTING = false # 页面标题 VITE_APP_TITLE = 页面标题 # 接口请求地址,会设置到 axios 的 baseURL 参数上 diff --git a/.env.test b/.env.test index e83ed72f8..4a4f47802 100644 --- a/.env.test +++ b/.env.test @@ -1,3 +1,5 @@ +# 应用配置面板 +VITE_APP_SETTING = false # 页面标题 VITE_APP_TITLE = 页面标题(test) # 接口请求地址,会设置到 axios 的 baseURL 参数上 diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 6c1ac43e3..e10b1ce18 100755 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -67,6 +67,8 @@ onUnmounted(() => { hotkeys.unbind('f5') hotkeys.unbind('alt+`') }) + +const enableAppSetting = import.meta.env.VITE_APP_SETTING === 'true'