From 4f7f0be6b75d5e54b13eb84afba3f4b052030f9f Mon Sep 17 00:00:00 2001 From: BTMuli Date: Fri, 14 Apr 2023 19:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20fix(sidebar):=20=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E6=B7=BB=E5=8A=A0=E5=AD=90=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/t-sidebar.vue | 27 ++++++++++++++++++++++----- src/store/modules/app.ts | 6 ++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/components/t-sidebar.vue b/src/components/t-sidebar.vue index 7ec697a6..eb85d5be 100644 --- a/src/components/t-sidebar.vue +++ b/src/components/t-sidebar.vue @@ -80,21 +80,38 @@ - + - + + + + + + +
@@ -129,7 +146,7 @@ const open = computed({ }, set (value: string[]) { appStore.sidebar.submenu.mihoyo = value.includes("mihoyo"); - appStore.sidebar.submenu.database = value.includes("database"); + appStore.sidebar.submenu.wiki = value.includes("wiki"); }, }); diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index e16f50cf..a5a1ac57 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -33,7 +33,7 @@ export const useAppStore = defineStore( // 米游社 mihoyo: false, // 数据库 - database: false, + wiki: false, }, }); // 开发者模式 @@ -60,11 +60,13 @@ export const useAppStore = defineStore( function init (): void { loading.value = false; devMode.value = false; + sidebar.submenu.mihoyo = false; + sidebar.submenu.wiki = false; } function getSubmenu (): string[] { const open = []; - if (sidebar.submenu.database) open.push("database"); + if (sidebar.submenu.wiki) open.push("wiki"); if (sidebar.submenu.mihoyo) open.push("mihoyo"); return open; }