@xiaou66/picture-types 0.0.5 → 0.0.7
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/dist/src/Flow.d.ts +18 -4
- package/package.json +1 -1
package/dist/src/Flow.d.ts
CHANGED
|
@@ -83,9 +83,23 @@ export interface IFlowContext {
|
|
|
83
83
|
* 流程节点动作
|
|
84
84
|
*/
|
|
85
85
|
export interface IFlowNodeActions<T> {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
/**
|
|
87
|
+
* 执行节点核心逻辑
|
|
88
|
+
* @param flow 流程项
|
|
89
|
+
* @param flowData 流程节点数据
|
|
90
|
+
* @param data 流程上下文
|
|
91
|
+
*/
|
|
92
|
+
onExecute?: (flow: IFlowItem, flowData: IFlowNode<T>, data: IFlowContext) => Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* 保存数据后的钩子
|
|
95
|
+
* @param flow 流程项
|
|
96
|
+
* @param flowData 流程节点数据
|
|
97
|
+
*/
|
|
98
|
+
onAfterSave?: (flow: IFlowItem, flowData: IFlowNode<T>) => void;
|
|
99
|
+
/**
|
|
100
|
+
* 节点销毁时的清理钩子
|
|
101
|
+
* @param flow 流程项
|
|
102
|
+
* @param flowData 流程节点数据
|
|
103
|
+
*/
|
|
89
104
|
onDestroy?: (flow: IFlowItem, flowData: IFlowNode<T>) => void;
|
|
90
|
-
adjustData?: (flow: IFlowItem, flowData: IFlowNode<T>) => Promise<boolean>;
|
|
91
105
|
}
|