From 20d37c11b4e7a48a046e8b08b693d0191c4aaf77 Mon Sep 17 00:00:00 2001 From: viarotel Date: Tue, 14 Nov 2023 21:08:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Abnormal=20terminal=20the?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Terminal/components/TerminalDialog/index.vue | 2 +- src/store/theme/index.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Device/components/Terminal/components/TerminalDialog/index.vue b/src/components/Device/components/Terminal/components/TerminalDialog/index.vue index 1a00977b..a605294c 100644 --- a/src/components/Device/components/Terminal/components/TerminalDialog/index.vue +++ b/src/components/Device/components/Terminal/components/TerminalDialog/index.vue @@ -108,7 +108,7 @@ export default { }, computed: { invert() { - return this.$store.theme.value !== 'dark' + return !this.$store.theme.isDark }, }, watch: { diff --git a/src/store/theme/index.js b/src/store/theme/index.js index 58033ef4..6d8faa24 100644 --- a/src/store/theme/index.js +++ b/src/store/theme/index.js @@ -32,6 +32,8 @@ export const useThemeStore = defineStore({ await systemTheme('update', value) + this.isDark = await systemTheme('isDark') + await this.updateHtml(value) },