# 流程组件扩展
# 功能描述
提供了流程图元的单击、双击、悬停事件的api,方便用户在流程中进行自定义操作。
# 操作步骤
- 在使用ide/flowchart的页面中,导入
flowchart
组件。
import flowchart from 'ide/flowchart';
- 在页面中使用flowchart组件。
<flowchart
ref="flowchart"
:mode="mode"
:process-inst="processInst"/>
- 绑定自定义单击事件
<flowchart @onclick='clickHnadler'></flowchart>
- 绑定双击事件
<flowchart @ondblclick='ondblclick' ></flowchart>
- 绑定悬停事件
<flowchart @onmouseover='onmouseover' ></flowchart>
- 回调参数说明
/**
* 处理节点和鼠标事件的函数
*
* @param {Node} node - 要处理的节点对象
* @param {MouseEvent} event - 触发的鼠标事件对象
*/
const handler = (node, event) => {
// 函数实现
};