fix: 【bpm】bpmn设计器: 组件部分属性第一次失去焦点丢失数据问题 #204 【同步自 vue3 + element-plus】

This commit is contained in:
YunaiV
2025-12-07 12:26:03 +08:00
parent cc375100cb
commit 7366b948a3
4 changed files with 91 additions and 51 deletions

View File

@@ -1,5 +1,3 @@
import { toRaw } from 'vue';
const bpmnInstances = () => (window as any)?.bpmnInstances;
// 创建监听器实例
export function createListenerObject(options, isTask, prefix) {
@@ -76,7 +74,8 @@ export function updateElementExtensions(element, extensionList) {
const extensions = bpmnInstances().moddle.create('bpmn:ExtensionElements', {
values: extensionList,
});
bpmnInstances().modeling.updateProperties(toRaw(element), {
// 直接使用原始元素对象不需要toRaw包装
bpmnInstances().modeling.updateProperties(element, {
extensionElements: extensions,
});
}