You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

github.com/durianpancake/go-workflow-ui

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/durianpancake/go-workflow-ui

v0.0.0-20200122034134-8b86121f0b53
Source
Go
Version published
Created
Source

workflow-ui 前端工作流 UI

基于vue前端工作流UI

前端工作流生成器-Generator

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

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/go-workflow-UI

下载: git clone git@github.com:go-workflow/go-workflow-UI.git

测试

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

entry: 'src/main.js'

npm i

npm run serve

作者

邮箱:181457121@qq.com

FAQs

Package last updated on 22 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts