fix(self-check): change fixing state management from reactive to ref

This commit is contained in:
Jacky 2025-05-04 03:00:52 +00:00
parent 06121ef515
commit a30f2c5657
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -52,13 +52,13 @@ export const useSelfCheckStore = defineStore('selfCheck', () => {
trailing: false, trailing: false,
}) })
const fixing = reactive({}) const fixing = ref<Record<string, boolean>>({})
async function fix(taskName: string) { async function fix(taskName: string) {
if (fixing[taskName]) if (fixing.value[taskName])
return return
fixing[taskName] = true fixing.value[taskName] = true
try { try {
await selfCheck.fix(taskName) await selfCheck.fix(taskName)
await nextTick() await nextTick()
@ -67,7 +67,7 @@ export const useSelfCheckStore = defineStore('selfCheck', () => {
}, 1000) }, 1000)
} }
finally { finally {
fixing[taskName] = false fixing.value[taskName] = false
} }
} }