框架重构

frame
lijingjia 3 days ago
parent 91662a2ce0
commit b98bc30c41

@ -1,3 +1,8 @@
<!--
* @Desc:
* @Author: lijj
* @Date: 2024-05-13 09:06:51
-->
<template> <template>
<div v-if="getShowDarkModeToggle" :class="getClass" @click="toggleDarkMode"> <div v-if="getShowDarkModeToggle" :class="getClass" @click="toggleDarkMode">
<div :class="`${prefixCls}-inner`"></div> <div :class="`${prefixCls}-inner`"></div>
@ -27,6 +32,7 @@
]) ])
function toggleDarkMode() { function toggleDarkMode() {
console.log(getDarkMode)
const darkMode = getDarkMode.value === ThemeEnum.DARK ? ThemeEnum.LIGHT : ThemeEnum.DARK const darkMode = getDarkMode.value === ThemeEnum.DARK ? ThemeEnum.LIGHT : ThemeEnum.DARK
setDarkMode(darkMode) setDarkMode(darkMode)
updateDarkTheme(darkMode) updateDarkTheme(darkMode)

@ -378,11 +378,11 @@ export default defineComponent({
width={330} width={330}
class="setting-drawer" class="setting-drawer"
> >
{/* {unref(getShowDarkModeToggle) && <Divider>{() => t('layout.setting.darkMode')}</Divider>} {unref(getShowDarkModeToggle) && <Divider>{() => t('layout.setting.sysTheme')}</Divider>}
{unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />} */} {/* {unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />} */}
<Divider>{() => t('layout.setting.sysTheme')}</Divider> {/* <Divider>{() => t('layout.setting.sysTheme')}</Divider> */}
{/* {renderMainTheme()} {renderMainTheme()}
<Divider>{() => t('layout.setting.headerTheme')}</Divider> {/* <Divider>{() => t('layout.setting.headerTheme')}</Divider>
{renderHeaderTheme()} {renderHeaderTheme()}
<Divider>{() => t('layout.setting.sidebarTheme')}</Divider> <Divider>{() => t('layout.setting.sidebarTheme')}</Divider>
{renderSiderTheme()} {renderSiderTheme()}

Loading…
Cancel
Save