|
@@ -13,6 +13,7 @@ const WorkflowStore = useWorkflowStore()
|
|
|
const emits = defineEmits([])
|
|
|
const props = defineProps({
|
|
|
data: <any>{},
|
|
|
+ delFlag: <any>{},
|
|
|
onClose: <any>{},
|
|
|
})
|
|
|
const {proxy}: any = getCurrentInstance()
|
|
@@ -20,13 +21,16 @@ const {proxy}: any = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
|
})
|
|
|
const onDel = () => {
|
|
|
- WorkflowStore.graph.startBatch(GraphHistoryStep.NodeDel)
|
|
|
- WorkflowStore.graph.removeEdge(props.data.id)
|
|
|
- WorkflowStore.graph.removeNode(props.data.id)
|
|
|
- setTimeout(() => {
|
|
|
- WorkflowStore.graph.stopBatch(GraphHistoryStep.NodeDel)
|
|
|
- }, 100)
|
|
|
- props.onClose(null, true)
|
|
|
+ if (props.delFlag) {
|
|
|
+ WorkflowStore.graph.startBatch(props.delFlag)
|
|
|
+ WorkflowStore.graph.removeEdge(props.data.id)
|
|
|
+ WorkflowStore.graph.removeNode(props.data.id)
|
|
|
+ setTimeout(() => {
|
|
|
+ WorkflowStore.graph.stopBatch(props.delFlag)
|
|
|
+ }, 100)
|
|
|
+ props.onClose(null, true)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|