summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpany <[email protected]>2023-12-12 20:45:02 +0800
committerpany <[email protected]>2023-12-12 20:45:02 +0800
commit03928dfce54a84ef3ae3d249824a558d4f6b4ff6 (patch)
tree6ff04b541b0609f09b0b1844228e3fda28ff9f30
parentaa987129841f375059e947494d8a80480fe576e6 (diff)
types: 隐藏无须处理的 ts 报错
-rw-r--r--src/store/modules/settings.ts1
1 files changed, 1 insertions, 0 deletions
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, () => {