From 87f514a82a9bd2cb6dabfbf2824756542ef6860d Mon Sep 17 00:00:00 2001 From: YangFong Date: Sun, 25 Aug 2024 13:40:15 +0800 Subject: [PATCH 1/2] fix: uncleared history --- src/stores/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/index.js b/src/stores/index.js index e78586255..d91150196 100644 --- a/src/stores/index.js +++ b/src/stores/index.js @@ -149,6 +149,10 @@ export const useStore = defineStore(`store`, () => { }, ], }) + onMounted(() => { + // 清空过往历史记录 + cssContent.value = `` + }) const getCurrentTab = () => cssContentConfig.value.tabs.find((tab) => { return tab.name === cssContentConfig.value.active }) From 1260127512561ec8413fbec4bb3a4daa2b0fa2a0 Mon Sep 17 00:00:00 2001 From: YangFong Date: Sun, 25 Aug 2024 13:40:41 +0800 Subject: [PATCH 2/2] chore: unified format --- src/stores/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/index.js b/src/stores/index.js index d91150196..264616051 100644 --- a/src/stores/index.js +++ b/src/stores/index.js @@ -139,11 +139,11 @@ export const useStore = defineStore(`store`, () => { // 自定义 CSS 内容 const cssContent = useStorage(`__css_content`, DEFAULT_CSS_CONTENT) const cssContentConfig = useStorage(addPrefix(`css_content_config`), { - active: `方案 1`, + active: `方案1`, tabs: [ { - title: `方案 1`, - name: `方案 1`, + title: `方案1`, + name: `方案1`, // 兼容之前的方案 content: cssContent.value || DEFAULT_CSS_CONTENT, },