From 137c3f46a36f7d8bc045e8d2dd780a0746d720a7 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Mon, 13 Oct 2025 16:30:39 +0800 Subject: [PATCH] fix: error --- .../designer/plugins/content-pad/contentPadProvider.js | 6 ++---- .../plugins/extension-moddle/activiti/activitiExtension.js | 6 ++---- .../designer/plugins/extension-moddle/camunda/extension.js | 6 +++--- .../plugins/extension-moddle/flowable/flowableExtension.js | 6 ++---- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/content-pad/contentPadProvider.js b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/content-pad/contentPadProvider.js index 1c501a680..638317fb8 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/content-pad/contentPadProvider.js +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/content-pad/contentPadProvider.js @@ -1,5 +1,3 @@ -import { forEach, isArray } from '@vben/utils'; - import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil'; import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil'; import { isEventSubProcess, isExpanded } from 'bpmn-js/lib/util/DiUtil'; @@ -407,7 +405,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { // delete element entry, only show if allowed by rules let deleteAllowed = rules.allowed('elements.delete', { elements: [element] }); - if (isArray(deleteAllowed)) { + if (Array.isArray(deleteAllowed)) { // was the element returned as a deletion candidate? deleteAllowed = deleteAllowed[0] === element; } @@ -435,7 +433,7 @@ function isEventType(eventBo, type, definition) { let isDefinition = false; const definitions = eventBo.eventDefinitions || []; - forEach(definitions, (def) => { + definitions.forEach((def) => { if (def.$type === definition) { isDefinition = true; } diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/activiti/activitiExtension.js b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/activiti/activitiExtension.js index d256eb297..54d506019 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/activiti/activitiExtension.js +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/activiti/activitiExtension.js @@ -1,5 +1,3 @@ -import { some } from '@vben/utils'; - const ALLOWED_TYPES = { FailedJobRetryTimeCycle: [ 'bpmn:StartEvent', @@ -26,14 +24,14 @@ function exists(element) { function includesType(collection, type) { return ( exists(collection) && - some(collection, (element) => { + collection.some((element) => { return is(element, type); }) ); } function anyType(element, types) { - return some(types, (type) => { + return types.some((type) => { return is(element, type); }); } diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/camunda/extension.js b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/camunda/extension.js index cc5d2102a..3956be680 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/camunda/extension.js +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/camunda/extension.js @@ -1,4 +1,4 @@ -import { isFunction, isObject, some } from '@vben/utils'; +import { isFunction, isObject } from '@vben/utils'; const WILDCARD = '*'; @@ -113,7 +113,7 @@ function is(element, type) { } function isAny(element, types) { - return some(types, (t) => { + return types.some((t) => { return is(element, t); }); } @@ -146,7 +146,7 @@ function isAllowedInParent(property, parent) { } // (2) check wether property has parent of allowed type - return some(allowedIn, (type) => { + return allowedIn.some((type) => { return getParent(parent, type); }); } diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/flowable/flowableExtension.js b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/flowable/flowableExtension.js index d7d80dede..25fa1cc8e 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/flowable/flowableExtension.js +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/extension-moddle/flowable/flowableExtension.js @@ -1,5 +1,3 @@ -import { some } from '@vben/utils'; - const ALLOWED_TYPES = { FailedJobRetryTimeCycle: [ 'bpmn:StartEvent', @@ -26,14 +24,14 @@ function exists(element) { function includesType(collection, type) { return ( exists(collection) && - some(collection, (element) => { + collection.some((element) => { return is(element, type); }) ); } function anyType(element, types) { - return some(types, (type) => { + return types.some((type) => { return is(element, type); }); }