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 }
|
function handleClick(path: string) { window.location.href = path }
|
||||||
async function deleteMap(map: any) {
|
async function deleteMap(map: any) {
|
||||||
try {
|
try {
|
||||||
await ElMessageBox.confirm(`确定删除「${map.title}」?`)
|
await mapApi.delete(map.id)
|
||||||
await mapApi.delete ? await mapApi.delete(map.id) : ElMessage.warning("当前API不支持删除")
|
|
||||||
ElMessage.success("已删除")
|
ElMessage.success("已删除")
|
||||||
load()
|
load()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
if (e !== "cancel") ElMessage.error("删除失败")
|
ElMessage.error("删除失败")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user