fix: devmode
This commit is contained in:
parent
004d214a11
commit
d35d27d197
@ -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')
|
||||
}
|
||||
|
||||
|
@ -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
2
types/env.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user