@kengic/vue 0.26.6-beta.98 → 0.26.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/card-text-outline.6e053122.mjs +8 -0
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +52291 -50331
- package/dist/project/build/vite/plugin/index.ts +0 -1
- package/dist/src/component/KgAppSelect/index.event.d.ts +17 -0
- package/dist/src/component/KgAppSelect/index.hooks.d.ts +13 -11
- package/dist/src/component/KgAppSelect/index.store.d.ts +6 -21
- package/dist/src/component/KgButton/index.event.d.ts +27 -0
- package/dist/src/component/KgButton/index.hooks.d.ts +8 -6
- package/dist/src/component/KgButton/index.store.d.ts +8 -32
- 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 +2 -2
- package/dist/src/component/KgCanvas/index.event.d.ts +213 -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.event.d.ts +191 -0
- package/dist/src/component/KgForm/index.hooks.d.ts +17 -9
- package/dist/src/component/KgForm/index.store.d.ts +11 -177
- package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +3 -3
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
- package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
- package/dist/src/component/KgSearch/KgSearch.service.d.ts +1 -1
- package/dist/src/component/KgSearch/index.event.d.ts +17 -0
- package/dist/src/component/KgSearch/index.hooks.d.ts +6 -5
- package/dist/src/component/KgSearch/index.store.d.ts +14 -29
- package/dist/src/component/KgSubmit/KgSubmit.service.d.ts +1 -1
- package/dist/src/component/KgSubmit/index.event.d.ts +105 -0
- package/dist/src/component/KgSubmit/index.hooks.d.ts +15 -13
- package/dist/src/component/KgSubmit/index.store.d.ts +13 -115
- package/dist/src/component/KgTable/KgTable.service.d.ts +2 -2
- package/dist/src/component/KgTable/index.event.d.ts +57 -0
- package/dist/src/component/KgTable/index.hooks.d.ts +13 -12
- package/dist/src/component/KgTable/index.store.d.ts +10 -63
- package/dist/src/component/KgVar/index.event.d.ts +60 -0
- package/dist/src/component/KgVar/index.hooks.d.ts +31 -3
- package/dist/src/component/KgVar/index.store.d.ts +1 -38
- package/dist/src/component/KgVar/index.vm.d.ts +16 -2
- package/dist/src/component/KgWarehouse/index.hooks.d.ts +3 -3
- package/dist/src/component/KgWarehouse/index.store.d.ts +6 -6
- package/dist/src/config/setup/setup.d.ts +1 -1
- package/dist/src/const/i18n/en.d.ts +1 -1
- package/dist/src/const/i18n/es_ES.d.ts +1 -1
- package/dist/src/const/i18n/fr_FR.d.ts +1 -1
- package/dist/src/const/i18n/km_KH.d.ts +1 -1
- package/dist/src/const/i18n/ko_KR.d.ts +1 -1
- package/dist/src/const/i18n/vi_VN.d.ts +1 -1
- package/dist/src/const/i18n/zh_CN.d.ts +1 -1
- package/dist/src/const/index.vm.d.ts +22 -24
- package/dist/src/const/injection-keys.const.d.ts +2 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/util/index.d.ts +14 -0
- package/dist/src/util/kg-var.util.d.ts +14 -0
- package/dist/src/util/kg.util.d.ts +7 -5
- package/package.json +5 -4
- package/dist/src/component/KgSearch/components/KgSearch.ConfigModal.d.ts +0 -16
- package/dist/src/component/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -16
- package/dist/src/component/util.d.ts +0 -14
- /package/dist/{close-outlined-DMcSQWxQ.90085278.mjs → close-outlined-DMcSQWxQ.ecd794e3.mjs} +0 -0
- /package/dist/{fullscreen-exit-outlined-X1iYkFc4.7f925ac4.mjs → fullscreen-exit-outlined-X1iYkFc4.81ef5f5d.mjs} +0 -0
- /package/dist/{fullscreen-outlined-DDBrsRcy.3af91f63.mjs → fullscreen-outlined-DDBrsRcy.678cfca5.mjs} +0 -0
@@ -0,0 +1,105 @@
|
|
1
|
+
import { IKgEventListener } from '@kengic/core.core';
|
2
|
+
import { Ref } from 'vue';
|
3
|
+
import { KgAny } from '../../type';
|
4
|
+
import { IKgTableRow } from '../KgTable';
|
5
|
+
/**
|
6
|
+
* 事件类型.
|
7
|
+
* 'onBeforeOpen': 打开提交弹窗之前
|
8
|
+
* 'onOpen': 打开提交弹窗
|
9
|
+
* 'onBeforeOk': 点击确认按钮之后, 执行默认逻辑之前
|
10
|
+
* 'onAfterValidate': 点击确认按钮之后, 表单验证完成,
|
11
|
+
* 'onBeforeRequest': 发起接口请求之前. 表单验证完成, 参数解析完成,
|
12
|
+
* 'onOk': 请求成功, 关闭提交弹窗之后
|
13
|
+
* 'onBeforeCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗,
|
14
|
+
* 'onCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗,
|
15
|
+
* 'onError': 请求失败. 请求失败了, 或者请求返回了错误消息
|
16
|
+
* 'onClose': 关闭提交弹窗
|
17
|
+
*/
|
18
|
+
export declare type IKgSubmitEvent = 'onBeforeOpen' | 'onOpen' | 'onBeforeOk' | 'onAfterValidate' | 'onBeforeRequest' | 'onOk' | 'onBeforeCancel' | 'onCancel' | 'onError' | 'onClose';
|
19
|
+
export declare type IKgSubmitOnBeforeOpenEventListenerParameter = {
|
20
|
+
isCreating: boolean | null;
|
21
|
+
isUpdating: boolean | null;
|
22
|
+
isCopying: boolean | null;
|
23
|
+
isDeleting: boolean | null;
|
24
|
+
row: IKgTableRow | null;
|
25
|
+
};
|
26
|
+
export declare type IKgSubmitOnBeforeOpenEventListener = ((param: IKgSubmitOnBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
27
|
+
export declare type IKgSubmitOnOpenEventListenerParameter = {
|
28
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isCreating} */
|
29
|
+
isCreating: boolean | null;
|
30
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isUpdating} */
|
31
|
+
isUpdating: boolean | null;
|
32
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isCopying} */
|
33
|
+
isCopying: boolean | null;
|
34
|
+
/** @deprecated 请直接使用 {@link IUseKgVar.isDeleting} */
|
35
|
+
isDeleting: boolean | null;
|
36
|
+
/** @deprecated 请直接使用 {@link IUseKgTable.selectedRow} */
|
37
|
+
row: IKgTableRow | null;
|
38
|
+
/** @deprecated 请直接使用 {@link IUseKgSearch.formModel} */
|
39
|
+
model: Ref<Record<string, any>>;
|
40
|
+
};
|
41
|
+
export declare type IKgSubmitOnOpenEventListener = ((param: IKgSubmitOnOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
42
|
+
export declare type IKgSubmitOnBeforeOkEventListenerParameter = {
|
43
|
+
/**
|
44
|
+
* 表单数据对象.
|
45
|
+
* @deprecated 已弃用, 请使用 {@link IUseKgSubmit.formModel}
|
46
|
+
*/
|
47
|
+
model: Ref<Record<string, any>>;
|
48
|
+
};
|
49
|
+
export declare type IKgSubmitOnBeforeOkEventListener = ((param: IKgSubmitOnBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
50
|
+
export declare type IKgSubmitOnAfterValidateEventListenerParameter = {
|
51
|
+
isCopying: boolean | null;
|
52
|
+
isCreating: boolean | null;
|
53
|
+
isDeleting: boolean | null;
|
54
|
+
isUpdating: boolean | null;
|
55
|
+
model: Ref<Record<string, any>>;
|
56
|
+
row: IKgTableRow | null;
|
57
|
+
rows: Array<IKgTableRow> | null;
|
58
|
+
};
|
59
|
+
export declare type IKgSubmitOnAfterValidateEventListener = ((param: IKgSubmitOnAfterValidateEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
60
|
+
export declare type IKgSubmitOnBeforeRequestEventListenerParameter = {
|
61
|
+
/**
|
62
|
+
* <p>请求参数. 是一个对象或者列表. 是对「表单数据对象」解析之后得到的请求参数, 如果需要修改某些参数, 则直接修改该对象的属性即可.</p>
|
63
|
+
*/
|
64
|
+
data: Ref<KgAny>;
|
65
|
+
/** @deprecated */
|
66
|
+
isCopying: boolean | null;
|
67
|
+
/** @deprecated */
|
68
|
+
isCreating: boolean | null;
|
69
|
+
/** @deprecated */
|
70
|
+
isDeleting: boolean | null;
|
71
|
+
/** @deprecated */
|
72
|
+
isUpdating: boolean | null;
|
73
|
+
/** @deprecated */
|
74
|
+
model: Ref<Record<string, any>>;
|
75
|
+
/**
|
76
|
+
* 请求参数.
|
77
|
+
*/
|
78
|
+
params: Ref<Record<string, any>>;
|
79
|
+
/** @deprecated */
|
80
|
+
row: IKgTableRow | null;
|
81
|
+
/** @deprecated */
|
82
|
+
rows: Array<IKgTableRow> | null;
|
83
|
+
};
|
84
|
+
export declare type IKgSubmitOnBeforeRequestEventListener = ((param: IKgSubmitOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
85
|
+
export declare type IKgSubmitOnOkEventListenerParameter = {
|
86
|
+
isCreating: boolean | null;
|
87
|
+
isUpdating: boolean | null;
|
88
|
+
isCopying: boolean | null;
|
89
|
+
isDeleting: boolean | null;
|
90
|
+
row: IKgTableRow | null;
|
91
|
+
model: Ref<Record<string, any>>;
|
92
|
+
/** 接口返回结果. */
|
93
|
+
result: any | null;
|
94
|
+
};
|
95
|
+
export declare type IKgSubmitOnOkEventListener = ((param: IKgSubmitOnOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
96
|
+
export declare type IKgSubmitOnBeforeCancelEventListenerParameter = {};
|
97
|
+
export declare type IKgSubmitOnBeforeCancelEventListener = ((param: IKgSubmitOnBeforeCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
98
|
+
export declare type IKgSubmitOnCancelEventListenerParameter = {};
|
99
|
+
export declare type IKgSubmitOnCancelEventListener = ((param: IKgSubmitOnCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
100
|
+
export declare type IKgSubmitOnErrorEventListenerParameter = {};
|
101
|
+
export declare type IKgSubmitOnErrorEventListener = ((param: IKgSubmitOnErrorEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
102
|
+
export declare type IKgSubmitOnCloseEventListenerParameter = {} | null | undefined;
|
103
|
+
export declare type IKgSubmitOnCloseEventListener = ((param: IKgSubmitOnCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
104
|
+
export declare type IKgSubmitEventListenerParameter = IKgSubmitOnBeforeOpenEventListenerParameter | IKgSubmitOnOpenEventListenerParameter | IKgSubmitOnBeforeOkEventListenerParameter | IKgSubmitOnAfterValidateEventListenerParameter | IKgSubmitOnBeforeRequestEventListenerParameter | IKgSubmitOnOkEventListenerParameter | IKgSubmitOnBeforeCancelEventListenerParameter | IKgSubmitOnCancelEventListenerParameter | IKgSubmitOnErrorEventListenerParameter | IKgSubmitOnCloseEventListenerParameter;
|
105
|
+
export declare type IKgSubmitEventListener = IKgSubmitOnBeforeOpenEventListener | IKgSubmitOnOpenEventListener | IKgSubmitOnBeforeOkEventListener | IKgSubmitOnAfterValidateEventListener | IKgSubmitOnBeforeRequestEventListener | IKgSubmitOnOkEventListener | IKgSubmitOnBeforeCancelEventListener | IKgSubmitOnCancelEventListener | IKgSubmitOnErrorEventListener | IKgSubmitOnCloseEventListener;
|
@@ -1,8 +1,10 @@
|
|
1
|
+
import { IRemoveEventListener } from '@kengic/core.core';
|
1
2
|
import { FormInstance } from 'ant-design-vue';
|
2
3
|
import { ComputedRef, Ref } from 'vue';
|
3
4
|
import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
|
4
|
-
import { IKgVarSubmitConfigProperties,
|
5
|
-
import {
|
5
|
+
import { IKgVarSubmitConfigProperties, KG__VAR_BUTTON__TYPE, KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE, KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT, KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../const';
|
6
|
+
import { IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './index.event';
|
7
|
+
import { IKgSubmitStore } from './index.store';
|
6
8
|
export interface IUseKgSubmit {
|
7
9
|
/**
|
8
10
|
* <p>添加一个「提交表单字段」.</p>
|
@@ -157,14 +159,14 @@ export interface IUseKgSubmit {
|
|
157
159
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
158
160
|
* @return {} 移除事件监听函数.
|
159
161
|
*/
|
160
|
-
onAfterValidate(listener:
|
162
|
+
onAfterValidate(listener: IKgSubmitOnAfterValidateEventListener, isOnce?: boolean): IRemoveEventListener;
|
161
163
|
/**
|
162
164
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗.</p>
|
163
165
|
* @param listener 事件监听函数.
|
164
166
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
165
167
|
* @return {} 移除事件监听函数.
|
166
168
|
*/
|
167
|
-
onBeforeCancel(listener: IKgSubmitOnBeforeCancelEventListener, isOnce?: boolean):
|
169
|
+
onBeforeCancel(listener: IKgSubmitOnBeforeCancelEventListener, isOnce?: boolean): IRemoveEventListener;
|
168
170
|
/**
|
169
171
|
* <p>监听事件: 点击确认按钮之后, 执行默认逻辑之前.</p>
|
170
172
|
* <ul>
|
@@ -177,14 +179,14 @@ export interface IUseKgSubmit {
|
|
177
179
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
178
180
|
* @return {} 移除事件监听函数.
|
179
181
|
*/
|
180
|
-
onBeforeOk(listener:
|
182
|
+
onBeforeOk(listener: IKgSubmitOnBeforeOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
181
183
|
/**
|
182
184
|
* <p>监听事件: 打开提交弹窗之前.</p>
|
183
185
|
* @param listener 事件监听函数.
|
184
186
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
185
187
|
* @return {} 移除事件监听函数.
|
186
188
|
*/
|
187
|
-
onBeforeOpen(listener:
|
189
|
+
onBeforeOpen(listener: IKgSubmitOnBeforeOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
188
190
|
/**
|
189
191
|
* <p>监听事件: 发起接口请求之前. 表单验证完成, 参数解析完成.</p>
|
190
192
|
* <p>回调函数如果返回 true, 则不会再执行后面的代码.</p>
|
@@ -193,14 +195,14 @@ export interface IUseKgSubmit {
|
|
193
195
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
194
196
|
* @return {} 移除事件监听函数.
|
195
197
|
*/
|
196
|
-
onBeforeRequest(listener:
|
198
|
+
onBeforeRequest(listener: IKgSubmitOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
197
199
|
/**
|
198
200
|
* <p>监听事件: 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗.</p>
|
199
201
|
* @param listener 事件监听函数.
|
200
202
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
201
203
|
* @return {} 移除事件监听函数.
|
202
204
|
*/
|
203
|
-
onCancel(listener: IKgSubmitOnCancelEventListener, isOnce?: boolean):
|
205
|
+
onCancel(listener: IKgSubmitOnCancelEventListener, isOnce?: boolean): IRemoveEventListener;
|
204
206
|
/**
|
205
207
|
* <p>监听事件: 关闭提交弹窗. 下面几种场景都会触发此事件:</p>
|
206
208
|
* <ul>
|
@@ -212,35 +214,35 @@ export interface IUseKgSubmit {
|
|
212
214
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
213
215
|
* @return {} 移除事件监听函数.
|
214
216
|
*/
|
215
|
-
onClose(listener:
|
217
|
+
onClose(listener: IKgSubmitOnCloseEventListener, isOnce?: boolean): IRemoveEventListener;
|
216
218
|
/**
|
217
219
|
* <p>监听事件: 请求失败. 请求失败了, 或者请求返回了错误消息.</p>
|
218
220
|
* @param listener 事件监听函数.
|
219
221
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
220
222
|
* @return {} 移除事件监听函数.
|
221
223
|
*/
|
222
|
-
onError(listener:
|
224
|
+
onError(listener: IKgSubmitOnErrorEventListener, isOnce?: boolean): IRemoveEventListener;
|
223
225
|
/**
|
224
226
|
* <p>监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 关闭提交弹窗之后.</p>
|
225
227
|
* @param listener 事件监听函数.
|
226
228
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
227
229
|
* @return {} 移除事件监听函数.
|
228
230
|
*/
|
229
|
-
onOk(listener:
|
231
|
+
onOk(listener: IKgSubmitOnOkEventListener, isOnce?: boolean): IRemoveEventListener;
|
230
232
|
/**
|
231
233
|
* <p>监听事件: 打开提交弹窗.</p>
|
232
234
|
* @param listener 事件监听函数.
|
233
235
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
234
236
|
* @return {} 移除事件监听函数.
|
235
237
|
*/
|
236
|
-
onOpen(listener: IKgSubmitOnOpenEventListener, isOnce?: boolean):
|
238
|
+
onOpen(listener: IKgSubmitOnOpenEventListener, isOnce?: boolean): IRemoveEventListener;
|
237
239
|
/**
|
238
240
|
* <p>修改某个「提交表单字段」的部分属性.</p>
|
239
241
|
*
|
240
242
|
* <p>由于提交表单肯定是关联某个按钮的, 因此需要先确认是哪个按钮, 确认逻辑如下:</p>
|
241
243
|
* <ul>
|
242
244
|
* <li>
|
243
|
-
* <p>如果参数 {@link param.buttonVarName} === <code>undefined</code> && {@link param.
|
245
|
+
* <p>如果参数 {@link param.buttonVarName} === <code>undefined</code> && {@link param.buttonType} === <code>undefined</code>, 表示修改的是「当前按钮」.</p>
|
244
246
|
* </li>
|
245
247
|
* <li>
|
246
248
|
* <p>如果参数 {@link param.buttonVarName} !== <code>undefined</code>, 则忽略参数 {@link param.buttonType}, 根据 {@link param.buttonVarName} 和 {@link VarButton.var_nam} 是否匹配来确认按钮.</p>
|
@@ -3,117 +3,15 @@ import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
|
3
3
|
import { StoreDefinition } from 'pinia';
|
4
4
|
import { Ref } from 'vue';
|
5
5
|
import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { IKgTableRow } from '../KgTable';
|
9
|
-
/**
|
10
|
-
* 事件类型.
|
11
|
-
* 'beforeOpen': 打开提交弹窗之前
|
12
|
-
* 'onOpen': 打开提交弹窗
|
13
|
-
* 'beforeOk': 点击确认按钮之后, 执行默认逻辑之前
|
14
|
-
* 'afterValidate': 点击确认按钮之后, 表单验证完成,
|
15
|
-
* 'beforeRequest': 发起接口请求之前. 表单验证完成, 参数解析完成,
|
16
|
-
* 'ok': 请求成功, 关闭提交弹窗之后
|
17
|
-
* 'onBeforeCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗,
|
18
|
-
* 'onCancel': 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗,
|
19
|
-
* 'error': 请求失败. 请求失败了, 或者请求返回了错误消息
|
20
|
-
* 'close': 关闭提交弹窗
|
21
|
-
*/
|
22
|
-
export declare type IKgSubmitEvent = 'beforeOpen' | 'onOpen' | 'beforeOk' | 'afterValidate' | 'beforeRequest' | 'ok' | 'onBeforeCancel' | 'onCancel' | 'error' | 'close';
|
23
|
-
export declare type IKgSubmitBeforeOpenEventListenerParameter = {
|
24
|
-
isCreating: boolean | null;
|
25
|
-
isUpdating: boolean | null;
|
26
|
-
isCopying: boolean | null;
|
27
|
-
isDeleting: boolean | null;
|
28
|
-
row: IKgTableRow | null;
|
29
|
-
};
|
30
|
-
export declare type IKgSubmitBeforeOpenEventListener = ((param: IKgSubmitBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
31
|
-
export declare type IKgSubmitOnOpenEventListenerParameter = {
|
32
|
-
/** @deprecated 请直接使用 {@link IUseKgVar.isCreating} */
|
33
|
-
isCreating: boolean | null;
|
34
|
-
/** @deprecated 请直接使用 {@link IUseKgVar.isUpdating} */
|
35
|
-
isUpdating: boolean | null;
|
36
|
-
/** @deprecated 请直接使用 {@link IUseKgVar.isCopying} */
|
37
|
-
isCopying: boolean | null;
|
38
|
-
/** @deprecated 请直接使用 {@link IUseKgVar.isDeleting} */
|
39
|
-
isDeleting: boolean | null;
|
40
|
-
/** @deprecated 请直接使用 {@link IUseKgTable.selectedRow} */
|
41
|
-
row: IKgTableRow | null;
|
42
|
-
/** @deprecated 请直接使用 {@link IUseKgSearch.formModel} */
|
43
|
-
model: Ref<Record<string, any>>;
|
44
|
-
};
|
45
|
-
export declare type IKgSubmitOnOpenEventListener = ((param: IKgSubmitOnOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
46
|
-
export declare type IKgSubmitBeforeOkEventListenerParameter = {
|
47
|
-
/**
|
48
|
-
* 表单数据对象.
|
49
|
-
* @deprecated 已弃用, 请使用 {@link IUseKgSubmit.formModel}
|
50
|
-
*/
|
51
|
-
model: Ref<Record<string, any>>;
|
52
|
-
};
|
53
|
-
export declare type IKgSubmitBeforeOkEventListener = ((param: IKgSubmitBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
54
|
-
export declare type IKgSubmitAfterValidateEventListenerParameter = {
|
55
|
-
isCopying: boolean | null;
|
56
|
-
isCreating: boolean | null;
|
57
|
-
isDeleting: boolean | null;
|
58
|
-
isUpdating: boolean | null;
|
59
|
-
model: Ref<Record<string, any>>;
|
60
|
-
row: IKgTableRow | null;
|
61
|
-
rows: Array<IKgTableRow> | null;
|
62
|
-
};
|
63
|
-
export declare type IKgSubmitAfterValidateEventListener = ((param: IKgSubmitAfterValidateEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
64
|
-
export declare type IKgSubmitBeforeRequestEventListenerParameter = {
|
65
|
-
/**
|
66
|
-
* <p>请求参数. 是一个对象或者列表. 是对「表单数据对象」解析之后得到的请求参数, 如果需要修改某些参数, 则直接修改该对象的属性即可.</p>
|
67
|
-
*/
|
68
|
-
data: Ref<KgAny>;
|
69
|
-
/** @deprecated */
|
70
|
-
isCopying: boolean | null;
|
71
|
-
/** @deprecated */
|
72
|
-
isCreating: boolean | null;
|
73
|
-
/** @deprecated */
|
74
|
-
isDeleting: boolean | null;
|
75
|
-
/** @deprecated */
|
76
|
-
isUpdating: boolean | null;
|
77
|
-
/** @deprecated */
|
78
|
-
model: Ref<Record<string, any>>;
|
79
|
-
/**
|
80
|
-
* 请求参数.
|
81
|
-
*/
|
82
|
-
params: Ref<Record<string, any>>;
|
83
|
-
/** @deprecated */
|
84
|
-
row: IKgTableRow | null;
|
85
|
-
/** @deprecated */
|
86
|
-
rows: Array<IKgTableRow> | null;
|
87
|
-
};
|
88
|
-
export declare type IKgSubmitBeforeRequestEventListener = ((param: IKgSubmitBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
89
|
-
export declare type IKgSubmitOkEventListenerParameter = {
|
90
|
-
isCreating: boolean | null;
|
91
|
-
isUpdating: boolean | null;
|
92
|
-
isCopying: boolean | null;
|
93
|
-
isDeleting: boolean | null;
|
94
|
-
row: IKgTableRow | null;
|
95
|
-
model: Ref<Record<string, any>>;
|
96
|
-
/** 接口返回结果. */
|
97
|
-
result: any | null;
|
98
|
-
};
|
99
|
-
export declare type IKgSubmitOkEventListener = ((param: IKgSubmitOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
100
|
-
export declare type IKgSubmitOnBeforeCancelEventListenerParameter = {};
|
101
|
-
export declare type IKgSubmitOnBeforeCancelEventListener = ((param: IKgSubmitOnBeforeCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
102
|
-
export declare type IKgSubmitOnCancelEventListenerParameter = {};
|
103
|
-
export declare type IKgSubmitOnCancelEventListener = ((param: IKgSubmitOnCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
104
|
-
export declare type IKgSubmitErrorEventListenerParameter = {};
|
105
|
-
export declare type IKgSubmitErrorEventListener = ((param: IKgSubmitErrorEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
106
|
-
export declare type IKgSubmitCloseEventListenerParameter = {} | null | undefined;
|
107
|
-
export declare type IKgSubmitCloseEventListener = ((param: IKgSubmitCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
108
|
-
export declare type IKgSubmitEventListenerParameter = IKgSubmitBeforeOpenEventListenerParameter | IKgSubmitOnOpenEventListenerParameter | IKgSubmitBeforeOkEventListenerParameter | IKgSubmitAfterValidateEventListenerParameter | IKgSubmitBeforeRequestEventListenerParameter | IKgSubmitOkEventListenerParameter | IKgSubmitOnBeforeCancelEventListenerParameter | IKgSubmitOnCancelEventListenerParameter | IKgSubmitErrorEventListenerParameter | IKgSubmitCloseEventListenerParameter;
|
109
|
-
export declare type IKgSubmitEventListener = IKgSubmitBeforeOpenEventListener | IKgSubmitOnOpenEventListener | IKgSubmitBeforeOkEventListener | IKgSubmitAfterValidateEventListener | IKgSubmitBeforeRequestEventListener | IKgSubmitOkEventListener | IKgSubmitOnBeforeCancelEventListener | IKgSubmitOnCancelEventListener | IKgSubmitErrorEventListener | IKgSubmitCloseEventListener;
|
6
|
+
import { KG__VAR_BUTTON__TYPE } from '../../const';
|
7
|
+
import { IKgSubmitEvent, IKgSubmitEventListenerParameter, IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './index.event';
|
110
8
|
export interface IUseKgSubmitStoreState {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
9
|
+
onAfterValidate: Map<string, Array<IKgSubmitOnAfterValidateEventListener>>;
|
10
|
+
onBeforeOk: Map<string, Array<IKgSubmitOnBeforeOkEventListener>>;
|
11
|
+
onBeforeOpen: Map<string, Array<IKgSubmitOnBeforeOpenEventListener>>;
|
12
|
+
onBeforeRequest: Map<string, Array<IKgSubmitOnBeforeRequestEventListener>>;
|
13
|
+
onClose: Map<string, Array<IKgSubmitOnCloseEventListener>>;
|
14
|
+
onError: Map<string, Array<IKgSubmitOnErrorEventListener>>;
|
117
15
|
/** 表单数据对象. */
|
118
16
|
formModelMap: Map<string, Record<string, any>>;
|
119
17
|
/** 表单对象. */
|
@@ -124,10 +22,10 @@ export interface IUseKgSubmitStoreState {
|
|
124
22
|
*/
|
125
23
|
formRulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
|
126
24
|
isLoadingMap: Map<string, boolean>;
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
25
|
+
onOk: Map<string, Array<IKgSubmitOnOkEventListener>>;
|
26
|
+
onBeforeCancel: Map<string, Array<IKgSubmitOnBeforeCancelEventListener>>;
|
27
|
+
onCancel: Map<string, Array<IKgSubmitOnCancelEventListener>>;
|
28
|
+
onOpen: Map<string, Array<IKgSubmitOnOpenEventListener>>;
|
131
29
|
}
|
132
30
|
export interface IUseKgSubmitStoreGetters {
|
133
31
|
getFormModel(): (formID?: string | null) => Record<string, any> | null;
|
@@ -172,7 +70,7 @@ export interface IUseKgSubmitStoreActions {
|
|
172
70
|
* @param formID 页面标识.
|
173
71
|
*/
|
174
72
|
dispose(formID?: string | null): void;
|
175
|
-
emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent,
|
73
|
+
emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent, parameter: T): Promise<boolean>;
|
176
74
|
patchVarSubmitDetail(formID: string | null | undefined, param: {
|
177
75
|
buttonType?: KG__VAR_BUTTON__TYPE;
|
178
76
|
buttonVarName?: string | null;
|
@@ -11,10 +11,10 @@ export declare type IUseColumns = {
|
|
11
11
|
columns: ComputedRef<ColumnsType<IKgTableRow>>;
|
12
12
|
/** 当前过滤状态(哪些列有过滤, 哪些列没过滤). */
|
13
13
|
filterInfo: Ref<Record<string, any>>;
|
14
|
-
/** 当前排序状态. */
|
15
|
-
sorterInfo: Ref<SorterResult<any>>;
|
16
14
|
/** 横向滚动宽度. */
|
17
15
|
scrollX: ComputedRef<string>;
|
16
|
+
/** 当前排序状态. */
|
17
|
+
sorterInfo: Ref<SorterResult<any> | undefined>;
|
18
18
|
};
|
19
19
|
export declare function _useColumns(props: IKgTableProps): IUseColumns;
|
20
20
|
export declare function _useLoading(): {
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { IKgEventListener } from '@kengic/core.core';
|
2
|
+
import { Ref } from 'vue';
|
3
|
+
import { IPage } from '../../api/WMS/models';
|
4
|
+
import { IKgTableRow } from './index.vm';
|
5
|
+
/**
|
6
|
+
* 事件类型.
|
7
|
+
* 'onReady': 就绪, 配置初始完成, 组件渲染完成
|
8
|
+
* 'onRowDoubleClick': 双击某行
|
9
|
+
* 'onBeforeParseRequestParameter': 即将解析请求参数,
|
10
|
+
* 'onBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
|
11
|
+
* 'onBeforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
|
12
|
+
* 'onAfterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
|
13
|
+
*/
|
14
|
+
export declare type IKgTableEvent = 'onReady' | 'onRowDoubleClick' | 'onBeforeParseRequestParameter' | 'onBeforeRequest' | 'onBeforeSetDatas' | 'onAfterRequest';
|
15
|
+
export declare type IKgTableOnReadyEventListenerParameter = {};
|
16
|
+
export declare type IKgTableOnReadyEventListener = ((param: IKgTableOnReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
17
|
+
export declare type IKgTableOnRowDoubleClickEventListenerParameter = {
|
18
|
+
/** 双击的行. */
|
19
|
+
row: IKgTableRow;
|
20
|
+
};
|
21
|
+
export declare type IKgTableOnRowDoubleClickEventListener = ((param: IKgTableOnRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
22
|
+
export declare type IKgTableOnBeforeParseRequestParameterEventListenerParameter = {
|
23
|
+
/**
|
24
|
+
* 查询接口请求参数, 尚未解析.
|
25
|
+
*/
|
26
|
+
params: Record<string, any>;
|
27
|
+
};
|
28
|
+
export declare type IKgTableOnBeforeParseRequestParameterEventListener = ((param: IKgTableOnBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
29
|
+
export declare type IKgTableOnBeforeRequestEventListenerParameter = {
|
30
|
+
/** 查询接口请求参数. */
|
31
|
+
params: Record<string, any>;
|
32
|
+
/** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
|
33
|
+
response: Ref;
|
34
|
+
};
|
35
|
+
export declare type IKgTableOnBeforeRequestEventListener = ((param: IKgTableOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
36
|
+
export declare type IKgTableOnBeforeSetDatasEventListenerParameter = {
|
37
|
+
/**
|
38
|
+
* 列表数据.
|
39
|
+
*/
|
40
|
+
datas: Ref<Array<IKgTableRow>>;
|
41
|
+
/**
|
42
|
+
* 数据总数.
|
43
|
+
*/
|
44
|
+
total: Ref<Number>;
|
45
|
+
};
|
46
|
+
export declare type IKgTableOnBeforeSetDatasEventListener = ((param: IKgTableOnBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
47
|
+
export declare type IKgTableOnAfterRequestEventListenerParameter = {
|
48
|
+
/** 查询接口请求参数. */
|
49
|
+
params: Record<string, any>;
|
50
|
+
/** 接口返回的分页数据. */
|
51
|
+
response: IPage<IKgTableRow> | null | undefined;
|
52
|
+
/** 列表数据. */
|
53
|
+
datas: Ref<Array<IKgTableRow>>;
|
54
|
+
};
|
55
|
+
export declare type IKgTableOnAfterRequestEventListener = ((param: IKgTableOnAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
56
|
+
export declare type IKgTableEventListenerParameter = IKgTableOnReadyEventListenerParameter | IKgTableOnRowDoubleClickEventListenerParameter | IKgTableOnBeforeParseRequestParameterEventListenerParameter | IKgTableOnBeforeRequestEventListenerParameter | IKgTableOnBeforeSetDatasEventListenerParameter | IKgTableOnAfterRequestEventListenerParameter;
|
57
|
+
export declare type IKgTableEventListener = IKgTableOnReadyEventListener | IKgTableOnRowDoubleClickEventListener | IKgTableOnBeforeParseRequestParameterEventListener | IKgTableOnBeforeRequestEventListener | IKgTableOnBeforeSetDatasEventListener | IKgTableOnAfterRequestEventListener;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import { IRemoveEventListener } from '@kengic/core.core';
|
1
2
|
import { ComputedRef } from 'vue';
|
2
3
|
import { VarGridConfig, VarGridDetail } from '../../api/WMS/models';
|
3
|
-
import {
|
4
|
-
import {
|
4
|
+
import { IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './index.event';
|
5
|
+
import { IKgTableStore } from './index.store';
|
5
6
|
export interface IUseKgTable {
|
6
7
|
/**
|
7
8
|
* 列表数据.
|
@@ -55,11 +56,11 @@ export interface IUseKgTable {
|
|
55
56
|
* @param listener 事件监听函数.
|
56
57
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
57
58
|
*/
|
58
|
-
onAfterRequest(listener:
|
59
|
+
onAfterRequest(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
59
60
|
/**
|
60
61
|
* @deprecated 已废弃, 请使用 onAfterRequest() 方法.
|
61
62
|
*/
|
62
|
-
onAfterSearch(listener:
|
63
|
+
onAfterSearch(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
63
64
|
/**
|
64
65
|
* <p>监听事件: 即将解析请求参数.</p>
|
65
66
|
* <p>在该事件中, 可以修改解析前的参数.</p>
|
@@ -67,43 +68,43 @@ export interface IUseKgTable {
|
|
67
68
|
* @param listener 事件监听函数.
|
68
69
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
69
70
|
*/
|
70
|
-
onBeforeParseRequestParameter(listener:
|
71
|
+
onBeforeParseRequestParameter(listener: IKgTableOnBeforeParseRequestParameterEventListener, isOnce?: boolean): IRemoveEventListener;
|
71
72
|
/**
|
72
73
|
* 监听事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
|
73
74
|
* @param listener 事件监听函数.
|
74
75
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
75
76
|
*/
|
76
|
-
onBeforeRequest(listener:
|
77
|
+
onBeforeRequest(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
77
78
|
/**
|
78
79
|
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
79
80
|
*/
|
80
|
-
onBeforeRetrieve(listener:
|
81
|
+
onBeforeRetrieve(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
81
82
|
/**
|
82
83
|
* @deprecated 已废弃, 请使用 onBeforeRequest() 方法.
|
83
84
|
*/
|
84
|
-
onBeforeSearch(listener:
|
85
|
+
onBeforeSearch(listener: IKgTableOnBeforeRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
85
86
|
/**
|
86
87
|
* 监听事件: 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
|
87
88
|
* @param listener 事件监听函数.
|
88
89
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
89
90
|
*/
|
90
|
-
onBeforeSetDatas(listener:
|
91
|
+
onBeforeSetDatas(listener: IKgTableOnBeforeSetDatasEventListener, isOnce?: boolean): IRemoveEventListener;
|
91
92
|
/**
|
92
93
|
* 监听事件: ready, 配置初始完成, 组件渲染完成.
|
93
94
|
* @param listener 事件监听函数.
|
94
95
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
95
96
|
*/
|
96
|
-
onReady(listener:
|
97
|
+
onReady(listener: IKgTableOnReadyEventListener, isOnce?: boolean): IRemoveEventListener;
|
97
98
|
/**
|
98
99
|
* @deprecated 已废弃, 请使用 onAfterSearch() 方法.
|
99
100
|
*/
|
100
|
-
onRetrieve(listener:
|
101
|
+
onRetrieve(listener: IKgTableOnAfterRequestEventListener, isOnce?: boolean): IRemoveEventListener;
|
101
102
|
/**
|
102
103
|
* 监听事件: 双击某行.
|
103
104
|
* @param listener 事件监听函数.
|
104
105
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
105
106
|
*/
|
106
|
-
onRowDoubleClick(listener:
|
107
|
+
onRowDoubleClick(listener: IKgTableOnRowDoubleClickEventListener, isOnce?: boolean): IRemoveEventListener;
|
107
108
|
/** 当前分页选项. */
|
108
109
|
pageSizeOption: ComputedRef<number>;
|
109
110
|
/** 所有分页选项. */
|
@@ -1,67 +1,14 @@
|
|
1
1
|
import { Key } from 'ant-design-vue/lib/_util/type';
|
2
2
|
import { StoreDefinition } from 'pinia';
|
3
3
|
import { Ref } from 'vue';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import { VarGridConfig, VarGridDetail } from '../../api/WMS/models';
|
5
|
+
import { IKgTableEvent, IKgTableEventListenerParameter, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './index.event';
|
6
6
|
import { IKgTableRow, IKgTableRowHeight } from './index.vm';
|
7
|
-
/**
|
8
|
-
* 事件类型.
|
9
|
-
* 'ready': 就绪, 配置初始完成, 组件渲染完成
|
10
|
-
* 'rowDoubleClick': 双击某行
|
11
|
-
* 'beforeParseRequestParameter': 即将解析请求参数,
|
12
|
-
* 'beforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
|
13
|
-
* 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
|
14
|
-
* 'afterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
|
15
|
-
*/
|
16
|
-
export declare type IKgTableEvent = 'ready' | 'rowDoubleClick' | 'beforeParseRequestParameter' | 'beforeRequest' | 'beforeSetDatas' | 'afterRequest';
|
17
|
-
export declare type IKgTableReadyEventListenerParameter = {};
|
18
|
-
export declare type IKgTableReadyEventListener = ((param: IKgTableReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
19
|
-
export declare type IKgTableRowDoubleClickEventListenerParameter = {
|
20
|
-
/** 双击的行. */
|
21
|
-
row: IKgTableRow;
|
22
|
-
};
|
23
|
-
export declare type IKgTableRowDoubleClickEventListener = ((param: IKgTableRowDoubleClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
24
|
-
export declare type IKgTableBeforeParseRequestParameterEventListenerParameter = {
|
25
|
-
/**
|
26
|
-
* 查询接口请求参数, 尚未解析.
|
27
|
-
*/
|
28
|
-
params: Record<string, any>;
|
29
|
-
};
|
30
|
-
export declare type IKgTableBeforeParseParameterEventListener = ((param: IKgTableBeforeParseRequestParameterEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
31
|
-
export declare type IKgTableBeforeRequestEventListenerParameter = {
|
32
|
-
/** 查询接口请求参数. */
|
33
|
-
params: Record<string, any>;
|
34
|
-
/** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
|
35
|
-
response: Ref;
|
36
|
-
};
|
37
|
-
export declare type IKgTableBeforeRequestEventListener = ((param: IKgTableBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
38
|
-
export declare type IKgTableBeforeSetDatasEventListenerParameter = {
|
39
|
-
/**
|
40
|
-
* 列表数据.
|
41
|
-
*/
|
42
|
-
datas: Ref<Array<IKgTableRow>>;
|
43
|
-
/**
|
44
|
-
* 数据总数.
|
45
|
-
*/
|
46
|
-
total: Ref<Number>;
|
47
|
-
};
|
48
|
-
export declare type IKgTableBeforeSetDatasEventListener = ((param: IKgTableBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
49
|
-
export declare type IKgTableAfterRequestEventListenerParameter = {
|
50
|
-
/** 查询接口请求参数. */
|
51
|
-
params: Record<string, any>;
|
52
|
-
/** 接口返回的分页数据. */
|
53
|
-
response: IPage<IKgTableRow> | null | undefined;
|
54
|
-
/** 列表数据. */
|
55
|
-
datas: Ref<Array<IKgTableRow>>;
|
56
|
-
};
|
57
|
-
export declare type IKgTableAfterRequestEventListener = ((param: IKgTableAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
58
|
-
export declare type IKgTableEventListenerParameter = IKgTableReadyEventListenerParameter | IKgTableRowDoubleClickEventListenerParameter | IKgTableBeforeParseRequestParameterEventListenerParameter | IKgTableBeforeRequestEventListenerParameter | IKgTableBeforeSetDatasEventListenerParameter | IKgTableAfterRequestEventListenerParameter;
|
59
|
-
export declare type IKgTableEventListener = IKgTableReadyEventListener | IKgTableRowDoubleClickEventListener | IKgTableBeforeParseParameterEventListener | IKgTableBeforeRequestEventListener | IKgTableBeforeSetDatasEventListener | IKgTableAfterRequestEventListener;
|
60
7
|
export interface IUseKgTableStoreState {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
8
|
+
onAfterRequest: Map<string, Array<IKgTableOnAfterRequestEventListener>>;
|
9
|
+
onBeforeParseParameter: Map<string, Array<IKgTableOnBeforeParseRequestParameterEventListener>>;
|
10
|
+
onBeforeRequest: Map<string, Array<IKgTableOnBeforeRequestEventListener>>;
|
11
|
+
onBeforeSetDatas: Map<string, Array<IKgTableOnBeforeSetDatasEventListener>>;
|
65
12
|
/** 列表数据. */
|
66
13
|
datasMap: Map<String, Array<any>>;
|
67
14
|
/** 是否就绪: 配置初始完成, 组件渲染完成. */
|
@@ -88,14 +35,14 @@ export interface IUseKgTableStoreState {
|
|
88
35
|
*/
|
89
36
|
isShowDescriptionMap: Map<string, boolean>;
|
90
37
|
/** 事件监听函数列表: ready. */
|
91
|
-
|
38
|
+
onReady: Map<string, Array<IKgTableOnReadyEventListener>>;
|
92
39
|
/**
|
93
40
|
* <p>查询参数.</p>
|
94
41
|
* <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
|
95
42
|
*/
|
96
43
|
requestParamsMap: Map<string, Record<string, any>>;
|
97
44
|
/** '双击某行'事件监听函数列表. */
|
98
|
-
|
45
|
+
onRowDoubleClick: Map<string, Array<IKgTableOnRowDoubleClickEventListener>>;
|
99
46
|
/** 行高. */
|
100
47
|
rowHeightMap: Map<string, IKgTableRowHeight>;
|
101
48
|
/** 勾选的行的主键. */
|
@@ -162,9 +109,9 @@ export interface IUseKgTableStoreActions {
|
|
162
109
|
* 触发事件.
|
163
110
|
* @param formID 界面标识.
|
164
111
|
* @param event 事件名称.
|
165
|
-
* @param
|
112
|
+
* @param parameter 事件参数.
|
166
113
|
*/
|
167
|
-
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent,
|
114
|
+
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, parameter: T): Promise<boolean>;
|
168
115
|
/**
|
169
116
|
* 修改「表格配置」的部分属性.
|
170
117
|
*
|