This commit is contained in:
gexinzhineng/gxzn27
2023-01-28 15:30:52 +08:00
parent a03f702fa1
commit 3ce663c7a5
9 changed files with 89 additions and 63 deletions

View File

@ -25,13 +25,16 @@ const props = defineProps({
const documentation = ref('')
const bpmnElement = ref()
const updateDocumentation = () => {
;(bpmnElement.value && bpmnElement.value.id === props.id) ||
(bpmnElement.value = window.bpmnInstances.elementRegistry.get(props.id))
const documentation = window.bpmnInstances.bpmnFactory.create('bpmn:Documentation', {
if (bpmnElement.value && bpmnElement.value.id === props.id) {
bpmnElement.value = window.bpmnInstances.elementRegistry.get(props.id)
}
// (bpmnElement.value && bpmnElement.value.id === props.id) ||
// (bpmnElement.value = window.bpmnInstances.elementRegistry.get(props.id))
const documentations = window.bpmnInstances.bpmnFactory.create('bpmn:Documentation', {
text: documentation.value
})
window.bpmnInstances.modeling.updateProperties(bpmnElement.value, {
documentation: [documentation]
documentation: [documentations]
})
}
onBeforeUnmount(() => {