# bpmn-process-designer **Repository Path**: vvmm/bpmn-process-designer ## Basic Information - **Project Name**: bpmn-process-designer - **Description**: Base on Vue 2.x and ElementUI,基于 Bpmn.js、Vue 2.x 和 ElementUI 的流程编辑器(前端部分),支持监听器,扩展属性,表单等配置,可自由扩展 - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: https://miyuesc.gitee.io/process-designer/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 641 - **Created**: 2022-09-14 - **Last Updated**: 2022-09-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
## 1. 安装依赖 Installation
```shell
npm install
// or yarn install
```
## 2. 运行 Quick Start
```shell
npm run demo
// or yarn run demo
```
## 3. 文档说明 Documentation
### 3.1 MyProcessDesigner
#### 3.1.1 Attributes
| Attribute | Description | Type | Accepted Values | Default |
| --------------------- | --------------------------------------------------------- | ----------- | -------------------------------------- | ------------------------------------------------------------ |
| `value/v-model` | 初始化流程对应的 `xml` 字符串 | String | - | - |
| `translations` | 翻译文件 | Object | - | [zh.js](https://github.com/miyuesc/bpmn-process-designer/blob/main/package/designer/plugins/translate/zh.js) |
| `additionalModel` | 自定义的附加模块 | Object[] / Object | - | - |
| `moddleExtension` | 自定义的扩展模块 | Object | - | - |
| `onlyCustomizeAddi` | 仅使用开发时的自定义附加模块 | Boolean | - | `false` |
| `onlyCustomizeModdle` | 仅使用开发时的自定义扩展模块 | Boolean | - | `false` |
| `prefix` | 流程引擎对应扩展属性前缀 | String | `camunda`, `activiti`, `flowable` | `camunda` |
| `events` | 需要使用的事件列表,可用事件见 [Bpmn.js 中文文档](https://github.com/miyuesc/blog/blob/master/bpmn/docs/Bpmn.js%20document.md#%E4%B8%89-%E4%BA%8B%E4%BB%B6) | Array | - | `[element.click]` |
| `headerButtonSize` | 头部按钮组的大小 | String | `"default", "medium", "small", "mini"` | `small` |
#### 3.1.2 Events
| Event Name | Description | Callback Parameters |
| --------------- | ------------------------------------------------------------ | -------------------------------- |
| `init-finished` | 流程实例等初始化完成之后 | `modeler` |
| `change` | 流程发生可监听的改变时 ( `EventBus.on("commandStack.changed")`) | `XMLString` |
| `destroy` | 组件准备销毁时,此时流程实例已经销毁 | `modeler` |
| `BpmnEvents` | Like `element.click`, will replace `.` to `-` (`ex: "element.click" => "element-click"` ). If you want to use an event, you must add the event name to the "`events`" parameter