Commit d35d27d1 by xingyuv

fix: devmode

parent 004d214a
...@@ -55,7 +55,7 @@ import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 ...@@ -55,7 +55,7 @@ import 'highlight.js/styles/github.css' //导入代码高亮样式 新版
import Logger from '@/utils/Logger' import Logger from '@/utils/Logger'
// 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度 // 本地开发模式 全局引入 element-plus 样式,加快第一次进入速度
if (isDevMode() == true) { if (isDevMode()) {
import('element-plus/dist/index.css') import('element-plus/dist/index.css')
} }
......
export const isDevMode = () => { export const isDevMode = () => {
const dev = import.meta.env.VITE_DEV const dev = import.meta.env.VITE_DEV
if (dev && dev === true) { if (dev && dev === 'true') {
return true return true
} else { } else {
return false return false
......
...@@ -11,7 +11,7 @@ interface ImportMetaEnv { ...@@ -11,7 +11,7 @@ interface ImportMetaEnv {
readonly VITE_APP_TITLE: string readonly VITE_APP_TITLE: string
readonly VITE_PORT: number readonly VITE_PORT: number
readonly VITE_OPEN: string readonly VITE_OPEN: string
readonly VITE_DEV: boolean readonly VITE_DEV: string
readonly VITE_APP_CAPTCHA_ENABLE: string readonly VITE_APP_CAPTCHA_ENABLE: string
readonly VITE_APP_TENANT_ENABLE: string readonly VITE_APP_TENANT_ENABLE: string
readonly VITE_BASE_URL: string readonly VITE_BASE_URL: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment