From ce24937ba036260b74e99013fd2ef5dbaf6d1f64 Mon Sep 17 00:00:00 2001 From: v6ole Date: Mon, 13 Jul 2026 01:45:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=B9=E9=80=A0=20theme=20store=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F=E5=8F=8C?= =?UTF-8?q?=E9=80=89=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- frontend/src/components/DesktopLayout.vue | 11 ++-- frontend/src/stores/theme.ts | 57 ++++++++++++++----- frontend/src/views/desktop/CustomerManage.vue | 2 +- frontend/src/views/desktop/KeyVisits.vue | 2 +- frontend/src/views/desktop/Leaves.vue | 2 +- frontend/src/views/desktop/MiniBusiness.vue | 2 +- frontend/src/views/desktop/Settings.vue | 31 ++++++++-- frontend/src/views/desktop/WorkPlans.vue | 2 +- 8 files changed, 79 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/DesktopLayout.vue b/frontend/src/components/DesktopLayout.vue index 153b097..071e965 100644 --- a/frontend/src/components/DesktopLayout.vue +++ b/frontend/src/components/DesktopLayout.vue @@ -62,8 +62,7 @@ const roleLabel = computed(() => { }) function cycleTheme() { - const next = themeStore.currentTheme === 'editorial' ? 'light' : 'editorial' - themeStore.setTheme(next) + themeStore.toggleMode() } @@ -108,11 +107,11 @@ function cycleTheme() {
-
- +
+ 模式 + +
+
+ +
@@ -395,7 +409,12 @@ async function handleImportPreview() { .setting-label { font-family: var(--font-body); font-size: 13px; color: var(--ink); } /* ── Theme Selector ── */ -.theme-options { display: flex; gap: 16px; } +.theme-options { display: flex; flex-direction: column; gap: 12px; } +.theme-mode-row { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--warm-border); margin-bottom: 4px; } +.theme-mode-label { font-family: var(--font-heading); font-size: 13px; color: var(--warm-gray); } +.theme-mode-btn { font-family: var(--font-body); font-size: 14px; cursor: pointer; padding: 6px 16px; border: 1px solid var(--warm-border); border-radius: 6px; background: var(--c-primary-bg); color: var(--c-text); transition: all var(--transition); } +.theme-mode-btn:hover { border-color: var(--gold); } +.theme-sub-options { display: flex; gap: 12px; padding-left: 4px; } .theme-opt { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 16px; border: 1px solid var(--warm-border); transition: all var(--transition); } .theme-opt:hover { border-color: var(--ink); } .theme-opt--active { border-color: var(--ink); background: var(--c-primary-bg); } diff --git a/frontend/src/views/desktop/WorkPlans.vue b/frontend/src/views/desktop/WorkPlans.vue index d3c929e..c9a72a9 100644 --- a/frontend/src/views/desktop/WorkPlans.vue +++ b/frontend/src/views/desktop/WorkPlans.vue @@ -31,7 +31,7 @@ const searchText = ref('') function onSearch() { loadPlans() } -const isLight = computed(() => themeStore.currentTheme === 'light') +const isLight = computed(() => themeStore.mode === 'light') const managerOptions = computed(() => { const seen = new Set()