2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

fix: 部分tips出错时未关闭

This commit is contained in:
耗子
2025-02-04 18:47:55 +08:00
parent dff6d27e04
commit 50ec26ef03
2 changed files with 11 additions and 8 deletions

View File

@@ -125,15 +125,19 @@ const onPageSizeChange = (pageSize: number) => {
onPageChange(1)
}
const handleRestore = async () => {
const handleRestore = () => {
messageReactive = window.$message.loading('恢复中...', {
duration: 0
})
await backup.restore(type.value, restoreModel.value.file, restoreModel.value.target).then(() => {
messageReactive?.destroy()
window.$message.success('恢复成功')
onPageChange(pagination.page)
})
backup
.restore(type.value, restoreModel.value.file, restoreModel.value.target)
.then(() => {
window.$message.success('恢复成功')
})
.finally(() => {
messageReactive?.destroy()
onPageChange(pagination.page)
})
}
const handleDelete = async (file: string) => {

View File

@@ -37,7 +37,6 @@ const handleUpdate = () => {
dashboard
.update()
.then(() => {
messageReactive?.destroy()
window.$message.success(t('homeUpdate.alerts.success'))
setTimeout(() => {
setTimeout(() => {
@@ -46,7 +45,7 @@ const handleUpdate = () => {
router.push({ name: 'dashboard-index' })
}, 2500)
})
.catch(() => {
.finally(() => {
messageReactive?.destroy()
})
},