fix: 地图删除去掉ElMessageBox确认(可能和el-dialog同样问题)
This commit is contained in:
@@ -124,12 +124,11 @@ function editMap(map: any) {
|
||||
function handleClick(path: string) { window.location.href = path }
|
||||
async function deleteMap(map: any) {
|
||||
try {
|
||||
await ElMessageBox.confirm(`确定删除「${map.title}」?`)
|
||||
await mapApi.delete ? await mapApi.delete(map.id) : ElMessage.warning("当前API不支持删除")
|
||||
await mapApi.delete(map.id)
|
||||
ElMessage.success("已删除")
|
||||
load()
|
||||
} catch (e: any) {
|
||||
if (e !== "cancel") ElMessage.error("删除失败")
|
||||
ElMessage.error("删除失败")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user