@xiaou66/picture-types 0.0.2 → 0.0.4
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/Flow.d.ts +17 -24
- package/dist/Plugin.d.ts +2 -2
- package/dist/Storage.d.ts +4 -4
- package/package.json +1 -1
package/dist/Flow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncComponentLoader } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { PluginInfo } from './Plugin';
|
|
3
3
|
import { FileUpdateInfoItem } from './File';
|
|
4
4
|
import { FileLibraryItem, SceneInfoItem } from './Store';
|
|
5
5
|
/**
|
|
@@ -27,24 +27,6 @@ export type SaveFlowItem = Omit<IFlowItem, 'createAt' | 'updateAt' | 'id' | 'sor
|
|
|
27
27
|
createAt?: number;
|
|
28
28
|
updateAt?: number;
|
|
29
29
|
};
|
|
30
|
-
/**
|
|
31
|
-
* 流程节点信息
|
|
32
|
-
*/
|
|
33
|
-
export interface IFlowNodeInfo {
|
|
34
|
-
code: string;
|
|
35
|
-
title: string;
|
|
36
|
-
group: '触发' | '通用' | '完成';
|
|
37
|
-
nodeType: 'trigger' | 'common';
|
|
38
|
-
end?: boolean;
|
|
39
|
-
desc?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 流程节点配置
|
|
43
|
-
*/
|
|
44
|
-
export interface IFlowNodeConfig {
|
|
45
|
-
info: IFlowNodeInfo;
|
|
46
|
-
nodeComponent: AsyncComponentLoader;
|
|
47
|
-
}
|
|
48
30
|
/**
|
|
49
31
|
* 流程提供者
|
|
50
32
|
*/
|
|
@@ -52,26 +34,37 @@ export interface FlowProvide {
|
|
|
52
34
|
removeNode: (id: string) => void;
|
|
53
35
|
updateNodeField: (id: string, field: string, value: any) => void;
|
|
54
36
|
updateNode: (id: string, nodeData: Record<string, any>) => void;
|
|
55
|
-
createNode: (node:
|
|
37
|
+
createNode: (node: FlowNodePlugin) => void;
|
|
56
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* 流程节点分组类型
|
|
41
|
+
*/
|
|
42
|
+
export type FlowNodePluginGroup = 'common' | 'image' | 'finish';
|
|
57
43
|
/**
|
|
58
44
|
* 流程节点插件信息
|
|
59
45
|
*/
|
|
60
|
-
export interface
|
|
46
|
+
export interface FlowNodePluginInfo extends PluginInfo {
|
|
61
47
|
/**
|
|
62
48
|
* 插件分组
|
|
49
|
+
* common 通用
|
|
50
|
+
* image 图片
|
|
51
|
+
* finish 结束
|
|
52
|
+
*/
|
|
53
|
+
pluginGroup: FlowNodePluginGroup;
|
|
54
|
+
/**
|
|
55
|
+
* end: 最后节点
|
|
63
56
|
*/
|
|
64
|
-
|
|
57
|
+
nodeType?: 'end';
|
|
65
58
|
}
|
|
66
59
|
/**
|
|
67
60
|
* 流程节点插件
|
|
68
61
|
*/
|
|
69
|
-
export interface
|
|
62
|
+
export interface FlowNodePlugin {
|
|
70
63
|
/**
|
|
71
64
|
* 无需配置可以直接使用
|
|
72
65
|
*/
|
|
73
66
|
noConfig?: boolean;
|
|
74
|
-
pluginInfo:
|
|
67
|
+
pluginInfo: FlowNodePluginInfo;
|
|
75
68
|
/**
|
|
76
69
|
* 自定义配置 UI
|
|
77
70
|
*/
|
package/dist/Plugin.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type PluginType = 'storage' | 'flowNode';
|
|
|
8
8
|
/**
|
|
9
9
|
* 插件信息
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface PluginInfo {
|
|
12
12
|
/**
|
|
13
13
|
* 插件 code 全局唯一
|
|
14
14
|
*/
|
|
@@ -45,7 +45,7 @@ export interface PlugInfo {
|
|
|
45
45
|
/**
|
|
46
46
|
* 插件配置
|
|
47
47
|
*/
|
|
48
|
-
export interface
|
|
48
|
+
export interface PluginConfig<T extends PluginInfo = PluginInfo> {
|
|
49
49
|
/**
|
|
50
50
|
* 无需配置可以直接使用
|
|
51
51
|
*/
|
package/dist/Storage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncComponentLoader, AsyncComponentOptions } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { PluginInfo, PluginConfig } from './Plugin';
|
|
3
3
|
/**
|
|
4
4
|
* 上传文件结果
|
|
5
5
|
*/
|
|
@@ -82,7 +82,7 @@ export interface StorageUIFormElement {
|
|
|
82
82
|
customComponent?: AsyncComponentLoader | AsyncComponentOptions;
|
|
83
83
|
formItem: {
|
|
84
84
|
rules?: Record<string, any>;
|
|
85
|
-
|
|
85
|
+
name: string;
|
|
86
86
|
label: string;
|
|
87
87
|
[key: string]: any;
|
|
88
88
|
};
|
|
@@ -111,7 +111,7 @@ export interface StorageUIConfig {
|
|
|
111
111
|
/**
|
|
112
112
|
* 存储插件信息
|
|
113
113
|
*/
|
|
114
|
-
export interface
|
|
114
|
+
export interface StoragePluginInfo extends PluginInfo {
|
|
115
115
|
/**
|
|
116
116
|
* 插件分组
|
|
117
117
|
*/
|
|
@@ -120,7 +120,7 @@ export interface StoragePlugInfo extends PlugInfo {
|
|
|
120
120
|
/**
|
|
121
121
|
* 存储插件配置
|
|
122
122
|
*/
|
|
123
|
-
export interface
|
|
123
|
+
export interface StoragePluginConfig extends PluginConfig<StoragePluginInfo> {
|
|
124
124
|
/**
|
|
125
125
|
* 配置 ui
|
|
126
126
|
*/
|