1.1.5 • Published 3 years ago

x6-editor-vue v1.1.5

Weekly downloads
41
License
MIT
Repository
-
Last release
3 years ago

x6-editor-vue

安装

npm install x6-editor-vue -S

快速开始

import Vue from 'vue'
import Element from 'element-ui'

import x6EditorVue from 'x6-editor-vue'
import 'x6-editor-vue/lib/x6-editor-vue.css'
Vue.use(x6EditorVue)

组件使用

<x6-editor-vue />
//or
<x6-editor-vue></x6-editor-vue>

Events

事件名称说明回调参数
saveData保存流程数据data
exportXml导出流程数据data
exportImg导出图片base64数据,常常配合toDataUrl属性使用,如果toDataUrl为false方法无效data

Attribute

参数说明类型可选值默认值示例
removeGroups移除原始分组,常常配合groups使用,如果其属性为空,该属性无效Boolean-false-
groups新增分组节点Array--{name: 'keyword', title: '组名称'}
removeShapes移除原始图形,常常配合shapes使用,如果其属性为空,该属性无效Boolean-false-
shapes新增图形object--cell
toDataUrl导出图片为base64数据的urlBoolean-false-
grid开启画布栅格,支持原生x6的grid配置项Boolean/Object-false-
background开启画布背景,支持原生x6的background配置项Boolean/Object-false-
snapline开启对齐线功能,支持原生x6的snapline配置项Boolean/Object-false-

Slot

name说明
StartNode开始节点自定义元素面板,参数为 { cell }
EndNode结束节点自定义元素面板,参数为 { cell }
Edge连接线自定义元素面板,参数为 { cell }
AutoNode自动任务节点自定义元素面板,参数为 { cell }
UserNode人工任务节点自定义元素面板,参数为 { cell }
Gateway网关节点自定义元素面板,参数为 { cell }
//示例:
<x6-editor-vue>
    <template slot='StartNode' slot-scope="{cell}">
        //do something
    </template>
</x6-editor-vue>

Hotkey

hotkey功能说明
ctrl+alt+n清除
ctrl+s保存
ctrl+a全选
ctrl+z撤销
ctrl+y重做
ctrl+c复制
ctrl+v粘贴
ctrl+f置顶
ctrl+b置后
delete/backspace删除
ctrl+UpArrow向上平移
ctrl+DownArrow向下平移
ctrl+LeftArrow向左平移
ctrl+RightArrow向右平移

注意

1、node版本不能低于14.0.0
2、需要安装vue、vue-cli脚手架
3、需要安装element-ui

更新日志

1.1.4

。优化元素面板高度算法 。优化页面自适应问题 。新增配置对齐线功能

1.1.3

。新增快捷键功能 。新增导出图片功能 。新增配置背景功能 。新增配置栅格功能

浏览器支持

Modern browsers and Internet Explorer 10+.

LICENSE

MIT

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago