默认固定为亮色模式
This commit is contained in:
@@ -7,10 +7,18 @@ import useSettingsStore from '@/store/modules/settings'
|
||||
import { handleThemeStyle } from '@/utils/theme'
|
||||
import useProductStore from '@/store/modules/product'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { useDark } from '@vueuse/core'
|
||||
|
||||
const isDark = useDark()
|
||||
|
||||
onMounted(() => {
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
|
||||
console.log(isDark.value)
|
||||
if (isDark.value) {
|
||||
useSettingsStore().toggleTheme()
|
||||
}
|
||||
handleThemeStyle(useSettingsStore().theme)
|
||||
if (getToken()) {
|
||||
useProductStore().fetchProductMap()
|
||||
|
||||
BIN
gear-ui3/src/assets/images/right.png
Normal file
BIN
gear-ui3/src/assets/images/right.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 KiB |
@@ -10,12 +10,12 @@
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="主题模式" effect="dark" placement="bottom">
|
||||
<!-- <el-tooltip content="主题模式" effect="dark" placement="bottom">
|
||||
<div class="right-menu-item hover-effect theme-switch-wrapper" @click="toggleTheme">
|
||||
<svg-icon v-if="settingsStore.isDark" icon-class="sunny" />
|
||||
<svg-icon v-if="!settingsStore.isDark" icon-class="moon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</el-tooltip> -->
|
||||
|
||||
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
|
||||
@@ -7,7 +7,7 @@ export default {
|
||||
/**
|
||||
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
||||
*/
|
||||
sideTheme: 'theme-light',
|
||||
sideTheme: 'theme-dark',
|
||||
|
||||
/**
|
||||
* 是否系统布局配置
|
||||
|
||||
Reference in New Issue
Block a user