const ElementTools: any = {} module.exports = ElementTools // 创建元素 ElementTools.createElement = function(elementType: string, properties: any, parent: any, BPMNModule: any) { const element = BPMNModule.get('moddle').create(elementType, properties); element.$parent = parent; element.values = []; return element; } // 获取元素属性 ElementTools.getProperties = function(element: any, type: string) { if (element && element.businessObject && element.businessObject[type]) { return element.businessObject[type] } return null; } // 新建扩展属性 // ElementTools.CreateExtensionElements = function(element: any, type: string) { // if (element && element.businessObject && element.businessObject[type]) { // return element.businessObject[type] // } // return null; // }