xxh-wfd-vue 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
## Workflow Designer for Vue
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.org/package/wfd-vue)
|
|
4
|
+
[](https://www.npmjs.org/package/wfd-vue)
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Online Demo
|
|
10
|
+
https://guozhaolong.github.io/wfd-vue/
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
```
|
|
14
|
+
<template>
|
|
15
|
+
<div id="app">
|
|
16
|
+
<wfd-vue ref="wfd" :data="demoData" :height="600" :users="candidateUsers" :groups="candidateGroups" :categorys="categorys" :lang="lang" />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import WfdVue from 'wfd-vue'
|
|
22
|
+
export default {
|
|
23
|
+
name: 'app',
|
|
24
|
+
components:{
|
|
25
|
+
WfdVue
|
|
26
|
+
},
|
|
27
|
+
data () {
|
|
28
|
+
return {
|
|
29
|
+
lang: "zh",
|
|
30
|
+
demoData: {...},
|
|
31
|
+
candidateUsers: [...],
|
|
32
|
+
candidateGroups: [...],
|
|
33
|
+
categorys: [...]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
###### 属性
|
|
42
|
+
* data: 初始化数据
|
|
43
|
+
* height: 画布高度
|
|
44
|
+
* mode: view为只读,edit为可编辑
|
|
45
|
+
* lang: zh为中文,en为英文
|
|
46
|
+
* isView: 是否为预览模式(隐藏工具栏和属性栏)
|
|
47
|
+
* users: 选择审批人时对应的数据,数组内对象以id为键,name为值
|
|
48
|
+
* groups: 选择审批组时对应的数据,数组内对象以id为键,name为值
|
|
49
|
+
* categorys: 选择分类时对应的数据,数组内对象以id为键,name为值
|
|
50
|
+
|
|
51
|
+
###### 方法
|
|
52
|
+
* save(): 调用this.$refs['wfd'].graph.save()生成json
|
|
53
|
+
* saveXML(): 调用this.$refs['wfd'].graph.saveXML(createFile)生成Flowable XML,createFile参数是否同时生成xml文件,默认为true
|
|
54
|
+
* saveImg(): 调用this.$refs['wfd'].graph.saveImg(createFile)生成图片,createFile参数表示是否生成图片文件,默认为true,该函数返回值为图片base64
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Run Example
|
|
58
|
+
```
|
|
59
|
+
npm run serve
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 友情链接(flowable流程设计器,感谢@GoldSubmarine提供)
|
|
63
|
+
https://github.com/GoldSubmarine/workflow-bpmn-modeler
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xxh-wfd-vue",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "a workflow designer base on @antv/g6",
|
|
6
|
+
"main": "dist/wfd-vue.umd.min.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"serve": "vue-cli-service serve example/main.js",
|
|
9
|
+
"build-example": "vue-cli-service build example/main.js --dest docs",
|
|
10
|
+
"build": "vue-cli-service build --target lib --name wfd-vue src/index.js",
|
|
11
|
+
"test": "vue-cli-service test:unit"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"authors": {
|
|
17
|
+
"name": "guozhaolong",
|
|
18
|
+
"email": "guozhaolong@gmail.com"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/guozhaolong/wfd-vue/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/guozhaolong/wfd-vue#readme",
|
|
25
|
+
"directories": {
|
|
26
|
+
"doc": "docs",
|
|
27
|
+
"example": "example"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"vue",
|
|
31
|
+
"workflow",
|
|
32
|
+
"diagram",
|
|
33
|
+
"g6"
|
|
34
|
+
],
|
|
35
|
+
"author": "stevenkwok",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/guozhaolong/wfd-vue.git"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@antv/dom-util": "2.0.2",
|
|
42
|
+
"@antv/matrix-util": "2.0.7",
|
|
43
|
+
"@antv/g-canvas": "^0.4.12",
|
|
44
|
+
"@antv/g6": "3.5.2",
|
|
45
|
+
"@antv/util": "~2.0.9",
|
|
46
|
+
"element-ui": "2.12.0",
|
|
47
|
+
"vue": "^2.6.10"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@vue/cli-plugin-babel": "^4.0.0",
|
|
52
|
+
"@vue/cli-service": "^4.0.0",
|
|
53
|
+
"core-js": "^3.3.2",
|
|
54
|
+
"node-sass": "^4.12.0",
|
|
55
|
+
"numericjs": "^1.2.6",
|
|
56
|
+
"raw-loader": "^3.1.0",
|
|
57
|
+
"sass-loader": "^8.0.0",
|
|
58
|
+
"vue-template-compiler": "^2.6.10"
|
|
59
|
+
}
|
|
60
|
+
}
|