chore: 规范不符合eslint校验规则的代码

This commit is contained in:
Siyu Kong
2023-02-21 18:29:27 +08:00
parent 2ec6978400
commit f2f564dc0c
24 changed files with 127 additions and 97 deletions

View File

@@ -22,13 +22,14 @@ const props = defineProps({
})
const documentation = ref('')
const bpmnElement = ref()
const bpmnInstances = () => (window as any).bpmnInstances
const updateDocumentation = () => {
;(bpmnElement.value && bpmnElement.value.id === props.id) ||
(bpmnElement.value = (window as any).bpmnInstances.elementRegistry.get(props.id))
const documentations = window.bpmnInstances.bpmnFactory.create('bpmn:Documentation', {
(bpmnElement.value = bpmnInstances().elementRegistry.get(props.id))
const documentations = bpmnInstances().bpmnFactory.create('bpmn:Documentation', {
text: documentation.value
})
window.bpmnInstances.modeling.updateProperties(toRaw(bpmnElement.value), {
bpmnInstances().modeling.updateProperties(toRaw(bpmnElement.value), {
documentation: [documentations]
})
}
@@ -41,7 +42,7 @@ watch(
(id) => {
if (id && id.length) {
nextTick(() => {
const documentations = window.bpmnInstances.bpmnElement.businessObject?.documentation
const documentations = bpmnInstances().bpmnElement.businessObject?.documentation
documentation.value = documentations && documentations.length ? documentations[0].text : ''
})
} else {