mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-05-14 00:08:04 +08:00
fix: loading status not reset when clean failed
This commit is contained in:
parent
c01be7fcca
commit
cff70bc23c
@ -47,14 +47,18 @@ const loadHistory = () => {
|
||||
const cleanHistory = async () => {
|
||||
$dialog.warning(i18n.t('confirm_clean_log'), () => {
|
||||
data.loading = true
|
||||
connectionStore.cleanCmdHistory().then((success) => {
|
||||
if (success) {
|
||||
data.history = []
|
||||
connectionStore
|
||||
.cleanCmdHistory()
|
||||
.then((success) => {
|
||||
if (success) {
|
||||
data.history = []
|
||||
tableRef.value?.scrollTo({ top: 0 })
|
||||
$message.success(i18n.t('success'))
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
data.loading = false
|
||||
tableRef.value?.scrollTo({ top: 0 })
|
||||
$message.success(i18n.t('success'))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user