mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix(self-check): change fixing state management from reactive to ref
This commit is contained in:
parent
06121ef515
commit
a30f2c5657
1 changed files with 4 additions and 4 deletions
|
@ -52,13 +52,13 @@ export const useSelfCheckStore = defineStore('selfCheck', () => {
|
|||
trailing: false,
|
||||
})
|
||||
|
||||
const fixing = reactive({})
|
||||
const fixing = ref<Record<string, boolean>>({})
|
||||
|
||||
async function fix(taskName: string) {
|
||||
if (fixing[taskName])
|
||||
if (fixing.value[taskName])
|
||||
return
|
||||
|
||||
fixing[taskName] = true
|
||||
fixing.value[taskName] = true
|
||||
try {
|
||||
await selfCheck.fix(taskName)
|
||||
await nextTick()
|
||||
|
@ -67,7 +67,7 @@ export const useSelfCheckStore = defineStore('selfCheck', () => {
|
|||
}, 1000)
|
||||
}
|
||||
finally {
|
||||
fixing[taskName] = false
|
||||
fixing.value[taskName] = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue