From 1940b1b116c501bdcfbb1f1cf58686294c3c8d4b Mon Sep 17 00:00:00 2001 From: LiuHao Date: Sun, 21 Jan 2024 23:53:04 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BpmnDesign/hooks/usePanel.ts | 9 ++- .../BpmnDesign/hooks/useParseElement.ts | 3 +- .../BpmnDesign/panel/GatewayPanel.vue | 5 +- .../BpmnDesign/panel/ProcessPanel.vue | 5 +- .../BpmnDesign/panel/SequenceFlowPanel.vue | 5 +- .../BpmnDesign/panel/StartEndPanel.vue | 5 +- src/components/BpmnDesign/panel/TaskPanel.vue | 5 +- .../panel/property/ExecutionListener.vue | 17 ++--- .../panel/property/TaskListener.vue | 16 ++--- src/store/modules/modeler.ts | 12 ++-- .../{ => bpmn}/bpmn-moddle/bpmn-form.d.ts | 0 .../{ => bpmn}/bpmn-moddle/bpmn-instance.d.ts | 0 .../{ => bpmn}/declares/bpmn-js-bpmnlint.d.ts | 0 .../declares/bpmn-js-toke-simulation.d.ts | 0 src/types/{ => bpmn}/declares/bpmn-js.d.ts | 0 .../{ => bpmn}/declares/bpmn-moddle.d.ts | 0 .../declares/camunda-bpmn-moddle.d.ts | 0 .../declares/diagram-js-direct-editing.d.ts | 0 .../{ => bpmn}/declares/object-refs.d.ts | 0 src/types/{bpmn.d.ts => bpmn/design.d.ts} | 0 src/types/{ => bpmn}/editor/global.d.ts | 0 src/types/{ => bpmn}/editor/settings.d.ts | 2 +- src/types/{ => bpmn}/editor/utils.d.ts | 0 src/types/bpmn/index.d.ts | 13 ++++ src/types/{declares => bpmn}/moddle.d.ts | 71 +------------------ 25 files changed, 54 insertions(+), 114 deletions(-) rename src/types/{ => bpmn}/bpmn-moddle/bpmn-form.d.ts (100%) rename src/types/{ => bpmn}/bpmn-moddle/bpmn-instance.d.ts (100%) rename src/types/{ => bpmn}/declares/bpmn-js-bpmnlint.d.ts (100%) rename src/types/{ => bpmn}/declares/bpmn-js-toke-simulation.d.ts (100%) rename src/types/{ => bpmn}/declares/bpmn-js.d.ts (100%) rename src/types/{ => bpmn}/declares/bpmn-moddle.d.ts (100%) rename src/types/{ => bpmn}/declares/camunda-bpmn-moddle.d.ts (100%) rename src/types/{ => bpmn}/declares/diagram-js-direct-editing.d.ts (100%) rename src/types/{ => bpmn}/declares/object-refs.d.ts (100%) rename src/types/{bpmn.d.ts => bpmn/design.d.ts} (100%) rename src/types/{ => bpmn}/editor/global.d.ts (100%) rename src/types/{ => bpmn}/editor/settings.d.ts (96%) rename src/types/{ => bpmn}/editor/utils.d.ts (100%) create mode 100644 src/types/bpmn/index.d.ts rename src/types/{declares => bpmn}/moddle.d.ts (74%) diff --git a/src/components/BpmnDesign/hooks/usePanel.ts b/src/components/BpmnDesign/hooks/usePanel.ts index 8f92c53..35e5ff5 100644 --- a/src/components/BpmnDesign/hooks/usePanel.ts +++ b/src/components/BpmnDesign/hooks/usePanel.ts @@ -1,8 +1,7 @@ -import { Ref } from 'vue'; import showConfig from '@/components/BpmnDesign/assets/showConfig'; - +import { Moddle, Modeler, Modeling } from 'bpmn'; interface Options { - modeler: any; + modeler: Modeler; element: any; } @@ -17,7 +16,7 @@ export default (ops: Options) => { const config = computed(() => showConfig[elementType.value] || {}); const updateProperties = (properties: any) => { - const modeling = modeler.get('modeling'); + const modeling = modeler.get('modeling'); modeling.updateProperties(element, properties); }; @@ -33,7 +32,7 @@ export default (ops: Options) => { }; const documentationChange = (newVal: string) => { if (newVal) { - const documentationElement = modeler.get('moddle').create('bpmn:Documentation', { text: newVal }); + const documentationElement = modeler.get('moddle').create('bpmn:Documentation', { text: newVal }); updateProperties({ documentation: [documentationElement] }); } else { updateProperties({ documentation: null }); diff --git a/src/components/BpmnDesign/hooks/useParseElement.ts b/src/components/BpmnDesign/hooks/useParseElement.ts index c5fb419..7945d61 100644 --- a/src/components/BpmnDesign/hooks/useParseElement.ts +++ b/src/components/BpmnDesign/hooks/useParseElement.ts @@ -1,8 +1,9 @@ import { Ref } from 'vue'; import usePanel from '@/components/BpmnDesign/hooks/usePanel'; +import { Modeler } from 'bpmn'; interface Options { - modeler: any; + modeler: Modeler; element: any; } diff --git a/src/components/BpmnDesign/panel/GatewayPanel.vue b/src/components/BpmnDesign/panel/GatewayPanel.vue index 0877aa6..53c55bb 100644 --- a/src/components/BpmnDesign/panel/GatewayPanel.vue +++ b/src/components/BpmnDesign/panel/GatewayPanel.vue @@ -16,12 +16,13 @@