fix: devmode

This commit is contained in:
xingyuv 2023-03-07 10:01:29 +08:00
parent 004d214a11
commit d35d27d197
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ import 'highlight.js/styles/github.css' //导入代码高亮样式 新版
import Logger from '@/utils/Logger'
// 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度
if (isDevMode() == true) {
if (isDevMode()) {
import('element-plus/dist/index.css')
}

View File

@ -1,6 +1,6 @@
export const isDevMode = () => {
const dev = import.meta.env.VITE_DEV
if (dev && dev === true) {
if (dev && dev === 'true') {
return true
} else {
return false

2
types/env.d.ts vendored
View File

@ -11,7 +11,7 @@ interface ImportMetaEnv {
readonly VITE_APP_TITLE: string
readonly VITE_PORT: number
readonly VITE_OPEN: string
readonly VITE_DEV: boolean
readonly VITE_DEV: string
readonly VITE_APP_CAPTCHA_ENABLE: string
readonly VITE_APP_TENANT_ENABLE: string
readonly VITE_BASE_URL: string