Fixed the loading could not be closed correctly (#77)

* Fix hide loading before show it

* Release hotfix
This commit is contained in:
Hayden
2024-12-06 22:23:11 +08:00
committed by GitHub
parent 00d23ff74f
commit 5c017137b0
3 changed files with 11 additions and 11 deletions

View File

@@ -42,14 +42,14 @@ export const useModels = defineStore('models', (store) => {
const models = ref<Record<string, Model[]>>({})
const refreshModels = async (folder: string) => {
loading.show()
loading.show(folder)
return request(`/models/${folder}`)
.then((resData) => {
models.value[folder] = resData
return resData
})
.finally(() => {
loading.hide()
loading.hide(folder)
})
}