An open API service indexing awesome lists of open source software.

https://github.com/boboooooo/gojsdesigner

GoJs流程图设计器
https://github.com/boboooooo/gojsdesigner

gojs

Last synced: 5 months ago
JSON representation

GoJs流程图设计器

Awesome Lists containing this project

README

          

# GoJsDesigner

[在线 demo](https://codepen.io/boboooooo/pen/VwKgNqM)

## 开始使用

- npm 引入

```javascript
import GoJsDesigner from 'gojs-flow-designer'
import 'gojs-flow-designer/lib/gojs-designer.css';

```

- 浏览器引入

```html

```

## 效果展示

- 编辑模式
![](./assets/demo1.png)

- 预览模式
![](./assets/demo2.png)

## Props

- data: Object // 流程图 json

- preview: boolean // 是否为预览模式

## Event

- nodeOnClick: (node) => {} // 返回 node 节点信息

## Methods

- getJSON

```javascript
// 获取流程json
this.$refs.designer.getJSON();
```

- redraw

```javascript
// 重新渲染
this.$refs.designer.redraw();
```