@kengic/vue 0.26.6-beta.107 → 0.26.6-beta.109
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +6693 -6783
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +3 -3
- package/dist/src/component/KgAppSelect/index.store.d.ts +2 -2
- package/dist/src/component/KgButton/index.hooks.d.ts +5 -5
- package/dist/src/component/KgButton/index.store.d.ts +2 -2
- package/dist/src/component/KgCanvas/KgCanvas.ContextMenu.d.ts +0 -3
- package/dist/src/component/KgCanvas/KgCanvas.d.ts +15 -0
- package/dist/src/component/KgCanvas/KgCanvas.service.d.ts +1 -4
- package/dist/src/component/KgCanvas/index.event.d.ts +225 -0
- package/dist/src/component/KgCanvas/index.hooks.d.ts +18 -13
- package/dist/src/component/KgCanvas/index.store.d.ts +0 -229
- package/dist/src/component/KgCanvas/index.vm.d.ts +4 -0
- package/dist/src/component/KgForm/index.hooks.d.ts +8 -8
- package/dist/src/component/KgForm/index.store.d.ts +2 -2
- package/dist/src/component/KgSearch/index.hooks.d.ts +4 -4
- package/dist/src/component/KgSearch/index.store.d.ts +2 -2
- package/dist/src/component/KgSubmit/index.hooks.d.ts +11 -11
- package/dist/src/component/KgSubmit/index.store.d.ts +1 -1
- package/dist/src/component/KgTable/index.hooks.d.ts +11 -11
- package/dist/src/component/KgTable/index.store.d.ts +2 -2
- package/dist/src/component/KgVar/index.hooks.d.ts +2 -2
- package/dist/src/component/KgVar/index.store.d.ts +2 -2
- package/dist/src/component/KgWarehouse/index.hooks.d.ts +2 -2
- package/dist/src/const/index.vm.d.ts +3 -3
- package/dist/src/const/injection-keys.const.d.ts +2 -0
- package/dist/src/util/index.d.ts +36 -0
- package/dist/src/util/kg.util.d.ts +6 -0
- package/package.json +2 -2
- package/dist/src/component/util.d.ts +0 -14
- /package/dist/{close-outlined-DMcSQWxQ.f4169f3c.mjs → close-outlined-DMcSQWxQ.28ef3d50.mjs} +0 -0
- /package/dist/{fullscreen-exit-outlined-X1iYkFc4.509a6c28.mjs → fullscreen-exit-outlined-X1iYkFc4.769dc9a7.mjs} +0 -0
- /package/dist/{fullscreen-outlined-DDBrsRcy.b948f373.mjs → fullscreen-outlined-DDBrsRcy.472a314c.mjs} +0 -0
@@ -1,238 +1,9 @@
|
|
1
|
-
import { Q } from '@thymine/xunee';
|
2
1
|
import { StoreDefinition } from 'pinia';
|
3
|
-
import { Ref } from 'vue';
|
4
|
-
import { IKgEventListener } from '../../const';
|
5
|
-
import { type IKgCanvasContextMenu } from './KgCanvas.ContextMenu';
|
6
|
-
/**
|
7
|
-
* 事件类型.
|
8
|
-
* 'onInit': 图形组件初始完成
|
9
|
-
* 'onReload': 重新加载
|
10
|
-
* 'onResize': 尺寸变化
|
11
|
-
* 'onMouseMove': 鼠标移动
|
12
|
-
* 'onMouseEnter': 鼠标进入
|
13
|
-
* 'onMouseLeave': 鼠标离开
|
14
|
-
* 'onClick': 单击鼠标左键
|
15
|
-
* 'onRightClick': 单击鼠标右键
|
16
|
-
* 'onContextMenuOpen': 右键菜单打开
|
17
|
-
* 'onContextMenuClose': 右键菜单关闭
|
18
|
-
*/
|
19
|
-
export declare type IKgCanvasEvent = 'onInit' | 'onReload' | 'onResize' | 'onMouseMove' | 'onMouseEnter' | 'onMouseLeave' | 'onClick' | 'onRightClick' | 'onContextMenuOpen' | 'onContextMenuClose';
|
20
|
-
export declare type IKgCanvasOnInitEventListenerParameter = {
|
21
|
-
/**
|
22
|
-
* Q.
|
23
|
-
*/
|
24
|
-
Q: typeof Q;
|
25
|
-
/**
|
26
|
-
* 图形组件对象.
|
27
|
-
*/
|
28
|
-
graph: Q.Graph;
|
29
|
-
eid: string;
|
30
|
-
};
|
31
|
-
export declare type IKgCanvasOnInitEventListener = ((param: IKgCanvasOnInitEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
32
|
-
export declare type IKgCanvasOnReloadEventListenerParameter = {
|
33
|
-
/**
|
34
|
-
* Q.
|
35
|
-
*/
|
36
|
-
Q: typeof Q;
|
37
|
-
eid: string;
|
38
|
-
/**
|
39
|
-
* 图形组件对象.
|
40
|
-
*/
|
41
|
-
graph: Q.Graph;
|
42
|
-
};
|
43
|
-
export declare type IKgCanvasOnReloadEventListener = ((param: IKgCanvasOnReloadEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
44
|
-
export declare type IKgCanvasOnResizeEventListenerParameter = {
|
45
|
-
/**
|
46
|
-
* Q.
|
47
|
-
*/
|
48
|
-
Q: typeof Q;
|
49
|
-
eid: string;
|
50
|
-
/**
|
51
|
-
* 图形组件对象.
|
52
|
-
*/
|
53
|
-
graph: Q.Graph;
|
54
|
-
/**
|
55
|
-
* 当前高度.
|
56
|
-
*/
|
57
|
-
height: number;
|
58
|
-
/**
|
59
|
-
* 当前宽度.
|
60
|
-
*/
|
61
|
-
width: number;
|
62
|
-
};
|
63
|
-
export declare type IKgCanvasOnResizeEventListener = ((param: IKgCanvasOnResizeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
64
|
-
export declare type IKgCanvasOnRightClickEventListenerParameter = {
|
65
|
-
/**
|
66
|
-
* Q.
|
67
|
-
*/
|
68
|
-
Q: typeof Q;
|
69
|
-
/**
|
70
|
-
* <p>右键菜单列表.</p>
|
71
|
-
* <p>用户可以直接修改该参数的值, 从而修改此次单击右键事件弹出的右键菜单.</p>
|
72
|
-
*/
|
73
|
-
contextMenus: Ref<Array<IKgCanvasContextMenu>>;
|
74
|
-
eid: string;
|
75
|
-
/**
|
76
|
-
* 图元.
|
77
|
-
*/
|
78
|
-
element?: Q.Element;
|
79
|
-
/**
|
80
|
-
* 图元组件.
|
81
|
-
*/
|
82
|
-
elementUI?: Q.ElementUI;
|
83
|
-
/**
|
84
|
-
* 鼠标事件.
|
85
|
-
*/
|
86
|
-
event: MouseEvent;
|
87
|
-
/**
|
88
|
-
* 图形组件对象.
|
89
|
-
*/
|
90
|
-
graph: Q.Graph;
|
91
|
-
/**
|
92
|
-
* 图元组件.
|
93
|
-
*/
|
94
|
-
ui?: Q.BaseUI;
|
95
|
-
};
|
96
|
-
export declare type IKgCanvasOnRightClickEventListener = ((param: IKgCanvasOnRightClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
97
|
-
export declare type IKgCanvasOnMouseMoveEventListenerParameter = {
|
98
|
-
/**
|
99
|
-
* Q.
|
100
|
-
*/
|
101
|
-
Q: typeof Q;
|
102
|
-
eid: string;
|
103
|
-
/**
|
104
|
-
* 图元.
|
105
|
-
*/
|
106
|
-
element?: Q.Element;
|
107
|
-
/**
|
108
|
-
* 图元组件.
|
109
|
-
*/
|
110
|
-
elementUI?: Q.ElementUI;
|
111
|
-
/**
|
112
|
-
* 图形组件对象.
|
113
|
-
*/
|
114
|
-
graph: Q.Graph;
|
115
|
-
/**
|
116
|
-
* 图元组件.
|
117
|
-
*/
|
118
|
-
ui?: Q.BaseUI;
|
119
|
-
};
|
120
|
-
export declare type IKgCanvasOnMouseMoveEventListener = ((param: IKgCanvasOnMouseMoveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
121
|
-
export declare type IKgCanvasOnMouseLeaveEventListenerParameter = {
|
122
|
-
/**
|
123
|
-
* Q.
|
124
|
-
*/
|
125
|
-
Q: typeof Q;
|
126
|
-
eid: string;
|
127
|
-
/**
|
128
|
-
* 图元.
|
129
|
-
*/
|
130
|
-
element?: Q.Element;
|
131
|
-
/**
|
132
|
-
* 图元组件.
|
133
|
-
*/
|
134
|
-
elementUI?: Q.ElementUI;
|
135
|
-
/**
|
136
|
-
* 图形组件对象.
|
137
|
-
*/
|
138
|
-
graph: Q.Graph;
|
139
|
-
/**
|
140
|
-
* 图元组件.
|
141
|
-
*/
|
142
|
-
ui?: Q.BaseUI;
|
143
|
-
};
|
144
|
-
export declare type IKgCanvasOnMouseLeaveEventListener = ((param: IKgCanvasOnMouseLeaveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
145
|
-
export declare type IKgCanvasOnMouseEnterEventListenerParameter = {
|
146
|
-
/**
|
147
|
-
* Q.
|
148
|
-
*/
|
149
|
-
Q: typeof Q;
|
150
|
-
eid: string;
|
151
|
-
/**
|
152
|
-
* 图元.
|
153
|
-
*/
|
154
|
-
element?: Q.Element;
|
155
|
-
/**
|
156
|
-
* 图元组件.
|
157
|
-
*/
|
158
|
-
elementUI?: Q.ElementUI;
|
159
|
-
/**
|
160
|
-
* 图形组件对象.
|
161
|
-
*/
|
162
|
-
graph: Q.Graph;
|
163
|
-
/**
|
164
|
-
* 图元组件.
|
165
|
-
*/
|
166
|
-
ui?: Q.BaseUI;
|
167
|
-
};
|
168
|
-
export declare type IKgCanvasOnMouseEnterEventListener = ((param: IKgCanvasOnMouseEnterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
169
|
-
export declare type IKgCanvasOnClickEventListenerParameter = {
|
170
|
-
/**
|
171
|
-
* Q.
|
172
|
-
*/
|
173
|
-
Q: typeof Q;
|
174
|
-
eid: string;
|
175
|
-
/**
|
176
|
-
* 图元.
|
177
|
-
*/
|
178
|
-
element?: Q.Element;
|
179
|
-
/**
|
180
|
-
* 图元组件.
|
181
|
-
*/
|
182
|
-
elementUI?: Q.ElementUI;
|
183
|
-
/**
|
184
|
-
* 图形组件对象.
|
185
|
-
*/
|
186
|
-
graph: Q.Graph;
|
187
|
-
/**
|
188
|
-
* 图元组件.
|
189
|
-
*/
|
190
|
-
ui?: Q.BaseUI;
|
191
|
-
};
|
192
|
-
export declare type IKgCanvasOnClickEventListener = ((param: IKgCanvasOnClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
193
|
-
export declare type IKgCanvasOnContextMenuOpenEventListenerParameter = {
|
194
|
-
eid: string;
|
195
|
-
};
|
196
|
-
export declare type IKgCanvasOnContextMenuOpenEventListener = ((param: IKgCanvasOnContextMenuOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
197
|
-
export declare type IKgCanvasOnContextMenuCloseEventListenerParameter = {
|
198
|
-
eid: string;
|
199
|
-
};
|
200
|
-
export declare type IKgCanvasOnContextMenuCloseEventListener = ((param: IKgCanvasOnContextMenuCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
201
|
-
export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter | IKgCanvasOnReloadEventListenerParameter | IKgCanvasOnResizeEventListenerParameter | IKgCanvasOnRightClickEventListenerParameter | IKgCanvasOnMouseMoveEventListenerParameter | IKgCanvasOnMouseEnterEventListenerParameter | IKgCanvasOnMouseLeaveEventListenerParameter | IKgCanvasOnClickEventListenerParameter | IKgCanvasOnContextMenuOpenEventListenerParameter | IKgCanvasOnContextMenuCloseEventListenerParameter;
|
202
|
-
export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener | IKgCanvasOnReloadEventListener | IKgCanvasOnResizeEventListener | IKgCanvasOnRightClickEventListener | IKgCanvasOnMouseMoveEventListener | IKgCanvasOnMouseEnterEventListener | IKgCanvasOnMouseLeaveEventListener | IKgCanvasOnClickEventListener | IKgCanvasOnContextMenuOpenEventListener | IKgCanvasOnContextMenuCloseEventListener;
|
203
2
|
export interface IUseKgCanvasStoreState {
|
204
|
-
onClickEventListenerMap: Map<string, Array<IKgCanvasOnClickEventListener>>;
|
205
|
-
onContextMenuCloseEventListenerMap: Map<string, Array<IKgCanvasOnContextMenuCloseEventListener>>;
|
206
|
-
onContextMenuOpenEventListenerMap: Map<string, Array<IKgCanvasOnContextMenuOpenEventListener>>;
|
207
|
-
onInitEventListenerMap: Map<string, Array<IKgCanvasOnInitEventListener>>;
|
208
|
-
onMouseEnterEventListenerMap: Map<string, Array<IKgCanvasOnMouseEnterEventListener>>;
|
209
|
-
onMouseLeaveEventListenerMap: Map<string, Array<IKgCanvasOnMouseLeaveEventListener>>;
|
210
|
-
onMouseMoveEventListenerMap: Map<string, Array<IKgCanvasOnMouseMoveEventListener>>;
|
211
|
-
onReloadEventListenerMap: Map<string, Array<IKgCanvasOnReloadEventListener>>;
|
212
|
-
onResizeEventListenerMap: Map<string, Array<IKgCanvasOnResizeEventListener>>;
|
213
|
-
onRightClickEventListenerMap: Map<string, Array<IKgCanvasOnRightClickEventListener>>;
|
214
3
|
}
|
215
4
|
export interface IUseKgCanvasStoreGetters {
|
216
5
|
}
|
217
6
|
export interface IUseKgCanvasStoreActions {
|
218
|
-
/**
|
219
|
-
* 注册事件监听.
|
220
|
-
* @param event 事件名称.
|
221
|
-
* @param listener 事件监听函数.
|
222
|
-
*/
|
223
|
-
addEventListener(event: IKgCanvasEvent, listener: any): void;
|
224
|
-
/**
|
225
|
-
* 触发事件.
|
226
|
-
* @param event 事件名称.
|
227
|
-
* @param param 参数.
|
228
|
-
*/
|
229
|
-
emit<T = IKgCanvasEventListenerParameter>(event: IKgCanvasEvent, param?: T | null): Promise<boolean>;
|
230
|
-
/**
|
231
|
-
* 退订事件监听.
|
232
|
-
* @param event 事件名称.
|
233
|
-
* @param listener 事件监听函数.
|
234
|
-
*/
|
235
|
-
removeEventListener(event: IKgCanvasEvent, listener?: any): void;
|
236
7
|
}
|
237
8
|
export declare type IUseKgCanvasStore = StoreDefinition<'KgCanvas', IUseKgCanvasStoreState, IUseKgCanvasStoreGetters, IUseKgCanvasStoreActions>;
|
238
9
|
export declare type IKgCanvasStore = ReturnType<IUseKgCanvasStore>;
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import { Q } from '@thymine/xunee';
|
2
2
|
import { InjectionKey } from 'vue';
|
3
3
|
export declare const KG__DI__KG_CANVAS_PROPS: InjectionKey<Partial<import("vue").ExtractPropTypes<{
|
4
|
+
id: {
|
5
|
+
type: import("vue").PropType<string>;
|
6
|
+
required: boolean;
|
7
|
+
};
|
4
8
|
kgCanvasToolbarFullscreen: {
|
5
9
|
type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
|
6
10
|
kgIsShowText: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { IRemoveEventListener } from '../../const';
|
2
2
|
import { IKgFormChangeEventListener, IKgFormLookupBeforeOkEventListener, IKgFormLookupBeforeOpenEventListener, IKgFormLookupOkEventListener, IKgFormSelectBeforeRequestEventListener, IKgFormSelectBeforeSetDatasEventListener, IKgFormSelectChangeEventListener, IKgFormStore } from './index.store';
|
3
3
|
export declare type IUseKgForm = {
|
4
4
|
Select: {
|
@@ -18,28 +18,28 @@ export declare type IUseKgForm = {
|
|
18
18
|
* @param listener 事件监听函数.
|
19
19
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
20
20
|
*/
|
21
|
-
onChange(listener: IKgFormChangeEventListener, isOnce?: boolean):
|
21
|
+
onChange(listener: IKgFormChangeEventListener, isOnce?: boolean): IRemoveEventListener;
|
22
22
|
/**
|
23
23
|
* 监听事件: 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件.
|
24
24
|
*
|
25
25
|
* @param listener 事件监听函数.
|
26
26
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
27
27
|
*/
|
28
|
-
onLookupBeforeOk(listener: IKgFormLookupBeforeOkEventListener, isOnce?: boolean):
|
28
|
+
onLookupBeforeOk(listener: IKgFormLookupBeforeOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
29
29
|
/**
|
30
30
|
* 监听事件: 查找弹窗打开之前.
|
31
31
|
*
|
32
32
|
* @param listener 事件监听函数.
|
33
33
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
34
34
|
*/
|
35
|
-
onLookupBeforeOpen(listener: IKgFormLookupBeforeOpenEventListener, isOnce?: boolean):
|
35
|
+
onLookupBeforeOpen(listener: IKgFormLookupBeforeOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
36
36
|
/**
|
37
37
|
* 监听事件: 查找弹窗点击确定.
|
38
38
|
*
|
39
39
|
* @param listener 事件监听函数.
|
40
40
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
41
41
|
*/
|
42
|
-
onLookupOk(listener: IKgFormLookupOkEventListener, isOnce?: boolean):
|
42
|
+
onLookupOk(listener: IKgFormLookupOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
43
43
|
/**
|
44
44
|
* <p>监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.</p>
|
45
45
|
* <p>通常在该事件中, 通过给 <code>response.value</code> 赋值, 来实现自定义下拉列表数据. 注意此时必须返回 true 来跳过后续的列表数据查询.</p>
|
@@ -47,21 +47,21 @@ export declare type IUseKgForm = {
|
|
47
47
|
* @param callback 事件监听函数.
|
48
48
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
49
49
|
*/
|
50
|
-
onSelectBeforeRequest(callback: IKgFormSelectBeforeRequestEventListener, isOnce?: boolean):
|
50
|
+
onSelectBeforeRequest(callback: IKgFormSelectBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
51
51
|
/**
|
52
52
|
* 监听事件: 查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
|
53
53
|
*
|
54
54
|
* @param callback 事件监听函数.
|
55
55
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
56
56
|
*/
|
57
|
-
onSelectBeforeSetDatas(callback: IKgFormSelectBeforeSetDatasEventListener, isOnce?: boolean):
|
57
|
+
onSelectBeforeSetDatas(callback: IKgFormSelectBeforeSetDatasEventListener, isOnce?: boolean): IRemoveEventListener;
|
58
58
|
/**
|
59
59
|
* 监听事件: 下拉列表选中某个(可能多个)数据.
|
60
60
|
*
|
61
61
|
* @param listener 事件监听函数.
|
62
62
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
63
63
|
*/
|
64
|
-
onSelectChange(listener: IKgFormSelectChangeEventListener, isOnce?: boolean):
|
64
|
+
onSelectChange(listener: IKgFormSelectChangeEventListener, isOnce?: boolean): IRemoveEventListener;
|
65
65
|
/**
|
66
66
|
* 状态数据.
|
67
67
|
*/
|
@@ -205,9 +205,9 @@ export interface IUseKgFormStoreActions {
|
|
205
205
|
* 触发事件.
|
206
206
|
* @param formID 界面标识.
|
207
207
|
* @param event 事件名称.
|
208
|
-
* @param
|
208
|
+
* @param parameter 事件参数.
|
209
209
|
*/
|
210
|
-
emit<T = IKgFormEventListenerParameter>(formID: string | null | undefined, event: IKgFormEvent,
|
210
|
+
emit<T = IKgFormEventListenerParameter>(formID: string | null | undefined, event: IKgFormEvent, parameter: T): Promise<boolean>;
|
211
211
|
/**
|
212
212
|
* 退订事件监听.
|
213
213
|
* @param formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
2
|
import { VarProfileDetail } from '../../api/WMS/models';
|
3
|
-
import {
|
3
|
+
import { IRemoveEventListener } from '../../const';
|
4
4
|
import { IKgTableRequestParameter } from '../KgTable';
|
5
5
|
import { IKgSearchReadyEventListener, IKgSearchResetEventListener, IKgSearchSearchEventListener, IKgSearchStore } from './index.store';
|
6
6
|
export declare type IUseKgSearch = {
|
@@ -39,19 +39,19 @@ export declare type IUseKgSearch = {
|
|
39
39
|
* @param listener 事件监听函数.
|
40
40
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
41
41
|
*/
|
42
|
-
onReady(listener: IKgSearchReadyEventListener, isOnce?: boolean):
|
42
|
+
onReady(listener: IKgSearchReadyEventListener, isOnce?: boolean): IRemoveEventListener;
|
43
43
|
/**
|
44
44
|
* 监听事件: reset, 点击重置按钮.
|
45
45
|
* @param listener 事件监听函数.
|
46
46
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
47
47
|
*/
|
48
|
-
onReset(listener: IKgSearchResetEventListener, isOnce?: boolean):
|
48
|
+
onReset(listener: IKgSearchResetEventListener, isOnce?: boolean): IRemoveEventListener;
|
49
49
|
/**
|
50
50
|
* 监听事件: search, 点击查询按钮, 并且表单验证通过.
|
51
51
|
* @param listener 事件监听函数.
|
52
52
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
53
53
|
*/
|
54
|
-
onSearch(listener: IKgSearchSearchEventListener, isOnce?: boolean):
|
54
|
+
onSearch(listener: IKgSearchSearchEventListener, isOnce?: boolean): IRemoveEventListener;
|
55
55
|
/** 重置. */
|
56
56
|
reset(): void;
|
57
57
|
/** 查询. */
|
@@ -92,9 +92,9 @@ export interface IUseKgSearchStoreActions {
|
|
92
92
|
* 触发事件.
|
93
93
|
* @param formID 界面标识.
|
94
94
|
* @param event 事件名称.
|
95
|
-
* @param
|
95
|
+
* @param parameter 事件参数.
|
96
96
|
*/
|
97
|
-
emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent,
|
97
|
+
emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent, parameter: T): Promise<boolean>;
|
98
98
|
/**
|
99
99
|
* 修改查询字段的高级查询操作符的部分属性.
|
100
100
|
*
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FormInstance } from 'ant-design-vue';
|
2
2
|
import { ComputedRef, Ref } from 'vue';
|
3
3
|
import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
|
4
|
-
import { IKgVarSubmitConfigProperties,
|
4
|
+
import { IKgVarSubmitConfigProperties, IRemoveEventListener, KG__VAR_BUTTON__TYPE, KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE, KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT, KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../const';
|
5
5
|
import { IKgSubmitAfterValidateEventListener, IKgSubmitBeforeOkEventListener, IKgSubmitBeforeOpenEventListener, IKgSubmitBeforeRequestEventListener, IKgSubmitCloseEventListener, IKgSubmitErrorEventListener, IKgSubmitOkEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnOpenEventListener, IKgSubmitStore } from './index.store';
|
6
6
|
export interface IUseKgSubmit {
|
7
7
|
/**
|
@@ -157,14 +157,14 @@ export interface IUseKgSubmit {
|
|
157
157
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
158
158
|
* @return {} 移除事件监听函数.
|
159
159
|
*/
|
160
|
-
onAfterValidate(listener: IKgSubmitAfterValidateEventListener, isOnce?: boolean):
|
160
|
+
onAfterValidate(listener: IKgSubmitAfterValidateEventListener, isOnce?: boolean): IRemoveEventListener;
|
161
161
|
/**
|
162
162
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗.</p>
|
163
163
|
* @param listener 事件监听函数.
|
164
164
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
165
165
|
* @return {} 移除事件监听函数.
|
166
166
|
*/
|
167
|
-
onBeforeCancel(listener: IKgSubmitOnBeforeCancelEventListener, isOnce?: boolean):
|
167
|
+
onBeforeCancel(listener: IKgSubmitOnBeforeCancelEventListener, isOnce?: boolean): IRemoveEventListener;
|
168
168
|
/**
|
169
169
|
* <p>监听事件: 点击确认按钮之后, 执行默认逻辑之前.</p>
|
170
170
|
* <ul>
|
@@ -177,14 +177,14 @@ export interface IUseKgSubmit {
|
|
177
177
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
178
178
|
* @return {} 移除事件监听函数.
|
179
179
|
*/
|
180
|
-
onBeforeOk(listener: IKgSubmitBeforeOkEventListener, isOnce?: boolean):
|
180
|
+
onBeforeOk(listener: IKgSubmitBeforeOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
181
181
|
/**
|
182
182
|
* <p>监听事件: 打开提交弹窗之前.</p>
|
183
183
|
* @param listener 事件监听函数.
|
184
184
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
185
185
|
* @return {} 移除事件监听函数.
|
186
186
|
*/
|
187
|
-
onBeforeOpen(listener: IKgSubmitBeforeOpenEventListener, isOnce?: boolean):
|
187
|
+
onBeforeOpen(listener: IKgSubmitBeforeOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
188
188
|
/**
|
189
189
|
* <p>监听事件: 发起接口请求之前. 表单验证完成, 参数解析完成.</p>
|
190
190
|
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
@@ -193,14 +193,14 @@ export interface IUseKgSubmit {
|
|
193
193
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
194
194
|
* @return {} 移除事件监听函数.
|
195
195
|
*/
|
196
|
-
onBeforeRequest(listener: IKgSubmitBeforeRequestEventListener, isOnce?: boolean):
|
196
|
+
onBeforeRequest(listener: IKgSubmitBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
197
197
|
/**
|
198
198
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗.</p>
|
199
199
|
* @param listener 事件监听函数.
|
200
200
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
201
201
|
* @return {} 移除事件监听函数.
|
202
202
|
*/
|
203
|
-
onCancel(listener: IKgSubmitOnCancelEventListener, isOnce?: boolean):
|
203
|
+
onCancel(listener: IKgSubmitOnCancelEventListener, isOnce?: boolean): IRemoveEventListener;
|
204
204
|
/**
|
205
205
|
* <p>监听事件: 关闭提交弹窗. 下面几种场景都会触发此事件:</p>
|
206
206
|
* <ul>
|
@@ -212,28 +212,28 @@ export interface IUseKgSubmit {
|
|
212
212
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
213
213
|
* @return {} 移除事件监听函数.
|
214
214
|
*/
|
215
|
-
onClose(listener: IKgSubmitCloseEventListener, isOnce?: boolean):
|
215
|
+
onClose(listener: IKgSubmitCloseEventListener, isOnce?: boolean): IRemoveEventListener;
|
216
216
|
/**
|
217
217
|
* <p>监听事件: 请求失败. 请求失败了, 或者请求返回了错误消息.</p>
|
218
218
|
* @param listener 事件监听函数.
|
219
219
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
220
220
|
* @return {} 移除事件监听函数.
|
221
221
|
*/
|
222
|
-
onError(listener: IKgSubmitErrorEventListener, isOnce?: boolean):
|
222
|
+
onError(listener: IKgSubmitErrorEventListener, isOnce?: boolean): IRemoveEventListener;
|
223
223
|
/**
|
224
224
|
* <p>监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 关闭提交弹窗之后.</p>
|
225
225
|
* @param listener 事件监听函数.
|
226
226
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
227
227
|
* @return {} 移除事件监听函数.
|
228
228
|
*/
|
229
|
-
onOk(listener: IKgSubmitOkEventListener, isOnce?: boolean):
|
229
|
+
onOk(listener: IKgSubmitOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
230
230
|
/**
|
231
231
|
* <p>监听事件: 打开提交弹窗.</p>
|
232
232
|
* @param listener 事件监听函数.
|
233
233
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
234
234
|
* @return {} 移除事件监听函数.
|
235
235
|
*/
|
236
|
-
onOpen(listener: IKgSubmitOnOpenEventListener, isOnce?: boolean):
|
236
|
+
onOpen(listener: IKgSubmitOnOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
237
237
|
/**
|
238
238
|
* <p>修改某个「提交表单字段」的部分属性.</p>
|
239
239
|
*
|
@@ -172,7 +172,7 @@ export interface IUseKgSubmitStoreActions {
|
|
172
172
|
* @param formID 页面标识.
|
173
173
|
*/
|
174
174
|
dispose(formID?: string | null): void;
|
175
|
-
emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent,
|
175
|
+
emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent, parameter: T): Promise<boolean>;
|
176
176
|
patchVarSubmitDetail(formID: string | null | undefined, param: {
|
177
177
|
buttonType?: KG__VAR_BUTTON__TYPE;
|
178
178
|
buttonVarName?: string | null;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
2
|
import { VarGridConfig, VarGridDetail } from '../../api/WMS/models';
|
3
|
-
import {
|
3
|
+
import { IRemoveEventListener } from '../../const';
|
4
4
|
import { IKgTableAfterRequestEventListener, IKgTableBeforeParseParameterEventListener, IKgTableBeforeRequestEventListener, IKgTableBeforeSetDatasEventListener, IKgTableReadyEventListener, IKgTableRowDoubleClickEventListener, IKgTableStore } from './index.store';
|
5
5
|
export interface IUseKgTable {
|
6
6
|
/**
|
@@ -55,11 +55,11 @@ export interface IUseKgTable {
|
|
55
55
|
* @param listener 事件监听函数.
|
56
56
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
57
57
|
*/
|
58
|
-
onAfterRequest(listener: IKgTableAfterRequestEventListener, isOnce?: boolean):
|
58
|
+
onAfterRequest(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
59
59
|
/**
|
60
60
|
* @deprecated 已废弃, 请使用 onAfterRequest() 方法.
|
61
61
|
*/
|
62
|
-
onAfterSearch(listener: IKgTableAfterRequestEventListener, isOnce?: boolean):
|
62
|
+
onAfterSearch(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
63
63
|
/**
|
64
64
|
* <p>监听事件: 即将解析请求参数.</p>
|
65
65
|
* <p>在该事件中, 可以修改解析前的参数.</p>
|
@@ -67,43 +67,43 @@ export interface IUseKgTable {
|
|
67
67
|
* @param listener 事件监听函数.
|
68
68
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
69
69
|
*/
|
70
|
-
onBeforeParseRequestParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean):
|
70
|
+
onBeforeParseRequestParameter(listener: IKgTableBeforeParseParameterEventListener, isOnce?: boolean): IRemoveEventListener;
|
71
71
|
/**
|
72
72
|
* 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
|
73
73
|
* @param listener 事件监听函数.
|
74
74
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
75
75
|
*/
|
76
|
-
onBeforeRequest(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean):
|
76
|
+
onBeforeRequest(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
77
77
|
/**
|
78
78
|
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
79
79
|
*/
|
80
|
-
onBeforeRetrieve(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean):
|
80
|
+
onBeforeRetrieve(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
81
81
|
/**
|
82
82
|
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
83
83
|
*/
|
84
|
-
onBeforeSearch(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean):
|
84
|
+
onBeforeSearch(listener: IKgTableBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
85
85
|
/**
|
86
86
|
* 监听事件: 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
|
87
87
|
* @param listener 事件监听函数.
|
88
88
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
89
89
|
*/
|
90
|
-
onBeforeSetDatas(listener: IKgTableBeforeSetDatasEventListener, isOnce?: boolean):
|
90
|
+
onBeforeSetDatas(listener: IKgTableBeforeSetDatasEventListener, isOnce?: boolean): IRemoveEventListener;
|
91
91
|
/**
|
92
92
|
* 监听事件: ready, 配置初始完成, 组件渲染完成.
|
93
93
|
* @param listener 事件监听函数.
|
94
94
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
95
95
|
*/
|
96
|
-
onReady(listener: IKgTableReadyEventListener, isOnce?: boolean):
|
96
|
+
onReady(listener: IKgTableReadyEventListener, isOnce?: boolean): IRemoveEventListener;
|
97
97
|
/**
|
98
98
|
* @deprecated 已废弃, 请使用 onAfterSearch() 方法.
|
99
99
|
*/
|
100
|
-
onRetrieve(listener: IKgTableAfterRequestEventListener, isOnce?: boolean):
|
100
|
+
onRetrieve(listener: IKgTableAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
101
101
|
/**
|
102
102
|
* 监听事件: 双击某行.
|
103
103
|
* @param listener 事件监听函数.
|
104
104
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
105
105
|
*/
|
106
|
-
onRowDoubleClick(listener: IKgTableRowDoubleClickEventListener, isOnce?: boolean):
|
106
|
+
onRowDoubleClick(listener: IKgTableRowDoubleClickEventListener, isOnce?: boolean): IRemoveEventListener;
|
107
107
|
/** 当前分页选项. */
|
108
108
|
pageSizeOption: ComputedRef<number>;
|
109
109
|
/** 所有分页选项. */
|
@@ -162,9 +162,9 @@ export interface IUseKgTableStoreActions {
|
|
162
162
|
* 触发事件.
|
163
163
|
* @param formID 界面标识.
|
164
164
|
* @param event 事件名称.
|
165
|
-
* @param
|
165
|
+
* @param parameter 事件参数.
|
166
166
|
*/
|
167
|
-
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent,
|
167
|
+
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, parameter: T): Promise<boolean>;
|
168
168
|
/**
|
169
169
|
* 修改「表格配置」的部分属性.
|
170
170
|
*
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
2
|
import { VarConfigControl, VarConfigDescription, VarConfigPossibility } from '../../api/WMS/models';
|
3
|
-
import {
|
3
|
+
import { IRemoveEventListener, KG__VAR_BUTTON__TYPE } from '../../const';
|
4
4
|
import { IUseKgButton } from '../KgButton';
|
5
5
|
import { IUseKgForm } from '../KgForm';
|
6
6
|
import { type IUseKgSearch } from '../KgSearch';
|
@@ -128,7 +128,7 @@ export declare type IUseKgVar = {
|
|
128
128
|
* @param listener 事件监听函数.
|
129
129
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
130
130
|
*/
|
131
|
-
onRetrieve(listener: IKgVarRequestEventListener, isOnce?: boolean):
|
131
|
+
onRetrieve(listener: IKgVarRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
132
132
|
/**
|
133
133
|
* 父亲界面.
|
134
134
|
*/
|
@@ -184,9 +184,9 @@ export interface IUseKgVarStoreActions {
|
|
184
184
|
* 触发事件.
|
185
185
|
* @param formID 界面标识.
|
186
186
|
* @param event 事件名称.
|
187
|
-
* @param
|
187
|
+
* @param parameter 事件参数.
|
188
188
|
*/
|
189
|
-
emit<T = IKgVarEventListenerParameter>(formID: string, event: IKgVarEvent,
|
189
|
+
emit<T = IKgVarEventListenerParameter>(formID: string, event: IKgVarEvent, parameter: T): Promise<boolean>;
|
190
190
|
/**
|
191
191
|
* 进入一个界面. 同一个界面不允许进入多次.
|
192
192
|
* @param param.formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Pinia } from 'pinia';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import {
|
3
|
+
import { IRemoveEventListener } from '../../const';
|
4
4
|
import { IKgWarehouseMountedEventListener, IKgWarehouseStore } from './index.store';
|
5
5
|
export declare type IUseKgWarehouse = {
|
6
6
|
/**
|
@@ -8,7 +8,7 @@ export declare type IUseKgWarehouse = {
|
|
8
8
|
* @param listener 事件监听函数.
|
9
9
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
10
10
|
*/
|
11
|
-
onMounted(listener: IKgWarehouseMountedEventListener, isOnce?: boolean):
|
11
|
+
onMounted(listener: IKgWarehouseMountedEventListener, isOnce?: boolean): IRemoveEventListener;
|
12
12
|
store: IKgWarehouseStore;
|
13
13
|
/**
|
14
14
|
* 是否显示弹窗.
|
@@ -503,12 +503,12 @@ export declare const KG_TMP_MENU_ID__SYS = "KG_TMP_MENU_ID__SYS";
|
|
503
503
|
/** 模块菜单的临时ID:PDA. */
|
504
504
|
export declare const KG_TMP_MENU_ID__PDA = "KG_TMP_MENU_ID__PDA";
|
505
505
|
/** 移除事件监听函数. */
|
506
|
-
export declare type
|
506
|
+
export declare type IRemoveEventListener = () => void;
|
507
507
|
export declare type IKgEventListener = {
|
508
|
+
/** 是否已经触发过一次了. */
|
509
|
+
isDone?: boolean;
|
508
510
|
/** 是否只会触发一次. */
|
509
511
|
isOnce?: boolean;
|
510
|
-
/** 是否已经触发过一次了. */
|
511
|
-
invoked?: boolean;
|
512
512
|
};
|
513
513
|
/** 菜单. */
|
514
514
|
export interface Menu {
|