dmn-js - DMN for the web

https://github.com/bpmn-io/dmn-js
https://github.com/bpmn-io/dmn-js-examples/tree/master/bundling

安装 dmn-js 依赖

npm install --save dmn-js

var DmnViewer = require(‘dmn-js’);

var dmnJS = new DmnViewer({
container: ‘#canvas’
});

dmnJS.importXML(pizzaDiagram, function(err) {

if (!err) {
console.log(‘success!’);

dmnJS
  .getActiveViewer()
    .get('canvas')
      .zoom('fit-viewport');

} else {
console.log(‘something went wrong:’, err);
}
});

作者:Jeebiz  创建时间:2020-03-21 23:56
 更新时间:2024-08-05 18:41