Git Product home page Git Product logo

workflow-ui's Introduction

workflow-ui 前端工作流 UI

基于vue前端工作流UI

前端工作流生成器-Generator

1、首先通过npm安装: npm install workflow-ui --save

(注意:新版本插件未生效的话,试试npm update命令,或者workflow-ui版本并删除node_modules重新下载)

2、全局定义组件(否则会报循环引用):

main.js中

import Node from 'workflow-ui/src/components/Generator/node'
Vue.component('Node', Node)

3、在使用的地方:

<template>
  <div>
    <workflow
      :data="data"
      @ok="ok"
    />
  </div>
</template>
<script>
import workflow from 'workflow-ui/src/components/Generator'
import 'workflow-ui/lib/workflow-ui.css'
export default {
  components: {
    workflow
  },
  data () {
    return {
      data: {
        title: '请假',
        node: {
          name: '发起人',
          type: 'start',
          nodeId: 'sid-startevent',
          childNode: {}
        }
      }
    }
  },
  methods: {
    ok (data) {
      console.log(data)
    }
  }
}
</script>

源码

https://github.com/go-workflow/workflow-ui

测试

首先,打开vue.config.js,修改entry为main.js,否则页面将会是空白:

entry: 'src/main.js'

npm i

npm run serve

重新build

npm run build

重新发布

  1. package.json 更新版本号

  2. 打开 vue.config.js

entry: 'src/index.js',
  1. 发布到npm

npm publish

作者

邮箱:[email protected]

workflow-ui's People

Contributors

mumushuiding avatar

Watchers

James Cloos 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.