fix: 修复对话框在错误时不关闭的问题

- 在UserManagement.vue的handleModalOk中添加错误时关闭对话框
- 在RoleManagement.vue的handleModalOk中添加错误时关闭对话框
- 确保即使API调用失败,对话框也会正确关闭
This commit is contained in:
张翔
2026-04-04 11:35:15 +08:00
parent f321859f9b
commit f7e7cfc78d
3 changed files with 110 additions and 0 deletions
@@ -381,6 +381,7 @@ const handleModalOk = async () => {
modalVisible.value = false
fetchData()
} catch (error) {
modalVisible.value = false
if (error !== 'cancel') {
handleApiError(error)
}
@@ -398,6 +398,7 @@ const handleModalOk = async () => {
modalVisible.value = false
fetchData()
} catch (error) {
modalVisible.value = false
if (error !== 'cancel') {
handleApiError(error)
}