bug修复
This commit is contained in:
@ -10,6 +10,8 @@ import { getChildLanes } from './../util/LaneUtil';
|
||||
|
||||
import { getTranslate } from './../util/TranslateUtil';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useBpmnStore } from '/@bpmn/store/bpmn';
|
||||
const { t } = useI18n();
|
||||
export default function ContextPadProvider(
|
||||
this: any,
|
||||
@ -216,6 +218,16 @@ ContextPadProvider.prototype.getContextPadEntries = function (element: {
|
||||
if (isAny(businessObject, ['bpmn:Lane', 'bpmn:Participant'])) {
|
||||
}
|
||||
if (is(businessObject, 'bpmn:FlowNode')) {
|
||||
const store = useBpmnStore();
|
||||
const { info } = storeToRefs(store);
|
||||
let isSecond = false
|
||||
let num = 0
|
||||
info.value.forEach((v) => {
|
||||
num++
|
||||
if (num==2&& v.id==element.id) {
|
||||
isSecond = true
|
||||
}
|
||||
})
|
||||
if (is(businessObject, 'bpmn:EventBasedGateway')) {
|
||||
} else if (
|
||||
isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')
|
||||
@ -267,7 +279,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element: {
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
group: is(element, 'bpmn:StartEvent') ? 'none' : 'event2',
|
||||
group: is(element, 'bpmn:StartEvent') || isSecond ? 'none' : 'event2',
|
||||
className: 'bpmn-icon-trash',
|
||||
title: getTranslate(t('删除')),
|
||||
action: {
|
||||
|
||||
Reference in New Issue
Block a user