Coder Social home page Coder Social logo

jtyjty99999 / wfd-vue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guozhaolong/wfd-vue

0.0 0.0 0.0 1.98 MB

flowable workflow designer for Vue base on @antv/g6

Home Page: https://guozhaolong.github.io/wfd-vue/

JavaScript 66.26% HTML 0.34% Vue 33.40%

wfd-vue's Introduction

Workflow Designer for Vue

NPM Version NPM Downloads

image

Online Demo

https://guozhaolong.github.io/wfd-vue/

Usage

<template>
  <div id="app">
    <wfd-vue ref="wfd" :data="demoData" :height="600" :users="candidateUsers" :groups="candidateGroups" :categorys="categorys" :lang="lang" />
  </div>
</template>

<script>
import WfdVue from 'wfd-vue'
export default {
  name: 'app',
  components:{
    WfdVue
  },
  data () {
    return {
      lang: "zh",
      demoData: {...},
      candidateUsers: [...],
      candidateGroups: [...],
      categorys: [...]
    }
  }
}
</script>

API

属性
  • data: 初始化数据
  • height: 画布高度
  • mode: view为只读,edit为可编辑
  • lang: zh为中文,en为英文
  • isView: 是否为预览模式(隐藏工具栏和属性栏)
  • users: 选择审批人时对应的数据,数组内对象以id为键,name为值
  • groups: 选择审批组时对应的数据,数组内对象以id为键,name为值
  • categorys: 选择分类时对应的数据,数组内对象以id为键,name为值
方法
  • save(): 调用this.$refs['wfd'].graph.save()生成json
  • saveXML(): 调用this.$refs['wfd'].graph.saveXML(createFile)生成Flowable XML,createFile参数是否同时生成xml文件,默认为true
  • saveImg(): 调用this.$refs['wfd'].graph.saveImg(createFile)生成图片,createFile参数表示是否生成图片文件,默认为true,该函数返回值为图片base64

Run Example

npm run serve

友情链接(flowable流程设计器,感谢@GoldSubmarine提供)

https://github.com/GoldSubmarine/workflow-bpmn-modeler

wfd-vue's People

Contributors

guozhaolong avatar goldsubmarine avatar loongmxbt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.