@kengic/vue 0.21.5-beta.1 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +10162 -10277
  4. package/dist/project/index.ts +1 -1
  5. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Add.d.ts +2 -2
  6. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Delete.d.ts +1 -1
  7. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/DeleteBatch.d.ts +1 -1
  8. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/Edit.d.ts +2 -2
  9. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/ExportXls.d.ts +1 -1
  10. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/ImportExcel.d.ts +1 -1
  11. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarConfigDescriptionController}/List.d.ts +2 -2
  12. package/dist/src/apis/WMS/Controllers/{VarContextController → VarConfigDescriptionController}/QueryById.d.ts +2 -2
  13. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Add.d.ts +1 -1
  14. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Edit.d.ts +1 -1
  15. package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/List.d.ts +1 -1
  16. package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarVariableController}/QueryById.d.ts +2 -2
  17. package/dist/src/apis/WMS/Controllers/index.d.ts +2 -2
  18. package/dist/src/apis/WMS/models.d.ts +179 -251
  19. package/dist/src/components/KgButton/index.hooks.d.ts +239 -42
  20. package/dist/src/components/KgButton/index.store.d.ts +171 -53
  21. package/dist/src/components/KgForm.Item/KgForm.Item.hooks.d.ts +4 -6
  22. package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +3 -3
  23. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +1 -1
  24. package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +1 -1
  25. package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +1 -1
  26. package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +1 -1
  27. package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +1 -1
  28. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +5 -3
  29. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +5 -3
  30. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.hooks.d.ts +3 -3
  31. package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +1 -1
  32. package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +1 -1
  33. package/dist/src/components/KgForm.Item/index.vm.d.ts +5 -5
  34. package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +0 -7
  35. package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +4 -4
  36. package/dist/src/components/KgSubmit/index.hooks.d.ts +316 -19
  37. package/dist/src/components/KgSubmit/index.store.d.ts +247 -24
  38. package/dist/src/components/KgTable/index.hooks.d.ts +36 -84
  39. package/dist/src/components/KgVar/index.hooks.d.ts +2796 -2027
  40. package/dist/src/components/KgVar/index.store.d.ts +2421 -2395
  41. package/dist/src/components/KgVar/index.store.service.d.ts +3 -3
  42. package/dist/src/components/KgVarConfig/components/submit/{KgVarConfig.Modal.Submit.VarSubmitField.d.ts → KgVarConfig.Modal.Submit.VarSubmitDetail.d.ts} +2 -2
  43. package/dist/src/components/KgVarConfig/index.store.d.ts +7 -7
  44. package/dist/src/consts/i18n/en.d.ts +5 -4
  45. package/dist/src/consts/i18n/zh_CN.d.ts +5 -4
  46. package/dist/src/consts/index.d.ts +4 -4
  47. package/dist/src/consts/index.vm.d.ts +8 -11
  48. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +170 -440
  49. package/dist/src/utils/kg-var.util.d.ts +23 -11
  50. package/dist/src/utils/kg.util.d.ts +19 -10
  51. package/package.json +4 -4
  52. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarConfigDescriptionController}/index.d.ts +0 -0
  53. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/Delete.d.ts +0 -0
  54. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/DeleteBatch.d.ts +0 -0
  55. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/ExportXls.d.ts +0 -0
  56. /package/dist/src/apis/WMS/Controllers/{VarContextController → VarVariableController}/ImportExcel.d.ts +0 -0
  57. /package/dist/src/apis/WMS/Controllers/{VarVariableCatalogController → VarVariableController}/index.d.ts +0 -0
  58. /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.VarVariableCatalog.d.ts → KgVarConfig.Modal.Var.VarConfigDescription.d.ts} +0 -0
@@ -1,50 +1,145 @@
1
+ import { VarButton } from '../../apis/WMS/models';
1
2
  import { KG_BUTTON_TYPE } from '../../consts';
2
- import { IKgButtonClickCb, IKgButtonDeleteOkCb, IKgButtonEvent, IKgButtonImportOkCb, IKgButtonOtherOkCb, IKgButtonUpdateBeforeClickCb } from './index.store';
3
+ import { IKgButtonClickCb, IKgButtonEvent, IKgButtonImportOkCb, IKgButtonSubmitCancelCb, IKgButtonSubmitSaveCb } from './index.store';
3
4
  /**
4
5
  * @param formID 界面标识.
5
6
  */
6
7
  export declare function useKgButton(formID?: string | null): {
7
8
  formID: string;
8
9
  store: import("pinia").Store<"KgButton", {
9
- isCreateClickInterceptedMap: Map<string, boolean>;
10
+ currentButtonMap: Map<string, VarButton | null>;
11
+ isCurrentButtonRequestingMap: Map<string, boolean>;
12
+ isClickInterceptedMap: Map<string, boolean>;
10
13
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
11
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
12
14
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
13
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
14
- submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
15
- submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
16
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
15
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
16
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
17
17
  }, {
18
- getIsCreateClickIntercepted(state: {
19
- isCreateClickInterceptedMap: Map<string, boolean>;
18
+ isClickIntercepted(state: {
19
+ currentButtonMap: Map<string, VarButton | null>;
20
+ isCurrentButtonRequestingMap: Map<string, boolean>;
21
+ isClickInterceptedMap: Map<string, boolean>;
20
22
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
21
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
22
23
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
23
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
24
- submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
25
- submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
26
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
24
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
25
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
27
26
  } & import("pinia").PiniaCustomStateProperties<{
28
- isCreateClickInterceptedMap: Map<string, boolean>;
27
+ currentButtonMap: Map<string, VarButton | null>;
28
+ isCurrentButtonRequestingMap: Map<string, boolean>;
29
+ isClickInterceptedMap: Map<string, boolean>;
29
30
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
30
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
31
31
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
32
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
33
- submitCancelListenersMap: Map<string, import("./index.store").IKgButtonSubmitCancelCb[]>;
34
- submitSaveListenersMap: Map<string, import("./index.store").IKgButtonSubmitSaveCb[]>;
35
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
36
- }>): (param: {
37
- formID: string;
32
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
33
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
34
+ }>): (formID: string | null | undefined, param: {
35
+ type?: KG_BUTTON_TYPE | undefined; /**
36
+ * <p>判断某个按钮是否是「当前按钮」.</p>
37
+ *
38
+ * <ul>
39
+ * <li>
40
+ * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
41
+ * <p>调用方式如下: <code>isCurrentButton({ type: KG_BUTTON_TYPE.CREATE });</code></p>
42
+ * </li>
43
+ * <li>
44
+ * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
45
+ * <p>根据参数 {@link param.varName} 获取按钮.</p>
46
+ * <p>调用方式如下: <code>isCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
47
+ * </li>
48
+ * </ul>
49
+ *
50
+ * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
51
+ * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
52
+ */
53
+ varName?: string | null | undefined;
38
54
  }) => boolean;
55
+ isCurrentButtonRequesting(state: {
56
+ currentButtonMap: Map<string, VarButton | null>;
57
+ isCurrentButtonRequestingMap: Map<string, boolean>;
58
+ isClickInterceptedMap: Map<string, boolean>;
59
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
60
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
61
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
62
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
63
+ } & import("pinia").PiniaCustomStateProperties<{
64
+ currentButtonMap: Map<string, VarButton | null>;
65
+ isCurrentButtonRequestingMap: Map<string, boolean>;
66
+ isClickInterceptedMap: Map<string, boolean>;
67
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
68
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
69
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
70
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
71
+ }>): (formID: string | null | undefined) => boolean;
72
+ getCurrentButton: (state: {
73
+ currentButtonMap: Map<string, VarButton | null>;
74
+ isCurrentButtonRequestingMap: Map<string, boolean>;
75
+ isClickInterceptedMap: Map<string, boolean>;
76
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
77
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
78
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
79
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
80
+ } & import("pinia").PiniaCustomStateProperties<{
81
+ currentButtonMap: Map<string, VarButton | null>;
82
+ isCurrentButtonRequestingMap: Map<string, boolean>;
83
+ isClickInterceptedMap: Map<string, boolean>;
84
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
85
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
86
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
87
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
88
+ }>) => (formID: string | null | undefined) => VarButton | null;
89
+ isCurrentButton(state: {
90
+ currentButtonMap: Map<string, VarButton | null>;
91
+ isCurrentButtonRequestingMap: Map<string, boolean>;
92
+ isClickInterceptedMap: Map<string, boolean>;
93
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
94
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
95
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
96
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
97
+ } & import("pinia").PiniaCustomStateProperties<{
98
+ currentButtonMap: Map<string, VarButton | null>;
99
+ isCurrentButtonRequestingMap: Map<string, boolean>;
100
+ isClickInterceptedMap: Map<string, boolean>;
101
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
102
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
103
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
104
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
105
+ }>): (formID: string, param: {
106
+ varName?: string | undefined;
107
+ type?: KG_BUTTON_TYPE | undefined;
108
+ }) => boolean;
109
+ getSearchButton(state: {
110
+ currentButtonMap: Map<string, VarButton | null>;
111
+ isCurrentButtonRequestingMap: Map<string, boolean>;
112
+ isClickInterceptedMap: Map<string, boolean>;
113
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
114
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
115
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
116
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
117
+ } & import("pinia").PiniaCustomStateProperties<{
118
+ currentButtonMap: Map<string, VarButton | null>;
119
+ isCurrentButtonRequestingMap: Map<string, boolean>;
120
+ isClickInterceptedMap: Map<string, boolean>;
121
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
122
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
123
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
124
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
125
+ }>): (formID: string | null | undefined) => VarButton | null;
39
126
  }, {
40
127
  dispose(formID: string | null | undefined): void;
41
128
  addEventListener(formID: string, event: IKgButtonEvent, cb: import("./index.store").IKgButtonCb): void;
42
129
  removeEventListener(formID: string, event: IKgButtonEvent, cb?: import("./index.store").IKgButtonCb | undefined): void;
43
130
  emit(formID: string, event: IKgButtonEvent, param: any): Promise<boolean>;
44
- setIsCreateClickIntercepted(param: {
45
- formID: string;
131
+ setIsClickIntercepted(formID: string | null | undefined, param: {
46
132
  isIntercepted: boolean;
133
+ type?: KG_BUTTON_TYPE | undefined;
134
+ varName?: string | null | undefined;
47
135
  }): void;
136
+ setIsCurrentButtonRequesting(formID: string | null | undefined, param: {
137
+ isRequesting: boolean;
138
+ }): void;
139
+ setCurrentButton(formID: string, param: {
140
+ type?: KG_BUTTON_TYPE | undefined;
141
+ varName?: string | null | undefined;
142
+ } | null): Promise<void>;
48
143
  click(formID: string, type: KG_BUTTON_TYPE, variableName?: string | undefined): void;
49
144
  }>;
50
145
  /**
@@ -60,45 +155,147 @@ export declare function useKgButton(formID?: string | null): {
60
155
  variableName?: string;
61
156
  }): void;
62
157
  /**
63
- * 事件: 点击按钮.
64
- * @param cb 回调函数.
65
- * @param once 是否只会触发一次. 默认为 undefined.
158
+ * <p>「当前按钮」.</p>
66
159
  */
67
- onClick: (cb: IKgButtonClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
160
+ currentButton: import("vue").ComputedRef<VarButton | null>;
68
161
  /**
69
- * 事件: 点击更新按钮之后, 执行默认逻辑之前. 如果返回 true, 则不再执行后续的默认逻辑.
70
- * @param cb 回调函数.
71
- * @param once 是否只会触发一次. 默认为 undefined.
162
+ * <p>「查询按钮」.</p>
72
163
  */
73
- onUpdateBeforeClick: (cb: IKgButtonUpdateBeforeClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
164
+ searchButton: import("vue").ComputedRef<VarButton | null>;
74
165
  /**
75
- * 事件: 删除成功, 删除接口调用成功.
76
- * @param cb 回调函数.
77
- * @param once 是否只会触发一次. 默认为 undefined.
166
+ * <p>判断「当前按钮」的 click 事件是否被拦截.</p>
78
167
  */
79
- onDeleteOk: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
168
+ isCurrentButtonClickIntercepted: import("vue").ComputedRef<boolean>;
80
169
  /**
81
- * 事件: 导入成功, 导入接口调用成功.
170
+ * <p>判断「当前按钮」是否正在请求后端接口.</p>
171
+ */
172
+ isCurrentButtonRequesting: import("vue").ComputedRef<boolean>;
173
+ /**
174
+ * <p>设置「当前按钮」. 比如点击「创建」按钮, 则此时「创建」按钮就是「当前按钮」, 同一时间最多只会有一个按钮处于「正在执行」状态.</p>
175
+ *
176
+ * <ul>
177
+ * <li>
178
+ * <p>如果参数 {@link param} === null, 表示清空「当前按钮」.</p>
179
+ * <p>调用方式如下: <code>setCurrentButton(null);</code></p>
180
+ * </li>
181
+ * <li>
182
+ * <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
183
+ * <p>调用方式如下: <code>setCurrentButton({ type: KG_BUTTON_TYPE.CREATE });</code></p>
184
+ * </li>
185
+ * <li>
186
+ * <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
187
+ * <p>根据参数 {@link param.varName} 获取按钮.</p>
188
+ * <p>调用方式如下: <code>setCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
189
+ * </li>
190
+ * </ul>
191
+ *
192
+ * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
193
+ * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
194
+ */
195
+ setCurrentButton(param: {
196
+ type?: KG_BUTTON_TYPE;
197
+ varName?: string | null;
198
+ } | null): Promise<void>;
199
+ /**
200
+ * <p>判断某个按钮是否是「当前按钮」.</p>
201
+ *
202
+ * <ul>
203
+ * <li>
204
+ * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
205
+ * <p>调用方式如下: <code>isCurrentButton({ type: KG_BUTTON_TYPE.CREATE });</code></p>
206
+ * </li>
207
+ * <li>
208
+ * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
209
+ * <p>根据参数 {@link param.varName} 获取按钮.</p>
210
+ * <p>调用方式如下: <code>isCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
211
+ * </li>
212
+ * </ul>
213
+ *
214
+ * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
215
+ * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
216
+ */
217
+ isCurrentButton(param: {
218
+ type?: KG_BUTTON_TYPE;
219
+ varName?: string;
220
+ }): boolean;
221
+ /**
222
+ * <p>判断某个按钮的 click 事件是否被拦截.</p>
223
+ * <p>用户调用 <code>kgVar.kgButton().onClick(cb)</code> 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
224
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
225
+ *
226
+ * <ul>
227
+ * <li>
228
+ * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
229
+ * <p>调用方式如下: <code>isClickIntercepted({ type: KG_BUTTON_TYPE.CREATE });</code></p>
230
+ * </li>
231
+ * <li>
232
+ * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
233
+ * <p>根据参数 {@link param.varName} 获取按钮.</p>
234
+ * <p>调用方式如下: <code>isClickIntercepted({ varName: 'SOME-OTHER-BUTTON' });</code></p>
235
+ * </li>
236
+ * </ul>
237
+ *
238
+ * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
239
+ * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
240
+ */
241
+ isClickIntercepted(param: {
242
+ type?: KG_BUTTON_TYPE;
243
+ varName?: string | null;
244
+ }): boolean;
245
+ /**
246
+ * <p>设置某个按钮的 click 事件是否被拦截.</p>
247
+ *
248
+ * <ul>
249
+ * <li>
250
+ * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
251
+ * <p>调用方式如下: <code>setIsClickIntercepted({ type: KG_BUTTON_TYPE.CREATE, isIntercepted: true });</code></p>
252
+ * </li>
253
+ * <li>
254
+ * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
255
+ * <p>根据参数 {@link param.varName} 获取按钮.</p>
256
+ * <p>调用方式如下: <code>setIsClickIntercepted({ varName: 'SOME-OTHER-BUTTON', isIntercepted: true });</code></p>
257
+ * </li>
258
+ * </ul>
259
+ *
260
+ * @param param.isIntercepted 是否被拦截.
261
+ * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
262
+ * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
263
+ */
264
+ setIsClickIntercepted(param: {
265
+ isIntercepted: boolean;
266
+ type?: KG_BUTTON_TYPE;
267
+ varName?: string | null;
268
+ }): void;
269
+ /**
270
+ * 设置「当前按钮」是否正在请求后端接口.
271
+ *
272
+ * @param param.isRequesting 「当前按钮」是否正在请求后端接口.
273
+ */
274
+ setIsCurrentButtonRequesting(param: {
275
+ isRequesting: boolean;
276
+ }): void;
277
+ /**
278
+ * 事件: 点击按钮.
82
279
  * @param cb 回调函数.
83
280
  * @param once 是否只会触发一次. 默认为 undefined.
84
281
  */
85
- onImportOk: (cb: IKgButtonImportOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
282
+ onClick: (cb: IKgButtonClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
86
283
  /**
87
- * 事件: other 类型的按钮接口调用成功.
284
+ * 事件: 导入成功, 导入接口调用成功.
88
285
  * @param cb 回调函数.
89
286
  * @param once 是否只会触发一次. 默认为 undefined.
90
287
  */
91
- onOtherOk: (cb: IKgButtonOtherOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
288
+ onImportOk: (cb: IKgButtonImportOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
92
289
  /**
93
290
  * 事件: 表格内编辑时, 点击保存按钮.
94
291
  * @param cb 回调函数.
95
292
  * @param once 是否只会触发一次. 默认为 undefined.
96
293
  */
97
- onSubmitSave: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
294
+ onSubmitSave: (cb: IKgButtonSubmitSaveCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
98
295
  /**
99
296
  * 事件: 表格内编辑时, 点击取消按钮.
100
297
  * @param cb 回调函数.
101
298
  * @param once 是否只会触发一次. 默认为 undefined.
102
299
  */
103
- onSubmitCancel: (cb: IKgButtonDeleteOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
300
+ onSubmitCancel: (cb: IKgButtonSubmitCancelCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
104
301
  };
@@ -1,87 +1,203 @@
1
1
  import { VarButton } from '../../apis/WMS/models';
2
2
  import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
3
- import { IKgTableRow } from '../KgTable';
4
3
  /**
5
4
  * 事件类型.
6
5
  * 'click': 点击按钮
7
- * 'updateBeforeClick': 点击更新按钮之后, 执行默认逻辑之前. 如果返回 Promise.resolve(false), 则不执行默认逻辑
8
- * 'deleteOk': 删除成功, 删除接口调用成功
9
6
  * 'importOk': 导入成功, 导入接口调用成功
10
- * 'otherOk': other 类型的按钮接口调用成功
11
7
  * 'submitSave': 表格内编辑时, 点击保存按钮
12
8
  * 'submitCancel': 表格内编辑时, 点击取消按钮
13
9
  */
14
- export declare type IKgButtonEvent = 'click' | 'updateBeforeClick' | 'deleteOk' | 'importOk' | 'otherOk' | 'submitSave' | 'submitCancel';
10
+ export declare type IKgButtonEvent = 'click' | 'importOk' | 'submitSave' | 'submitCancel';
15
11
  export declare type IKgButtonClickCbParam = {
16
12
  button: VarButton;
17
13
  };
18
14
  export declare type IKgButtonClickCb = ((button: VarButton) => Promise<boolean>) & IKgEventCb;
19
- export declare type IKgButtonUpdateBeforeClickCbParam = {
20
- button?: VarButton | null;
21
- row?: IKgTableRow | null;
22
- };
23
- export declare type IKgButtonUpdateBeforeClickCb = ((args: IKgButtonUpdateBeforeClickCbParam) => Promise<boolean>) & IKgEventCb;
24
- export declare type IKgButtonDeleteOkCbParam = {
25
- button?: VarButton | null;
26
- /** 删除的行. */
27
- rows: Array<IKgTableRow> | null;
28
- };
29
- export declare type IKgButtonDeleteOkCb = ((args: IKgButtonDeleteOkCbParam) => Promise<boolean>) & IKgEventCb;
30
15
  export declare type IKgButtonImportOkCbParam = {
31
16
  button?: VarButton | null;
32
17
  };
33
18
  export declare type IKgButtonImportOkCb = ((args: IKgButtonImportOkCbParam) => Promise<boolean>) & IKgEventCb;
34
- export declare type IKgButtonOtherOkCbParam = {
35
- button?: VarButton | null;
36
- /** 接口返回的数据. */
37
- data: any;
38
- };
39
- export declare type IKgButtonOtherOkCb = ((args: IKgButtonOtherOkCbParam) => Promise<boolean>) & IKgEventCb;
40
19
  export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventCb;
41
20
  export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
42
- export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonImportOkCbParam | IKgButtonOtherOkCbParam | any;
43
- export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonImportOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
21
+ export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonImportOkCbParam | any;
22
+ export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonImportOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
44
23
  export declare const useKgButtonStore: import("pinia").StoreDefinition<"KgButton", {
45
24
  /**
46
- * <p>创建按钮的 click 事件是否被拦截.</p>
47
- * <p>用户调用 kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被拦截了.</p>
48
- * <p>被拦截之后, 创建按钮的默认逻辑不会执行(即打开提交弹窗, 并加载各种数据等等), 由用户自行处理.</p>
25
+ * <p>当前按钮.</p>
26
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
27
+ */
28
+ currentButtonMap: Map<string, VarButton | null>;
29
+ /**
30
+ * <p>当前按钮是否正在请求后端接口.</p>
31
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
32
+ */
33
+ isCurrentButtonRequestingMap: Map<string, boolean>;
34
+ /**
35
+ * <p>按钮的 click 事件是否被拦截.</p>
36
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
37
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
49
38
  */
50
- isCreateClickInterceptedMap: Map<string, boolean>;
39
+ isClickInterceptedMap: Map<string, boolean>;
51
40
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
52
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
53
41
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
54
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
55
42
  submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
56
43
  submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
57
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
58
44
  }, {
59
- getIsCreateClickIntercepted(state: {
60
- isCreateClickInterceptedMap: Map<string, boolean>;
45
+ isClickIntercepted(state: {
46
+ currentButtonMap: Map<string, VarButton | null>;
47
+ isCurrentButtonRequestingMap: Map<string, boolean>;
48
+ isClickInterceptedMap: Map<string, boolean>;
61
49
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
62
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
63
50
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
64
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
65
51
  submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
66
52
  submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
67
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
68
53
  } & import("pinia").PiniaCustomStateProperties<{
69
54
  /**
70
- * <p>创建按钮的 click 事件是否被拦截.</p>
71
- * <p>用户调用 kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被拦截了.</p>
72
- * <p>被拦截之后, 创建按钮的默认逻辑不会执行(即打开提交弹窗, 并加载各种数据等等), 由用户自行处理.</p>
55
+ * <p>当前按钮.</p>
56
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
73
57
  */
74
- isCreateClickInterceptedMap: Map<string, boolean>;
58
+ currentButtonMap: Map<string, VarButton | null>;
59
+ /**
60
+ * <p>当前按钮是否正在请求后端接口.</p>
61
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
62
+ */
63
+ isCurrentButtonRequestingMap: Map<string, boolean>;
64
+ /**
65
+ * <p>按钮的 click 事件是否被拦截.</p>
66
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
67
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
68
+ */
69
+ isClickInterceptedMap: Map<string, boolean>;
75
70
  clickListenersMap: Map<string, IKgButtonClickCb[]>;
76
- deleteOkListenersMap: Map<string, IKgButtonDeleteOkCb[]>;
77
71
  importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
78
- otherOkListenersMap: Map<string, IKgButtonOtherOkCb[]>;
79
72
  submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
80
73
  submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
81
- updateBeforeClickListenersMap: Map<string, IKgButtonUpdateBeforeClickCb[]>;
82
- }>): (param: {
83
- formID: string;
74
+ }>): (formID: string | undefined | null, param: {
75
+ type?: KG_BUTTON_TYPE;
76
+ varName?: string | null;
84
77
  }) => boolean;
78
+ isCurrentButtonRequesting(state: {
79
+ currentButtonMap: Map<string, VarButton | null>;
80
+ isCurrentButtonRequestingMap: Map<string, boolean>;
81
+ isClickInterceptedMap: Map<string, boolean>;
82
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
83
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
84
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
85
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
86
+ } & import("pinia").PiniaCustomStateProperties<{
87
+ /**
88
+ * <p>当前按钮.</p>
89
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
90
+ */
91
+ currentButtonMap: Map<string, VarButton | null>;
92
+ /**
93
+ * <p>当前按钮是否正在请求后端接口.</p>
94
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
95
+ */
96
+ isCurrentButtonRequestingMap: Map<string, boolean>;
97
+ /**
98
+ * <p>按钮的 click 事件是否被拦截.</p>
99
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
100
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
101
+ */
102
+ isClickInterceptedMap: Map<string, boolean>;
103
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
104
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
105
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
106
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
107
+ }>): (formID: string | undefined | null) => boolean;
108
+ getCurrentButton: (state: {
109
+ currentButtonMap: Map<string, VarButton | null>;
110
+ isCurrentButtonRequestingMap: Map<string, boolean>;
111
+ isClickInterceptedMap: Map<string, boolean>;
112
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
113
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
114
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
115
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
116
+ } & import("pinia").PiniaCustomStateProperties<{
117
+ /**
118
+ * <p>当前按钮.</p>
119
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
120
+ */
121
+ currentButtonMap: Map<string, VarButton | null>;
122
+ /**
123
+ * <p>当前按钮是否正在请求后端接口.</p>
124
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
125
+ */
126
+ isCurrentButtonRequestingMap: Map<string, boolean>;
127
+ /**
128
+ * <p>按钮的 click 事件是否被拦截.</p>
129
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
130
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
131
+ */
132
+ isClickInterceptedMap: Map<string, boolean>;
133
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
134
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
135
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
136
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
137
+ }>) => (formID: string | null | undefined) => VarButton | null;
138
+ isCurrentButton(state: {
139
+ currentButtonMap: Map<string, VarButton | null>;
140
+ isCurrentButtonRequestingMap: Map<string, boolean>;
141
+ isClickInterceptedMap: Map<string, boolean>;
142
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
143
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
144
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
145
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
146
+ } & import("pinia").PiniaCustomStateProperties<{
147
+ /**
148
+ * <p>当前按钮.</p>
149
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
150
+ */
151
+ currentButtonMap: Map<string, VarButton | null>;
152
+ /**
153
+ * <p>当前按钮是否正在请求后端接口.</p>
154
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
155
+ */
156
+ isCurrentButtonRequestingMap: Map<string, boolean>;
157
+ /**
158
+ * <p>按钮的 click 事件是否被拦截.</p>
159
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
160
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
161
+ */
162
+ isClickInterceptedMap: Map<string, boolean>;
163
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
164
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
165
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
166
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
167
+ }>): (formID: string, param: {
168
+ varName?: string;
169
+ type?: KG_BUTTON_TYPE;
170
+ }) => boolean;
171
+ getSearchButton(state: {
172
+ currentButtonMap: Map<string, VarButton | null>;
173
+ isCurrentButtonRequestingMap: Map<string, boolean>;
174
+ isClickInterceptedMap: Map<string, boolean>;
175
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
176
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
177
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
178
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
179
+ } & import("pinia").PiniaCustomStateProperties<{
180
+ /**
181
+ * <p>当前按钮.</p>
182
+ * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
183
+ */
184
+ currentButtonMap: Map<string, VarButton | null>;
185
+ /**
186
+ * <p>当前按钮是否正在请求后端接口.</p>
187
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
188
+ */
189
+ isCurrentButtonRequestingMap: Map<string, boolean>;
190
+ /**
191
+ * <p>按钮的 click 事件是否被拦截.</p>
192
+ * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
193
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
194
+ */
195
+ isClickInterceptedMap: Map<string, boolean>;
196
+ clickListenersMap: Map<string, IKgButtonClickCb[]>;
197
+ importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
198
+ submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
199
+ submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
200
+ }>): (formID: string | null | undefined) => VarButton | null;
85
201
  }, {
86
202
  dispose(formID: string | null | undefined): void;
87
203
  /**
@@ -105,16 +221,18 @@ export declare const useKgButtonStore: import("pinia").StoreDefinition<"KgButton
105
221
  * @param param 数据.
106
222
  */
107
223
  emit(formID: string, event: IKgButtonEvent, param: IKgButtonCbParam): Promise<boolean>;
108
- /**
109
- *
110
- * @param param
111
- * @param param.formID 界面标识.
112
- * @param param.isIntercepted 是否拦截.
113
- */
114
- setIsCreateClickIntercepted(param: {
115
- formID: string;
224
+ setIsClickIntercepted(formID: string | undefined | null, param: {
116
225
  isIntercepted: boolean;
226
+ type?: KG_BUTTON_TYPE;
227
+ varName?: string | null;
228
+ }): void;
229
+ setIsCurrentButtonRequesting(formID: string | undefined | null, param: {
230
+ isRequesting: boolean;
117
231
  }): void;
232
+ setCurrentButton(formID: string, param: {
233
+ type?: KG_BUTTON_TYPE;
234
+ varName?: string | null;
235
+ } | null): Promise<void>;
118
236
  /**
119
237
  * <p>手动点击某个按钮.</p>
120
238
  * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
@@ -1,15 +1,13 @@
1
- import { ComputedRef } from 'vue';
2
1
  import { IKgFormItemProps } from './index.vm';
3
2
  export declare function _useFormRules(props: IKgFormItemProps): {
4
3
  /** 表单验证规则. */
5
- formRules: ComputedRef<import("ant-design-vue/es/form").RuleObject[]>;
4
+ formRules: import("vue").ComputedRef<import("ant-design-vue/es/form").RuleObject[]>;
6
5
  /** 正在计算表单验证规则. */
7
6
  isFormRulesLoading: import("vue").Ref<boolean>;
8
7
  };
9
- export declare type IUseKgFormItem<T = Record<string, any>> = {
8
+ export declare function useKgFormItem<T = Record<string, any>>(props?: IKgFormItemProps): {
10
9
  /** 控件类型. */
11
- controlType: ComputedRef<string | null | undefined>;
10
+ controlType: import("vue").ComputedRef<string | null | undefined>;
12
11
  /** 控件配置参数. */
13
- controlProperties: ComputedRef<T>;
12
+ controlProperties: import("vue").ComputedRef<T>;
14
13
  };
15
- export declare function useKgFormItem<T = Record<string, any>>(props?: IKgFormItemProps): IUseKgFormItem<T>;