@xiaou66/picture-types 0.0.8 → 0.0.10
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 -3
- package/dist/src/Storage.d.ts +0 -35
- package/dist/src/UITemplate.d.ts +7 -3
- package/package.json +1 -1
package/dist/src/Flow.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface FlowProvide {
|
|
|
36
36
|
updateNodeField: (id: string, field: string, value: any) => void;
|
|
37
37
|
updateNode: (id: string, nodeData: Record<string, any>) => void;
|
|
38
38
|
createNode: (node: FlowNodePluginConfig) => void;
|
|
39
|
+
openFlowNodeStore: () => void;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* 流程节点分组类型
|
|
@@ -84,20 +85,34 @@ export interface IFlowContext {
|
|
|
84
85
|
*/
|
|
85
86
|
export interface IFlowNodeActions<T> {
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
+
* 触发时机: 执行节点 <br/>
|
|
89
|
+
* 判断是否应该执行当前节点 <br/>
|
|
90
|
+
* @param ctx 流程上下文
|
|
91
|
+
* @param flow 流程项
|
|
92
|
+
* @param flowData 流程节点数据
|
|
93
|
+
* @returns 返回 true 执行节点,返回 false 跳过节点
|
|
94
|
+
*/
|
|
95
|
+
shouldExecute?: (ctx: IFlowContext, flow: IFlowItem, flowData: IFlowNode<T>) => boolean | Promise<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* 触发时机: 执行节点 <br/>
|
|
98
|
+
* 执行节点, 主要编写当前结点业务逻辑 <br/>
|
|
88
99
|
* @param ctx 流程上下文
|
|
89
100
|
* @param flow 流程项
|
|
90
101
|
* @param flowData 流程节点数据
|
|
91
102
|
*/
|
|
92
103
|
onExecute?: (ctx: IFlowContext, flow: IFlowItem, flowData: IFlowNode<T>) => Promise<void>;
|
|
93
104
|
/**
|
|
94
|
-
*
|
|
105
|
+
* 触发时机: 配置节点 <br/>
|
|
106
|
+
* 保存数据后的钩子 <br/>
|
|
107
|
+
* 配置节点后按下「保存」按钮触发 <br/>
|
|
95
108
|
* @param flow 流程项
|
|
96
109
|
* @param flowData 流程节点数据
|
|
97
110
|
*/
|
|
98
111
|
onAfterSave?: (flow: IFlowItem, flowData: IFlowNode<T>) => void;
|
|
99
112
|
/**
|
|
100
|
-
*
|
|
113
|
+
* 触发时机: 配置节点 <br/>
|
|
114
|
+
* 从流程中移除节点时触发 <br/>
|
|
115
|
+
* 移除节点按下「保存」按钮时触发, 主要处理节点最后数据清理工作 <br/>
|
|
101
116
|
* @param flow 流程项
|
|
102
117
|
* @param flowData 流程节点数据
|
|
103
118
|
*/
|
package/dist/src/Storage.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AsyncComponentLoader, AsyncComponentOptions } from 'vue';
|
|
2
1
|
import { PluginInfo, PluginConfig } from './Plugin';
|
|
3
2
|
import { UITemplateConfig } from './UITemplate';
|
|
4
3
|
/**
|
|
@@ -75,40 +74,6 @@ export interface IDeleteFileParams<E = any> {
|
|
|
75
74
|
export interface UploadFileOptions {
|
|
76
75
|
onProgress?: (progress: number) => void;
|
|
77
76
|
}
|
|
78
|
-
/**
|
|
79
|
-
* 存储 UI 表单元素
|
|
80
|
-
*/
|
|
81
|
-
export interface StorageUIFormElement {
|
|
82
|
-
type: 'input' | 'input-format' | 'radio-group' | 'switch' | 'input-button' | 'select' | 'custom';
|
|
83
|
-
customComponent?: AsyncComponentLoader | AsyncComponentOptions;
|
|
84
|
-
formItem: {
|
|
85
|
-
rules?: Record<string, any>;
|
|
86
|
-
name: string;
|
|
87
|
-
label: string;
|
|
88
|
-
[key: string]: any;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* 元素属性值
|
|
92
|
-
*/
|
|
93
|
-
elementProperty: Record<string, any>;
|
|
94
|
-
/**
|
|
95
|
-
* 元素事件
|
|
96
|
-
*/
|
|
97
|
-
elementEvent?: Record<string, any>;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 存储 UI 配置
|
|
101
|
-
*/
|
|
102
|
-
export interface StorageUIConfig {
|
|
103
|
-
/**
|
|
104
|
-
* 提示
|
|
105
|
-
*/
|
|
106
|
-
tips: string;
|
|
107
|
-
/**
|
|
108
|
-
* 表单
|
|
109
|
-
*/
|
|
110
|
-
forms: StorageUIFormElement[];
|
|
111
|
-
}
|
|
112
77
|
/**
|
|
113
78
|
* 存储插件信息
|
|
114
79
|
*/
|
package/dist/src/UITemplate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncComponentLoader, AsyncComponentOptions } from 'vue';
|
|
2
|
-
export type DynamicFormItemType = 'input' | 'input-format' | 'radio-group' | 'switch' | 'input-button' | 'select' | 'custom';
|
|
2
|
+
export type DynamicFormItemType = 'input' | 'input-format' | 'radio-group' | 'switch' | 'input-button' | 'select' | 'slider' | 'custom';
|
|
3
3
|
/**
|
|
4
4
|
* 动态表单项
|
|
5
5
|
*/
|
|
@@ -24,7 +24,11 @@ export interface DynamicFormItem {
|
|
|
24
24
|
/**
|
|
25
25
|
* 元素属性值
|
|
26
26
|
*/
|
|
27
|
-
elementProperty:
|
|
27
|
+
elementProperty: {
|
|
28
|
+
defaultValue?: any;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
28
32
|
/**
|
|
29
33
|
* 元素事件
|
|
30
34
|
*/
|
|
@@ -37,7 +41,7 @@ export interface UITemplateConfig {
|
|
|
37
41
|
/**
|
|
38
42
|
* 提示
|
|
39
43
|
*/
|
|
40
|
-
tips
|
|
44
|
+
tips?: string;
|
|
41
45
|
/**
|
|
42
46
|
* 表单
|
|
43
47
|
*/
|