From 06d52deb60040d968c3f69d625f9cd52ecbdac4c Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期二, 22 四月 2025 11:48:56 +0800 Subject: [PATCH] 优化代码 --- src/layout/components/Settings/index.vue | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 0496918..7f2bcb7 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -110,10 +110,12 @@ settingsStore.theme = val; handleThemeStyle(val); } + function handleTheme(val) { settingsStore.sideTheme = val; sideTheme.value = val; } + function saveSetting() { proxy.$modal.loading("姝e湪淇濆瓨鍒版湰鍦帮紝璇风◢鍊�..."); let layoutSetting = { @@ -128,11 +130,13 @@ localStorage.setItem("layout-setting", JSON.stringify(layoutSetting)); setTimeout(proxy.$modal.closeLoading(), 1000) } + function resetSetting() { proxy.$modal.loading("姝e湪娓呴櫎璁剧疆缂撳瓨骞跺埛鏂帮紝璇风◢鍊�..."); localStorage.removeItem("layout-setting") setTimeout("window.location.reload()", 1000) } + function openSetting() { showSettings.value = true; } @@ -145,13 +149,15 @@ <style lang='scss' scoped> .setting-drawer-title { margin-bottom: 12px; - color: rgba(0, 0, 0, 0.85); + color: var(--el-text-color-primary, rgba(0, 0, 0, 0.85)); line-height: 22px; font-weight: bold; + .drawer-title { font-size: 14px; } } + .setting-drawer-block-checbox { display: flex; justify-content: flex-start; @@ -170,13 +176,6 @@ height: 48px; } - .custom-img { - width: 48px; - height: 38px; - border-radius: 5px; - box-shadow: 1px 1px 2px #898484; - } - .setting-drawer-block-checbox-selectIcon { position: absolute; top: 0; @@ -193,7 +192,7 @@ } .drawer-item { - color: rgba(0, 0, 0, 0.65); + color: var(--el-text-color-regular, rgba(0, 0, 0, 0.65)); padding: 12px 0; font-size: 14px; -- Gitblit v1.9.3