@xiaou66/picture-types 0.0.6 → 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.
Files changed (2) hide show
  1. package/dist/src/Flow.d.ts +18 -3
  2. package/package.json +1 -1
@@ -83,8 +83,23 @@ export interface IFlowContext {
83
83
  * 流程节点动作
84
84
  */
85
85
  export interface IFlowNodeActions<T> {
86
- execute?: (flow: IFlowItem, flowData: IFlowNode<T>, data: IFlowContext) => Promise<void>;
87
- onSaveData?: (flow: IFlowItem, flowData: IFlowNode<T>) => void;
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
+ */
88
104
  onDestroy?: (flow: IFlowItem, flowData: IFlowNode<T>) => void;
89
- adjustData?: (flow: IFlowItem, flowData: IFlowNode<T>) => Promise<boolean>;
90
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaou66/picture-types",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Picture bed plugin system",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",