BpmnModeler如何只允许查看不允许编辑
twinkleSun opened this issue · 1 comments
twinkleSun commented
1、引用以下几个
import labelEditingProvider from 'bpmn-js/lib/features/label-editing/LabelEditingProvider'
import contextPadProvider from 'bpmn-js/lib/features/context-pad/ContextPadProvider'
import paletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider'
2、添加属性additionalModules,含义见注释
this.bpmnModeler = new BpmnModeler({
container: canvas,
//添加控制板
propertiesPanel: {
parent: '#js-properties-panel'
},
additionalModules: [
customModule,
{
paletteProvider:['value',''], // 禁用左面板
labelEditingProvider: ['value',''], // 禁用编辑
contextPadProvider: ['value',''] // 禁用点击出现的contextPad
}
]
})
contorlxys commented
我这么设置 为什么没有生效呢