@kengic/vue 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/CHANGELOG.md +178 -139
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +4201 -3969
  4. package/dist/project/build/script/postBuild.ts +1 -1
  5. package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
  6. package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
  7. package/dist/src/apis/WMS/models.d.ts +8 -0
  8. package/dist/src/components/KgButton/index.hooks.d.ts +74 -199
  9. package/dist/src/components/KgButton/index.store.d.ts +48 -184
  10. package/dist/src/components/KgForm/index.hooks.d.ts +22 -28
  11. package/dist/src/components/KgForm/index.store.d.ts +22 -15
  12. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -0
  13. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -2
  14. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +2 -4
  15. package/dist/src/components/KgSearch/index.hooks.d.ts +31 -136
  16. package/dist/src/components/KgSearch/index.store.d.ts +59 -175
  17. package/dist/src/components/KgSubmit/index.hooks.d.ts +80 -279
  18. package/dist/src/components/KgSubmit/index.store.d.ts +40 -225
  19. package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
  20. package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
  21. package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
  22. package/dist/src/components/KgTable/index.hooks.d.ts +65 -428
  23. package/dist/src/components/KgTable/index.store.d.ts +87 -621
  24. package/dist/src/components/KgVar/index.hooks.d.ts +105 -3622
  25. package/dist/src/components/KgVar/index.store.d.ts +129 -3213
  26. package/dist/src/config/index.hooks.d.ts +31 -38
  27. package/dist/src/config/index.store.d.ts +74 -52
  28. package/dist/src/consts/i18n/en.d.ts +1 -0
  29. package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
  30. package/dist/src/consts/index.d.ts +20 -13
  31. package/dist/src/consts/index.vm.d.ts +78 -51
  32. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +1 -1
  33. package/dist/src/utils/kg-route.util.d.ts +3 -2
  34. package/dist/src/utils/kg.util.d.ts +2 -2
  35. package/package.json +1 -1
  36. /package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +0 -0
  37. /package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +0 -0
  38. /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
  39. /package/dist/src/components/KgSearch/{KgSearch.hooks.d.ts → KgSearch.service.d.ts} +0 -0
  40. /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
  41. /package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +0 -0
@@ -12,7 +12,7 @@ export const runBuild = async () => {
12
12
  runBuildConfig();
13
13
  }
14
14
 
15
- console.log(`✨` + ' - build successfully!');
15
+ console.log('打包成功.');
16
16
  } catch (error) {
17
17
  console.log(colors.red('vite build error:\n' + error));
18
18
  process.exit(1);
@@ -0,0 +1,16 @@
1
+ import { IRequestConfig, IRequestOptions } from '../../../../services';
2
+ import * as DEF from '../../../def';
3
+ /** 请求参数. */
4
+ export declare class ListByCodeNamesAndCodeValuesQuery {
5
+ }
6
+ /**
7
+ * 根据多个 codeName 和 codeValue 批量查询描述数据.
8
+ *
9
+ * @param config 请求配置.
10
+ * @param option 请求选项.
11
+ */
12
+ export declare function ListByCodeNamesAndCodeValues(config?: IRequestConfig<ListByCodeNamesAndCodeValuesQuery, Array<DEF.WMS.DescriptionBatchQuery>>, option?: IRequestOptions): Promise<Array<DEF.WMS.Description>>;
13
+ export declare namespace ListByCodeNamesAndCodeValues {
14
+ var method: "POST";
15
+ var url: string;
16
+ }
@@ -1 +1,2 @@
1
1
  export { List, ListQuery } from './List';
2
+ export { ListByCodeNamesAndCodeValues, ListByCodeNamesAndCodeValuesQuery } from './ListByCodeNamesAndCodeValues';
@@ -96,6 +96,14 @@ export declare class Description {
96
96
  sysDefFlg?: number | null;
97
97
  constructor(obj?: Description);
98
98
  }
99
+ /** 根据多个 codeName 和 codeValue 批量查询描述数据. */
100
+ export declare class DescriptionBatchQuery {
101
+ /** 描述组的编号. */
102
+ codeName?: string | null;
103
+ /** 描述项的编号列表. */
104
+ codeValues?: Array<string> | null;
105
+ constructor(obj?: DescriptionBatchQuery);
106
+ }
99
107
  /** 获取 SQL 查询结果的元数据. */
100
108
  export declare class GetResultSetMetadataFromSqlQuery {
101
109
  /** SQL. */
@@ -1,152 +1,11 @@
1
- import { VarButton } from '../../apis/WMS/models';
2
- import { KG_BUTTON_TYPE } from '../../consts';
3
- import { IKgButtonClickCb, IKgButtonEvent, IKgButtonImportOkCb, IKgButtonSubmitCancelCb, IKgButtonSubmitSaveCb } from './index.store';
4
- /**
5
- * @param formID 界面标识.
6
- */
7
- export declare function useKgButton(formID?: string | null): {
8
- formID: string;
9
- store: import("pinia").Store<"KgButton", {
10
- currentButtonMap: Map<string, VarButton | null>;
11
- isCurrentButtonRequestingMap: Map<string, boolean>;
12
- isClickInterceptedMap: Map<string, boolean>;
13
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
14
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
15
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
16
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
17
- }, {
18
- isClickIntercepted(state: {
19
- currentButtonMap: Map<string, VarButton | null>;
20
- isCurrentButtonRequestingMap: Map<string, boolean>;
21
- isClickInterceptedMap: Map<string, boolean>;
22
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
23
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
24
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
25
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
26
- } & import("pinia").PiniaCustomStateProperties<{
27
- currentButtonMap: Map<string, VarButton | null>;
28
- isCurrentButtonRequestingMap: Map<string, boolean>;
29
- isClickInterceptedMap: Map<string, boolean>;
30
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
31
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
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;
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;
126
- }, {
127
- dispose(formID: string | null | undefined): void;
128
- addEventListener(formID: string, event: IKgButtonEvent, cb: import("./index.store").IKgButtonCb): void;
129
- removeEventListener(formID: string, event: IKgButtonEvent, cb?: import("./index.store").IKgButtonCb | undefined): void;
130
- emit(formID: string, event: IKgButtonEvent, param: any): Promise<boolean>;
131
- setIsClickIntercepted(formID: string | null | undefined, param: {
132
- isIntercepted: boolean;
133
- type?: KG_BUTTON_TYPE | undefined;
134
- varName?: string | null | undefined;
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>;
143
- click(formID: string, type: KG_BUTTON_TYPE, variableName?: string | undefined): void;
144
- }>;
1
+ import { ComputedRef } from 'vue';
2
+ import { IRemoveEventListenerHandler, KG_BUTTON_TYPE } from '../../consts';
3
+ import { IKgButtonClickCb, IKgButtonImportOkCb, IKgButtonStore, IKgButtonSubmitCancelCb, IKgButtonSubmitSaveCb } from './index.store';
4
+ export interface IUseKgButton {
145
5
  /**
146
6
  * <p>手动点击某个按钮.</p>
147
7
  * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
148
8
  *
149
- * @param param.
150
9
  * @param param.type 按钮类型.
151
10
  * @param param.variableName 按钮变量名称.
152
11
  */
@@ -157,45 +16,35 @@ export declare function useKgButton(formID?: string | null): {
157
16
  /**
158
17
  * <p>「当前按钮」.</p>
159
18
  */
160
- currentButton: import("vue").ComputedRef<VarButton | null>;
19
+ currentButton: ComputedRef<ReturnType<IKgButtonStore['getCurrentButton']>>;
161
20
  /**
162
- * <p>「查询按钮」.</p>
21
+ * 界面标识.
163
22
  */
164
- searchButton: import("vue").ComputedRef<VarButton | null>;
165
- /**
166
- * <p>判断「当前按钮」的 click 事件是否被拦截.</p>
167
- */
168
- isCurrentButtonClickIntercepted: import("vue").ComputedRef<boolean>;
169
- /**
170
- * <p>判断「当前按钮」是否正在请求后端接口.</p>
171
- */
172
- isCurrentButtonRequesting: import("vue").ComputedRef<boolean>;
23
+ formID: string;
173
24
  /**
174
- * <p>设置「当前按钮」. 比如点击「创建」按钮, 则此时「创建」按钮就是「当前按钮」, 同一时间最多只会有一个按钮处于「正在执行」状态.</p>
25
+ * <p>判断某个按钮的 click 事件是否被拦截.</p>
26
+ * <p>用户调用 <code>kgVar.kgButton.onClick(cb)</code> 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
27
+ * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
175
28
  *
176
29
  * <ul>
177
30
  * <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>
31
+ * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
32
+ * <p>调用方式如下: <code>isClickIntercepted({ type: KG_BUTTON_TYPE.CREATE });</code></p>
184
33
  * </li>
185
34
  * <li>
186
- * <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
35
+ * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
187
36
  * <p>根据参数 {@link param.varName} 获取按钮.</p>
188
- * <p>调用方式如下: <code>setCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
37
+ * <p>调用方式如下: <code>isClickIntercepted({ varName: 'SOME-OTHER-BUTTON' });</code></p>
189
38
  * </li>
190
39
  * </ul>
191
40
  *
192
41
  * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
193
42
  * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
194
43
  */
195
- setCurrentButton(param: {
44
+ isClickIntercepted(param: {
196
45
  type?: KG_BUTTON_TYPE;
197
46
  varName?: string | null;
198
- } | null): Promise<void>;
47
+ }): boolean;
199
48
  /**
200
49
  * <p>判断某个按钮是否是「当前按钮」.</p>
201
50
  *
@@ -219,29 +68,71 @@ export declare function useKgButton(formID?: string | null): {
219
68
  varName?: string;
220
69
  }): boolean;
221
70
  /**
222
- * <p>判断某个按钮的 click 事件是否被拦截.</p>
223
- * <p>用户调用 <code>kgVar.kgButton().onClick(cb)</code> 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
224
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
71
+ * <p>判断「当前按钮」的 click 事件是否被拦截.</p>
72
+ */
73
+ isCurrentButtonClickIntercepted: ComputedRef<ReturnType<IKgButtonStore['isClickIntercepted']>>;
74
+ /**
75
+ * <p>判断「当前按钮」是否正在请求后端接口.</p>
76
+ */
77
+ isCurrentButtonRequesting: ComputedRef<ReturnType<IKgButtonStore['isCurrentButtonRequesting']>>;
78
+ /**
79
+ * 事件: 点击按钮.
80
+ *
81
+ * @param cb 回调函数.
82
+ * @param once 是否只会触发一次. 默认为 undefined.
83
+ */
84
+ onClick(cb: IKgButtonClickCb, once?: boolean): IRemoveEventListenerHandler;
85
+ /**
86
+ * 事件: 导入成功, 导入接口调用成功.
87
+ *
88
+ * @param cb 回调函数.
89
+ * @param once 是否只会触发一次. 默认为 undefined.
90
+ */
91
+ onImportOk(cb: IKgButtonImportOkCb, once?: boolean): IRemoveEventListenerHandler;
92
+ /**
93
+ * 事件: 表格内编辑时, 点击取消按钮.
94
+ *
95
+ * @param cb 回调函数.
96
+ * @param once 是否只会触发一次. 默认为 undefined.
97
+ */
98
+ onSubmitCancel(cb: IKgButtonSubmitCancelCb, once?: boolean): IRemoveEventListenerHandler;
99
+ /**
100
+ * 事件: 表格内编辑时, 点击保存按钮.
101
+ *
102
+ * @param cb 回调函数.
103
+ * @param once 是否只会触发一次. 默认为 undefined.
104
+ */
105
+ onSubmitSave(cb: IKgButtonSubmitSaveCb, once?: boolean): IRemoveEventListenerHandler;
106
+ /**
107
+ * <p>「查询按钮」.</p>
108
+ */
109
+ searchButton: ComputedRef<ReturnType<IKgButtonStore['getSearchButton']>>;
110
+ /**
111
+ * <p>设置「当前按钮」. 比如点击「创建」按钮, 则此时「创建」按钮就是「当前按钮」, 同一时间最多只会有一个按钮处于「正在执行」状态.</p>
225
112
  *
226
113
  * <ul>
227
114
  * <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>
115
+ * <p>如果参数 {@link param} === null, 表示清空「当前按钮」.</p>
116
+ * <p>调用方式如下: <code>setCurrentButton(null);</code></p>
230
117
  * </li>
231
118
  * <li>
232
- * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
119
+ * <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG_BUTTON_TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
120
+ * <p>调用方式如下: <code>setCurrentButton({ type: KG_BUTTON_TYPE.CREATE });</code></p>
121
+ * </li>
122
+ * <li>
123
+ * <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG_BUTTON_TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
233
124
  * <p>根据参数 {@link param.varName} 获取按钮.</p>
234
- * <p>调用方式如下: <code>isClickIntercepted({ varName: 'SOME-OTHER-BUTTON' });</code></p>
125
+ * <p>调用方式如下: <code>setCurrentButton({ varName: 'SOME-OTHER-BUTTON' });</code></p>
235
126
  * </li>
236
127
  * </ul>
237
128
  *
238
129
  * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
239
130
  * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
240
131
  */
241
- isClickIntercepted(param: {
132
+ setCurrentButton(param: {
242
133
  type?: KG_BUTTON_TYPE;
243
134
  varName?: string | null;
244
- }): boolean;
135
+ } | null): Promise<void>;
245
136
  /**
246
137
  * <p>设置某个按钮的 click 事件是否被拦截.</p>
247
138
  *
@@ -275,27 +166,11 @@ export declare function useKgButton(formID?: string | null): {
275
166
  isRequesting: boolean;
276
167
  }): void;
277
168
  /**
278
- * 事件: 点击按钮.
279
- * @param cb 回调函数.
280
- * @param once 是否只会触发一次. 默认为 undefined.
281
- */
282
- onClick: (cb: IKgButtonClickCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
283
- /**
284
- * 事件: 导入成功, 导入接口调用成功.
285
- * @param cb 回调函数.
286
- * @param once 是否只会触发一次. 默认为 undefined.
287
- */
288
- onImportOk: (cb: IKgButtonImportOkCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
289
- /**
290
- * 事件: 表格内编辑时, 点击保存按钮.
291
- * @param cb 回调函数.
292
- * @param once 是否只会触发一次. 默认为 undefined.
169
+ * 状态数据.
293
170
  */
294
- onSubmitSave: (cb: IKgButtonSubmitSaveCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
295
- /**
296
- * 事件: 表格内编辑时, 点击取消按钮.
297
- * @param cb 回调函数.
298
- * @param once 是否只会触发一次. 默认为 undefined.
299
- */
300
- onSubmitCancel: (cb: IKgButtonSubmitCancelCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
301
- };
171
+ store: IKgButtonStore;
172
+ }
173
+ /**
174
+ * @param formID 界面标识.
175
+ */
176
+ export declare function useKgButton(formID?: string | null): IUseKgButton;