fix: bpmn-process-designer structuredClone => cloneDeep

This commit is contained in:
puhui999
2025-09-15 11:05:25 +08:00
parent 9e3b4461cf
commit 40e04f773d
7 changed files with 25 additions and 19 deletions

View File

@@ -2,6 +2,7 @@
import { inject, nextTick, ref, toRaw, watch } from 'vue';
import { IconifyIcon } from '@vben/icons';
import { cloneDeep } from '@vben/utils';
import {
Button,
@@ -60,9 +61,7 @@ const resetAttributesList = () => {
(current: any) => current.values,
);
// 复制 显示
elementPropertyList.value = structuredClone(
bpmnElementPropertyList.value ?? [],
);
elementPropertyList.value = cloneDeep(bpmnElementPropertyList.value ?? []);
};
const openAttributesForm = (
@@ -71,7 +70,7 @@ const openAttributesForm = (
) => {
editingPropertyIndex.value = index;
// @ts-ignore
propertyForm.value = index === -1 ? {} : structuredClone(attr);
propertyForm.value = index === -1 ? {} : cloneDeep(attr);
propertyFormModelVisible.value = true;
nextTick(() => {
if (attributeFormRef.value) attributeFormRef.value.clearValidate();