bugfix: 删除sketch

This commit is contained in:
2026-03-31 11:39:42 +08:00
parent d6f1985cb0
commit fcc5fd66f8
4 changed files with 62 additions and 34 deletions

View File

@@ -236,15 +236,21 @@
MyEvent.emit('quote', url)
}
const handleClickDelete = (item: string | Object) => {
deleteSketchFlowCanvas({
id: Object.keys(item)[0],
versionNodeId: projectStore.state.nodeId
}).then((res) => {
if (res) {
ElMessage.success(t('agent.deleteSuccess'))
emits('deleteSketch', Object.keys(item)[0])
}
const handleClickDelete = (item: { id: string; url: string }) => {
ElMessageBox.confirm(t('agent.deleteSketchTip'), t('agent.confirm'), {
confirmButtonText: t('agent.confirm'),
cancelButtonText: t('agent.cancel'),
type: 'warning'
}).then(() => {
deleteSketchFlowCanvas({
id: item.id,
versionNodeId: projectStore.state.nodeId
}).then((res) => {
if (res) {
ElMessage.success(t('agent.deleteSuccess'))
emits('deleteSketch', item.id)
}
})
})
}