mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 11:35:06 +08:00
报错基本解决,数据绑定还有些错误
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="ElementOtherConfig">
|
||||
import { ref, watch, nextTick, onBeforeUnmount } from 'vue'
|
||||
import { ref, watch, nextTick, onBeforeUnmount, toRaw } from 'vue'
|
||||
import { ElInput } from 'element-plus'
|
||||
const props = defineProps({
|
||||
id: String
|
||||
@ -25,15 +25,26 @@ const props = defineProps({
|
||||
const documentation = ref('')
|
||||
const bpmnElement = ref()
|
||||
const updateDocumentation = () => {
|
||||
console.log(props, 'props')
|
||||
console.log(window, 'window')
|
||||
console.log(
|
||||
window.bpmnInstances.elementRegistry.get(props.id),
|
||||
'window.bpmnInstances.elementRegistry.get(props.id)'
|
||||
)
|
||||
console.log(bpmnElement.value, 'bpmnElement.value ')
|
||||
if (bpmnElement.value && bpmnElement.value.id === props.id) {
|
||||
bpmnElement.value = window.bpmnInstances.elementRegistry.get(props.id)
|
||||
bpmnElement.value = window?.bpmnInstances.elementRegistry.get(props.id)
|
||||
}
|
||||
console.log(
|
||||
bpmnElement.value,
|
||||
'bpmnElement.value bpmnElement.value bpmnElement.value bpmnElement.value bpmnElement.value bpmnElement.value '
|
||||
)
|
||||
// (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, {
|
||||
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
|
||||
documentation: [documentations]
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user