From 03928dfce54a84ef3ae3d249824a558d4f6b4ff6 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Tue, 12 Dec 2023 20:45:02 +0800 Subject: [PATCH] =?UTF-8?q?types:=20=E9=9A=90=E8=97=8F=E6=97=A0=E9=A1=BB?= =?UTF-8?q?=E5=A4=84=E7=90=86=E7=9A=84=20ts=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/settings.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index 0a1641f..40de0d1 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -17,6 +17,7 @@ export const useSettingsStore = defineStore("settings", () => { for (const [key, value] of Object.entries(layoutSettings)) { // 使用类型断言来指定 key 的类型,将 value 包装在 ref 函数中,创建一个响应式变量 const refValue = ref(value) + // @ts-ignore state[key as SettingsStoreKey] = refValue // 监听每个响应式变量 watch(refValue, () => {