From 96557fb255278dce5e05af238712cb68847fb0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=83=E5=B9=B4=E5=A4=8F?= <2098833867@qq.com> Date: Wed, 2 Aug 2023 09:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E4=B8=8E?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddebugger=E4=B8=80=E4=B8=AA=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/debuger.ts | 1 + typings/env.d.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/debuger.ts b/src/store/debuger.ts index 1e083af..790727b 100644 --- a/src/store/debuger.ts +++ b/src/store/debuger.ts @@ -3,6 +3,7 @@ import { defineStore } from 'pinia' export const useDebuggerStore = defineStore('debugger', { state() { return { + enable: import.meta.env.VITE_APP_ENV !== 'prod', ui: { showLayoutGrid: false } diff --git a/typings/env.d.ts b/typings/env.d.ts index e4d89b4..0545982 100644 --- a/typings/env.d.ts +++ b/typings/env.d.ts @@ -1,8 +1,9 @@ declare global { interface ImportMetaEnv { + readonly VITE_APP_BASE_MODE: 'local' | 'url' | 'port' readonly VITE_APP_BASE_URL: string - readonly VITE_APP_IMAGE_URL: string - readonly VITE_APP_ENV: string + readonly VITE_APP_BASE_PORT: number + readonly VITE_APP_ENV: 'prod' | 'test' | 'dev' // 更多环境变量... } interface ImportMeta {