UNPKG

bpmn-vue-iview

Version:

基于 'vue' 、'bpmn.io@7.0' 、 'iview@4.7' 和 'workflow-bpmn-modeler@0.2.8',实现 flowable 的 modeler 模型设计器

84 lines (68 loc) 1.87 kB
English | [简体中文](./README_CN.md) # bpmn-vue-iview [![NPM Version](http://img.shields.io/npm/v/workflow-bpmn-modeler.svg?style=flat)](https://www.npmjs.org/package/workflow-bpmn-modeler) [![NPM Downloads](https://img.shields.io/npm/dm/workflow-bpmn-modeler.svg?style=flat)](https://www.npmjs.org/package/workflow-bpmn-modeler) ![](https://img.shields.io/badge/license-MIT-000000.svg) 🔥 This project implements flowable's workflow designer based on 'vue' , 'bpmn.io@7.0' , 'iview@4.7' and 'workflow-bpmn-modeler@0.2.8' ## Preview 📟 ![20200930030243](https://cdn.jsdelivr.net/gh/goldsubmarine/cdn@master/blog/20200930030243.png) ## Install ⏳ ```bash # Install yarn add bpmn-vue-iview ``` ## How to use 👣 ```vue <template> <div> <bpmn-modeler ref="refNode" :xml="xml" :users="users" :groups="groups" :categorys="categorys" :is-view="false" @save="save" /> </div> </template> <script> import bpmnModeler from "bpmn-vue-iview"; export default { components: { bpmnModeler, }, data() { return { xml: "", // Query the xml users: [ { name: "The Beatles", id: "1" }, { name: "The Rolling Stones", id: "2" }, { name: "Pink Floyed", id: "3" }, ], groups: [ { name: "Folk Music", id: "4" }, { name: "Rock Music", id: "5" }, { name: "Classical Music", id: "6" }, ], categorys: [ { name: "Music", id: "7" }, { name: "Articles", id: "8" }, ], }; }, methods: { getModelDetail() { // Send request to get xml // this.xml = response.xml }, save(data) { console.log(data); // { process: {...}, xml: '...', svg: '...' } }, }, }; </script> ``` ## License 📄 [MIT](http://opensource.org/licenses/MIT) Copyright (c) 2021-present, jinyangjie