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 {