perf: settings 页面的一些提示

This commit is contained in:
Junyan Qin 2024-10-16 22:24:15 +08:00
parent c3dfbb64a6
commit 5f998a0852
No known key found for this signature in database
GPG Key ID: 8AC0BEFE1743A015

View File

@ -218,6 +218,7 @@ const saveAndApply = () => {
}
fetchCurrentManagerData(currentManager.value.name)
modified.value = false
snackbar.success('应用成功')
}).catch(error => {
snackbar.error(error)
})
@ -229,10 +230,14 @@ const reset = () => {
currentManagerDataEditorString.value = JSON.stringify(currentManager.value.data, null, 2)
isJsonValid.value = true
errorMessage.value = ''
modified.value = false
snackbar.success('重置成功')
} else {
fetchCurrentManagerData(currentManager.value.name)
fetchCurrentManagerData(currentManager.value.name).then(() => {
snackbar.success('重置成功')
modified.value = false
})
}
modified.value = false
}
onMounted(async () => {