mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 02:55:07 +08:00
feat: vxe 暗黑模式
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import { App, unref } from 'vue'
|
||||
import { App, unref, watch } from 'vue'
|
||||
import XEUtils from 'xe-utils'
|
||||
import './index.scss'
|
||||
import './renderer'
|
||||
import { i18n } from '@/plugins/vueI18n'
|
||||
import { useAppStore } from '@/store/modules/app'
|
||||
import zhCN from 'vxe-table/lib/locale/lang/zh-CN'
|
||||
import enUS from 'vxe-table/lib/locale/lang/en-US'
|
||||
import {
|
||||
@ -45,6 +46,18 @@ import {
|
||||
Table
|
||||
} from 'vxe-table'
|
||||
|
||||
const appStore = useAppStore()
|
||||
watch(
|
||||
() => appStore.getIsDark,
|
||||
() => {
|
||||
if (appStore.getIsDark) {
|
||||
import('./theme/dark.scss')
|
||||
} else {
|
||||
import('./theme/light.scss')
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
// 全局默认参数
|
||||
VXETable.setup({
|
||||
size: 'medium', // 全局尺寸
|
||||
|
Reference in New Issue
Block a user