@kengic/vue 0.22.1-beta.0 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/CHANGELOG.md +62 -22
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +7709 -6673
  4. package/dist/project/build/script/buildConf.ts +1 -2
  5. package/dist/project/build/script/postBuild.ts +1 -1
  6. package/dist/project/src/api/sys/model/userModel.ts +1 -0
  7. package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
  8. package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
  9. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/index.d.ts +0 -7
  10. package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
  11. package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
  12. package/dist/src/apis/WMS/Controllers/index.d.ts +1 -0
  13. package/dist/src/apis/WMS/models.d.ts +28 -4
  14. package/dist/src/components/KgAppSelect/index.hooks.d.ts +3 -3
  15. package/dist/src/components/KgAppSelect/index.store.d.ts +30 -29
  16. package/dist/src/components/KgButton/KgButton.d.ts +18 -12
  17. package/dist/src/components/KgButton/index.d.ts +4 -4
  18. package/dist/src/components/KgButton/index.hooks.d.ts +68 -67
  19. package/dist/src/components/KgButton/index.store.d.ts +57 -193
  20. package/dist/src/components/KgForm/index.hooks.d.ts +37 -30
  21. package/dist/src/components/KgForm/index.store.d.ts +88 -41
  22. package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +3 -3
  23. package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +3 -3
  24. package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +8 -7
  25. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +6 -5
  26. package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +6 -5
  27. package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +6 -5
  28. package/dist/src/components/KgForm.Item/components/KgForm.Item.Image.d.ts +3 -3
  29. package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +6 -5
  30. package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +6 -5
  31. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +6 -7
  32. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +7 -5
  33. package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +16 -13
  34. package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +6 -5
  35. package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +6 -5
  36. package/dist/src/components/KgForm.Item/index.d.ts +1 -1
  37. package/dist/src/components/KgForm.Item/index.vm.d.ts +9 -7
  38. package/dist/src/components/KgResizable/KgResizable.d.ts +52 -52
  39. package/dist/src/components/KgSearch/KgSearch.d.ts +0 -16
  40. package/dist/src/components/KgSearch/KgSearch.service.d.ts +32 -0
  41. package/dist/src/components/KgSearch/index.hooks.d.ts +57 -138
  42. package/dist/src/components/KgSearch/index.store.d.ts +84 -193
  43. package/dist/src/components/KgSubmit/index.hooks.d.ts +112 -278
  44. package/dist/src/components/KgSubmit/index.store.d.ts +71 -257
  45. package/dist/src/components/KgSubmit/index.vm.d.ts +2 -1
  46. package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
  47. package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
  48. package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +1 -1
  49. package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
  50. package/dist/src/components/KgTable/index.hooks.d.ts +79 -427
  51. package/dist/src/components/KgTable/index.store.d.ts +127 -647
  52. package/dist/src/components/KgTable/index.vm.d.ts +1 -1
  53. package/dist/src/components/KgVar/index.hooks.d.ts +103 -3468
  54. package/dist/src/components/KgVar/index.store.d.ts +136 -3229
  55. package/dist/src/components/KgVar/index.store.service.d.ts +2 -1
  56. package/dist/src/components/KgVar/index.vm.d.ts +7 -7
  57. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
  58. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
  59. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
  60. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
  61. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
  62. package/dist/src/components/KgVarConfig/index.store.d.ts +23 -16
  63. package/dist/src/components/KgVarConfig/index.vm.d.ts +32 -0
  64. package/dist/src/components/KgWarehouse/index.hooks.d.ts +10 -6
  65. package/dist/src/components/KgWarehouse/index.store.d.ts +15 -14
  66. package/dist/src/components/util.d.ts +7 -7
  67. package/dist/src/config/index.hooks.d.ts +31 -38
  68. package/dist/src/config/index.store.d.ts +74 -52
  69. package/dist/src/consts/i18n/en.d.ts +10 -6
  70. package/dist/src/consts/i18n/zh_CN.d.ts +10 -6
  71. package/dist/src/consts/index.d.ts +0 -277
  72. package/dist/src/consts/index.vm.d.ts +503 -75
  73. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +7 -1
  74. package/dist/src/utils/kg-var.util.d.ts +4 -3
  75. package/dist/src/utils/kg.util.d.ts +13 -16
  76. package/package.json +2 -2
  77. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Delete.d.ts +0 -18
  78. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/DeleteBatch.d.ts +0 -18
  79. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Edit.d.ts +0 -16
  80. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ExportXls.d.ts +0 -30
  81. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ImportExcel.d.ts +0 -15
  82. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/List.d.ts +0 -37
  83. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/QueryById.d.ts +0 -19
  84. package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +0 -28
  85. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.CreateModal.d.ts +0 -32
  86. /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
  87. /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
  88. /package/dist/src/components/KgTable/components/setting/config/{KgTable.Setting.ConfigModal.VarGridMaster.hooks.d.ts → KgTable.Setting.ConfigModal.VarGridMaster.service.d.ts} +0 -0
  89. /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.Vars.d.ts → KgVarConfig.Modal.Var.VarConfigControl.d.ts} +0 -0
@@ -1,5 +1,6 @@
1
+ import { StoreDefinition } from 'pinia';
1
2
  import { VarButton } from '../../apis/WMS/models';
2
- import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
3
+ import { IKgEventListener, KG_BUTTON_TYPE } from '../../consts';
3
4
  /**
4
5
  * 事件类型.
5
6
  * 'click': 点击按钮
@@ -8,222 +9,95 @@ import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
8
9
  * 'submitCancel': 表格内编辑时, 点击取消按钮
9
10
  */
10
11
  export declare type IKgButtonEvent = 'click' | 'importOk' | 'submitSave' | 'submitCancel';
11
- export declare type IKgButtonClickCbParam = {
12
+ export declare type IKgButtonClickEventListenerParameter = {
12
13
  /**
13
14
  * 被点击的按钮.
14
15
  */
15
16
  button: VarButton;
16
17
  };
17
- export declare type IKgButtonClickCb = ((param: IKgButtonClickCbParam) => Promise<boolean>) & IKgEventCb;
18
- export declare type IKgButtonImportOkCbParam = {
18
+ export declare type IKgButtonClickEventListener = ((param: IKgButtonClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
19
+ export declare type IKgButtonImportOkEventListenerParameter = {
19
20
  button?: VarButton | null;
20
21
  };
21
- export declare type IKgButtonImportOkCb = ((args: IKgButtonImportOkCbParam) => Promise<boolean>) & IKgEventCb;
22
- export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventCb;
23
- export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
24
- export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonImportOkCbParam;
25
- export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonImportOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
26
- export declare const useKgButtonStore: import("pinia").StoreDefinition<"KgButton", {
22
+ export declare type IKgButtonImportOkEventListener = ((param: IKgButtonImportOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
23
+ export declare type IKgButtonSubmitSaveEventListenerParameter = {};
24
+ export declare type IKgButtonSubmitSaveEventListener = ((param: IKgButtonSubmitSaveEventListenerParameter) => Promise<boolean>) & IKgEventListener;
25
+ export declare type IKgButtonSubmitCancelEventListenerParameter = {};
26
+ export declare type IKgButtonSubmitCancelEventListener = ((param: IKgButtonSubmitCancelEventListenerParameter) => Promise<boolean>) & IKgEventListener;
27
+ export declare type IKgButtonEventListenerParameter = IKgButtonClickEventListenerParameter | IKgButtonImportOkEventListenerParameter | IKgButtonSubmitSaveEventListenerParameter | IKgButtonSubmitCancelEventListenerParameter;
28
+ export declare type IKgButtonEventListener = IKgButtonClickEventListener | IKgButtonImportOkEventListener | IKgButtonSubmitSaveEventListener | IKgButtonSubmitCancelEventListener;
29
+ export interface IUseKgButtonStoreState {
30
+ clickEventListenersMap: Map<string, Array<IKgButtonClickEventListener>>;
27
31
  /**
28
32
  * <p>当前按钮.</p>
29
33
  * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
30
34
  */
31
35
  currentButtonMap: Map<string, VarButton | null>;
32
- /**
33
- * <p>当前按钮是否正在请求后端接口.</p>
34
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
35
- */
36
- isCurrentButtonRequestingMap: Map<string, boolean>;
36
+ importOkEventListenersMap: Map<string, Array<IKgButtonImportOkEventListener>>;
37
37
  /**
38
38
  * <p>按钮的 click 事件是否被拦截.</p>
39
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
39
+ * <p>用户调用 kgVar.kgButton.onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
40
40
  * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
41
41
  */
42
42
  isClickInterceptedMap: Map<string, boolean>;
43
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
44
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
45
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
46
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
47
- }, {
48
- isClickIntercepted(state: {
49
- currentButtonMap: Map<string, VarButton | null>;
50
- isCurrentButtonRequestingMap: Map<string, boolean>;
51
- isClickInterceptedMap: Map<string, boolean>;
52
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
53
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
54
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
55
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
56
- } & import("pinia").PiniaCustomStateProperties<{
57
- /**
58
- * <p>当前按钮.</p>
59
- * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
60
- */
61
- currentButtonMap: Map<string, VarButton | null>;
62
- /**
63
- * <p>当前按钮是否正在请求后端接口.</p>
64
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
65
- */
66
- isCurrentButtonRequestingMap: Map<string, boolean>;
67
- /**
68
- * <p>按钮的 click 事件是否被拦截.</p>
69
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
70
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
71
- */
72
- isClickInterceptedMap: Map<string, boolean>;
73
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
74
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
75
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
76
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
77
- }>): (formID: string | undefined | null, param: {
43
+ /**
44
+ * <p>当前按钮是否正在请求后端接口.</p>
45
+ * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
46
+ */
47
+ isCurrentButtonRequestingMap: Map<string, boolean>;
48
+ submitCancelEventListenersMap: Map<string, Array<IKgButtonSubmitCancelEventListener>>;
49
+ submitSaveEventListenersMap: Map<string, Array<IKgButtonSubmitSaveEventListener>>;
50
+ }
51
+ export interface IUseKgButtonStoreGetters {
52
+ getCurrentButton(): (formID: string | null | undefined) => VarButton | null;
53
+ getSearchButton(): (formID: string | null | undefined) => VarButton | null;
54
+ getVarButtons(): (formID: string | null | undefined) => Array<VarButton>;
55
+ isClickIntercepted(): (formID: string | undefined | null, param: {
78
56
  type?: KG_BUTTON_TYPE;
79
57
  varName?: string | null;
80
58
  }) => boolean;
81
- isCurrentButtonRequesting(state: {
82
- currentButtonMap: Map<string, VarButton | null>;
83
- isCurrentButtonRequestingMap: Map<string, boolean>;
84
- isClickInterceptedMap: Map<string, boolean>;
85
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
86
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
87
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
88
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
89
- } & import("pinia").PiniaCustomStateProperties<{
90
- /**
91
- * <p>当前按钮.</p>
92
- * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
93
- */
94
- currentButtonMap: Map<string, VarButton | null>;
95
- /**
96
- * <p>当前按钮是否正在请求后端接口.</p>
97
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
98
- */
99
- isCurrentButtonRequestingMap: Map<string, boolean>;
100
- /**
101
- * <p>按钮的 click 事件是否被拦截.</p>
102
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
103
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
104
- */
105
- isClickInterceptedMap: Map<string, boolean>;
106
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
107
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
108
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
109
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
110
- }>): (formID: string | undefined | null) => boolean;
111
- getCurrentButton: (state: {
112
- currentButtonMap: Map<string, VarButton | null>;
113
- isCurrentButtonRequestingMap: Map<string, boolean>;
114
- isClickInterceptedMap: Map<string, boolean>;
115
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
116
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
117
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
118
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
119
- } & import("pinia").PiniaCustomStateProperties<{
120
- /**
121
- * <p>当前按钮.</p>
122
- * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
123
- */
124
- currentButtonMap: Map<string, VarButton | null>;
125
- /**
126
- * <p>当前按钮是否正在请求后端接口.</p>
127
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
128
- */
129
- isCurrentButtonRequestingMap: Map<string, boolean>;
130
- /**
131
- * <p>按钮的 click 事件是否被拦截.</p>
132
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
133
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
134
- */
135
- isClickInterceptedMap: Map<string, boolean>;
136
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
137
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
138
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
139
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
140
- }>) => (formID: string | null | undefined) => VarButton | null;
141
- isCurrentButton(state: {
142
- currentButtonMap: Map<string, VarButton | null>;
143
- isCurrentButtonRequestingMap: Map<string, boolean>;
144
- isClickInterceptedMap: Map<string, boolean>;
145
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
146
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
147
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
148
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
149
- } & import("pinia").PiniaCustomStateProperties<{
150
- /**
151
- * <p>当前按钮.</p>
152
- * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
153
- */
154
- currentButtonMap: Map<string, VarButton | null>;
155
- /**
156
- * <p>当前按钮是否正在请求后端接口.</p>
157
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
158
- */
159
- isCurrentButtonRequestingMap: Map<string, boolean>;
160
- /**
161
- * <p>按钮的 click 事件是否被拦截.</p>
162
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
163
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
164
- */
165
- isClickInterceptedMap: Map<string, boolean>;
166
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
167
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
168
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
169
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
170
- }>): (formID: string, param: {
59
+ isCurrentButton(): (formID: string, param: {
171
60
  varName?: string;
172
61
  type?: KG_BUTTON_TYPE;
173
62
  }) => boolean;
174
- getSearchButton(state: {
175
- currentButtonMap: Map<string, VarButton | null>;
176
- isCurrentButtonRequestingMap: Map<string, boolean>;
177
- isClickInterceptedMap: Map<string, boolean>;
178
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
179
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
180
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
181
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
182
- } & import("pinia").PiniaCustomStateProperties<{
183
- /**
184
- * <p>当前按钮.</p>
185
- * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
186
- */
187
- currentButtonMap: Map<string, VarButton | null>;
188
- /**
189
- * <p>当前按钮是否正在请求后端接口.</p>
190
- * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
191
- */
192
- isCurrentButtonRequestingMap: Map<string, boolean>;
193
- /**
194
- * <p>按钮的 click 事件是否被拦截.</p>
195
- * <p>用户调用 kgVar.kgButton().onClick(cb) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
196
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
197
- */
198
- isClickInterceptedMap: Map<string, boolean>;
199
- clickListenersMap: Map<string, IKgButtonClickCb[]>;
200
- importOkListenersMap: Map<string, IKgButtonImportOkCb[]>;
201
- submitCancelListenersMap: Map<string, IKgButtonSubmitCancelCb[]>;
202
- submitSaveListenersMap: Map<string, IKgButtonSubmitSaveCb[]>;
203
- }>): (formID: string | null | undefined) => VarButton | null;
204
- }, {
205
- dispose(formID: string | null | undefined): void;
63
+ isCurrentButtonRequesting(): (formID: string | undefined | null) => boolean;
64
+ }
65
+ export interface IUseKgButtonStoreActions {
206
66
  /**
207
67
  * 注册事件监听.
208
68
  * @param formID 界面标识.
209
69
  * @param event 事件名称.
210
70
  * @param cb 回调函数.
211
71
  */
212
- addEventListener(formID: string, event: IKgButtonEvent, cb: IKgButtonCb): void;
72
+ addEventListener(formID: string, event: IKgButtonEvent, cb: IKgButtonEventListener): void;
213
73
  /**
214
- * 退订事件监听.
74
+ * <p>手动点击某个按钮.</p>
75
+ * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
76
+ *
215
77
  * @param formID 界面标识.
216
- * @param event 事件名称.
217
- * @param cb 回调函数.
78
+ * @param type 按钮类型.
79
+ * @param variableName 按钮变量名称.
218
80
  */
219
- removeEventListener(formID: string, event: IKgButtonEvent, cb?: IKgButtonCb): void;
81
+ click(formID: string, type: KG_BUTTON_TYPE, variableName?: string): void;
82
+ dispose(formID: string | null | undefined): void;
220
83
  /**
221
84
  * 触发事件.
222
85
  * @param formID 界面标识.
223
86
  * @param event 事件名称.
224
87
  * @param param 数据.
225
88
  */
226
- emit(formID: string, event: IKgButtonEvent, param: IKgButtonCbParam): Promise<boolean>;
89
+ emit<T = IKgButtonEventListenerParameter>(formID: string, event: IKgButtonEvent, param: T): Promise<boolean>;
90
+ /**
91
+ * 退订事件监听.
92
+ * @param formID 界面标识.
93
+ * @param event 事件名称.
94
+ * @param cb 回调函数.
95
+ */
96
+ removeEventListener(formID: string, event: IKgButtonEvent, cb?: IKgButtonEventListener): void;
97
+ setCurrentButton(formID: string, param: {
98
+ type?: KG_BUTTON_TYPE;
99
+ varName?: string | null;
100
+ } | null): Promise<void>;
227
101
  setIsClickIntercepted(formID: string | undefined | null, param: {
228
102
  isIntercepted: boolean;
229
103
  type?: KG_BUTTON_TYPE;
@@ -232,17 +106,7 @@ export declare const useKgButtonStore: import("pinia").StoreDefinition<"KgButton
232
106
  setIsCurrentButtonRequesting(formID: string | undefined | null, param: {
233
107
  isRequesting: boolean;
234
108
  }): void;
235
- setCurrentButton(formID: string, param: {
236
- type?: KG_BUTTON_TYPE;
237
- varName?: string | null;
238
- } | null): Promise<void>;
239
- /**
240
- * <p>手动点击某个按钮.</p>
241
- * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
242
- *
243
- * @param formID 界面标识.
244
- * @param type 按钮类型.
245
- * @param variableName 按钮变量名称.
246
- */
247
- click(formID: string, type: KG_BUTTON_TYPE, variableName?: string): void;
248
- }>;
109
+ }
110
+ export declare type IUseKgButtonStore = StoreDefinition<'KgButton', IUseKgButtonStoreState, IUseKgButtonStoreGetters, IUseKgButtonStoreActions>;
111
+ export declare type IKgButtonStore = ReturnType<IUseKgButtonStore>;
112
+ export declare const useKgButtonStore: IUseKgButtonStore;
@@ -1,55 +1,62 @@
1
- import { IKgFormChangeCb, IKgFormEvent, IKgFormLookupBeforeOkCb, IKgFormLookupBeforeOpenCb, IKgFormLookupOkCb, IKgFormSelectBeforeSetDatasCb, IKgFormSelectChangeCb } from './index.store';
2
- /**
3
- * @param formID 界面标识.
4
- */
5
- export declare function useKgForm(formID?: string | null): {
1
+ import { IRemoveEventListenerHandler } from '../../consts';
2
+ import { IKgFormChangeEventListener, IKgFormLookupBeforeOkEventListener, IKgFormLookupBeforeOpenEventListener, IKgFormLookupOkEventListener, IKgFormSelectBeforeRequestEventListener, IKgFormSelectBeforeSetDatasEventListener, IKgFormSelectChangeEventListener, IKgFormStore } from './index.store';
3
+ export declare type IUseKgForm = {
6
4
  formID: string;
7
- store: import("pinia").Store<"KgForm", {
8
- changeListenersMap: Map<string, IKgFormChangeCb[]>;
9
- selectBeforeSetDatasListenersMap: Map<string, IKgFormSelectBeforeSetDatasCb[]>;
10
- selectChangeListenersMap: Map<string, IKgFormSelectChangeCb[]>;
11
- lookupBeforeOpenListenersMap: Map<string, IKgFormLookupBeforeOpenCb[]>;
12
- lookupBeforeOkListenersMap: Map<string, IKgFormLookupBeforeOkCb[]>;
13
- lookupOkListenersMap: Map<string, IKgFormLookupOkCb[]>;
14
- }, {}, {
15
- addEventListener(formID: string, event: IKgFormEvent, cb: import("./index.store").IKgFormCb): void;
16
- removeEventListener(formID: string, event: IKgFormEvent, cb?: import("./index.store").IKgFormCb | undefined): void;
17
- emit<T = import("./index.store").IKgFormCbParam>(formID: string, event: IKgFormEvent, param: T): Promise<boolean>;
18
- }>;
19
- /**
20
- * 事件: 表单控件数据发生变更.
5
+ /**
6
+ * 事件: 表单控件的值发生变更.
7
+ *
21
8
  * @param cb 回调函数.
22
9
  * @param once 是否只会触发一次. 默认为 undefined.
23
10
  */
24
- onChange: (cb: IKgFormChangeCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
11
+ onChange(cb: IKgFormChangeEventListener, once?: boolean): IRemoveEventListenerHandler;
25
12
  /**
26
- * 事件: 查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
13
+ * 事件: 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件.
14
+ *
27
15
  * @param cb 回调函数.
28
16
  * @param once 是否只会触发一次. 默认为 undefined.
29
17
  */
30
- onSelectBeforeSetDatas: (cb: IKgFormSelectBeforeSetDatasCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
18
+ onLookupBeforeOk(cb: IKgFormLookupBeforeOkEventListener, once?: boolean): IRemoveEventListenerHandler;
31
19
  /**
32
- * 事件: 下拉列表选中某个(可能多个)数据.
20
+ * 事件: 查找弹窗打开之前.
21
+ *
33
22
  * @param cb 回调函数.
34
23
  * @param once 是否只会触发一次. 默认为 undefined.
35
24
  */
36
- onSelectChange: (cb: IKgFormSelectChangeCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
25
+ onLookupBeforeOpen(cb: IKgFormLookupBeforeOpenEventListener, once?: boolean): IRemoveEventListenerHandler;
37
26
  /**
38
- * 事件: 查找弹窗打开之前.
27
+ * 事件: 查找弹窗点击确定.
28
+ *
39
29
  * @param cb 回调函数.
40
30
  * @param once 是否只会触发一次. 默认为 undefined.
41
31
  */
42
- onLookupBeforeOpen: (cb: IKgFormLookupBeforeOpenCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
32
+ onLookupOk(cb: IKgFormLookupOkEventListener, once?: boolean): IRemoveEventListenerHandler;
43
33
  /**
44
- * 事件: 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件.
34
+ * 事件: 即将发起查询请求, 如果返回 true 表示不会发起请求.
35
+ *
45
36
  * @param cb 回调函数.
46
37
  * @param once 是否只会触发一次. 默认为 undefined.
47
38
  */
48
- onLookupBeforeOk: (cb: IKgFormLookupBeforeOkCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
39
+ onSelectBeforeRequest(cb: IKgFormSelectBeforeRequestEventListener, once?: boolean): IRemoveEventListenerHandler;
49
40
  /**
50
- * 事件: 查找弹窗点击确定.
41
+ * 事件: 查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理.
42
+ *
43
+ * @param cb 回调函数.
44
+ * @param once 是否只会触发一次. 默认为 undefined.
45
+ */
46
+ onSelectBeforeSetDatas(cb: IKgFormSelectBeforeSetDatasEventListener, once?: boolean): IRemoveEventListenerHandler;
47
+ /**
48
+ * 事件: 下拉列表选中某个(可能多个)数据.
49
+ *
51
50
  * @param cb 回调函数.
52
51
  * @param once 是否只会触发一次. 默认为 undefined.
53
52
  */
54
- onLookupOk: (cb: IKgFormLookupOkCb, once?: boolean | undefined) => import("../..").IRemoveEventListenerHandler;
53
+ onSelectChange(cb: IKgFormSelectChangeEventListener, once?: boolean): IRemoveEventListenerHandler;
54
+ /**
55
+ * 状态数据.
56
+ */
57
+ store: IKgFormStore;
55
58
  };
59
+ /**
60
+ * @param formID 界面标识.
61
+ */
62
+ export declare function useKgForm(formID?: string | null): IUseKgForm;
@@ -1,18 +1,23 @@
1
+ import { StoreDefinition } from 'pinia';
1
2
  import { ComputedRef, Ref } from 'vue';
2
- import { IKgEventCb } from '../../consts';
3
+ import { IKgEventListener, KG_FORM_CONTEXT } from '../../consts';
3
4
  import { IKgTableRow } from '../KgTable';
4
5
  /**
5
6
  * 事件类型.
6
- * 'change': 表单控件数据发生变更
7
+ * 'change': 表单控件的值发生变更
8
+ * 'selectBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求,
7
9
  * 'selectBeforeSetDatas': 下拉列表查询请求成功, 列表数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
8
10
  * 'selectChange': 下拉列表选中某个(可能多个)数据
9
11
  * 'lookupBeforeOpen': 查找弹窗打开之前
10
12
  * 'lookupBeforeOk': 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件
11
13
  * 'lookupOk': 查找弹窗点击确定
12
14
  */
13
- export declare type IKgFormEvent = 'change' | 'selectBeforeSetDatas' | 'selectChange' | 'lookupBeforeOpen' | 'lookupBeforeOk' | 'lookupOk';
14
- /** 事件监听函数: change. */
15
- export declare type IKgFormChangeCbParam = {
15
+ export declare type IKgFormEvent = 'change' | 'selectBeforeRequest' | 'selectBeforeSetDatas' | 'selectChange' | 'lookupBeforeOpen' | 'lookupBeforeOk' | 'lookupOk';
16
+ export declare type IKgFormChangeEventListenerParameter = {
17
+ /**
18
+ * 表单控件所处环境.
19
+ */
20
+ context: KG_FORM_CONTEXT;
16
21
  isCopying: boolean | null;
17
22
  isCreating: boolean | null;
18
23
  isDeleting: boolean | null;
@@ -26,9 +31,27 @@ export declare type IKgFormChangeCbParam = {
26
31
  */
27
32
  variableName: string;
28
33
  };
29
- export declare type IKgFormChangeCb = ((param: IKgFormChangeCbParam) => Promise<boolean>) & IKgEventCb;
30
- /** 事件监听函数: selectBeforeSetDatas. */
31
- export declare type IKgFormSelectBeforeSetDatasCbParam<T = any> = {
34
+ export declare type IKgFormChangeEventListener = ((param: IKgFormChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
35
+ export declare type IKgFormSelectBeforeRequestEventListenerParameter = {
36
+ /**
37
+ * 表单控件所处环境.
38
+ */
39
+ context: KG_FORM_CONTEXT;
40
+ /** 查询接口请求参数. */
41
+ params: Record<string, any>;
42
+ /** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供列表数据. */
43
+ response: Ref;
44
+ /**
45
+ * 变量名称.
46
+ */
47
+ varName: string;
48
+ };
49
+ export declare type IKgFormSelectBeforeRequestEventListener = ((param: IKgFormSelectBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
50
+ export declare type IKgFormSelectBeforeSetDatasEventListenerParameter<T = any> = {
51
+ /**
52
+ * 表单控件所处环境.
53
+ */
54
+ context: KG_FORM_CONTEXT;
32
55
  /** 列表数据. */
33
56
  datas: Ref<Array<T>>;
34
57
  isCopying: boolean | null;
@@ -36,11 +59,14 @@ export declare type IKgFormSelectBeforeSetDatasCbParam<T = any> = {
36
59
  isDeleting: boolean | null;
37
60
  isUpdating: boolean | null;
38
61
  /** 变量名称. */
39
- variableName: string;
62
+ varName: string;
40
63
  };
41
- export declare type IKgFormSelectBeforeSetDatasCb = ((param: IKgFormSelectBeforeSetDatasCbParam) => Promise<boolean>) & IKgEventCb;
42
- /** 事件监听函数: selectChange. */
43
- export declare type IKgFormSelectChangeCbParam = {
64
+ export declare type IKgFormSelectBeforeSetDatasEventListener = ((param: IKgFormSelectBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
65
+ export declare type IKgFormSelectChangeEventListenerParameter = {
66
+ /**
67
+ * 表单控件所处环境.
68
+ */
69
+ context: KG_FORM_CONTEXT;
44
70
  isCopying: boolean | null;
45
71
  isCreating: boolean | null;
46
72
  isDeleting: boolean | null;
@@ -48,7 +74,7 @@ export declare type IKgFormSelectChangeCbParam = {
48
74
  isMultiple: boolean;
49
75
  isUpdating: boolean | null;
50
76
  /** 表单数据对象. */
51
- model: Ref<Record<string, any>> | null;
77
+ model: Ref<Record<string, any> | null> | null;
52
78
  /** 选中的数据对象组成的数组, 如果是单选则数组中只有一个数据对象. */
53
79
  rows: Array<any> | null;
54
80
  /** 选中的数据组成的数组, 如果是单选则数组中只有一个数据. */
@@ -56,17 +82,23 @@ export declare type IKgFormSelectChangeCbParam = {
56
82
  /** 变量. */
57
83
  var_nam: string;
58
84
  };
59
- export declare type IKgFormSelectChangeCb = ((param: IKgFormSelectChangeCbParam) => Promise<boolean>) & IKgEventCb;
60
- /** 事件监听函数: lookupBeforeOpen. */
61
- export declare type IKgFormLookupBeforeOpenCbParam = {
85
+ export declare type IKgFormSelectChangeEventListener = ((param: IKgFormSelectChangeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
86
+ export declare type IKgFormLookupBeforeOpenEventListenerParameter = {
87
+ /**
88
+ * 表单控件所处环境.
89
+ */
90
+ context: KG_FORM_CONTEXT;
62
91
  /** 查找弹出的界面标识. */
63
92
  lookupFormID: string;
64
93
  /** 变量. */
65
94
  var_nam: string;
66
95
  };
67
- export declare type IKgFormLookupBeforeOpenCb = ((param: IKgFormLookupBeforeOpenCbParam) => Promise<boolean>) & IKgEventCb;
68
- /** 事件监听函数: lookupBeforeOk. */
69
- export declare type IKgFormLookupBeforeOkCbParam = {
96
+ export declare type IKgFormLookupBeforeOpenEventListener = ((param: IKgFormLookupBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
97
+ export declare type IKgFormLookupBeforeOkEventListenerParameter = {
98
+ /**
99
+ * 表单控件所处环境.
100
+ */
101
+ context: KG_FORM_CONTEXT;
70
102
  /** 是否多选, 否则单选. */
71
103
  isMultiple: boolean;
72
104
  /**
@@ -86,9 +118,12 @@ export declare type IKgFormLookupBeforeOkCbParam = {
86
118
  /** 变量. */
87
119
  var_nam: string;
88
120
  };
89
- export declare type IKgFormLookupBeforeOkCb = ((param: IKgFormLookupBeforeOkCbParam) => Promise<boolean>) & IKgEventCb;
90
- /** 事件监听函数: lookupOk. */
91
- export declare type IKgFormLookupOkCbParam = {
121
+ export declare type IKgFormLookupBeforeOkEventListener = ((param: IKgFormLookupBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
122
+ export declare type IKgFormLookupOkEventListenerParameter = {
123
+ /**
124
+ * 表单控件所处环境.
125
+ */
126
+ context: KG_FORM_CONTEXT;
92
127
  /** 是否多选, 否则单选. */
93
128
  isMultiple: boolean;
94
129
  /** 表单数据对象. */
@@ -110,36 +145,48 @@ export declare type IKgFormLookupOkCbParam = {
110
145
  /** 变量. */
111
146
  var_nam: string;
112
147
  };
113
- export declare type IKgFormLookupOkCb = ((param: IKgFormLookupOkCbParam) => Promise<boolean>) & IKgEventCb;
114
- export declare type IKgFormCbParam = IKgFormChangeCbParam | IKgFormSelectBeforeSetDatasCbParam | IKgFormSelectChangeCbParam | IKgFormLookupBeforeOpenCbParam | IKgFormLookupBeforeOkCbParam | IKgFormLookupOkCbParam;
115
- export declare type IKgFormCb = IKgFormChangeCb | IKgFormSelectBeforeSetDatasCb | IKgFormSelectChangeCb | IKgFormLookupBeforeOpenCb | IKgFormLookupBeforeOkCb | IKgFormLookupOkCb;
116
- export declare const useKgFormStore: import("pinia").StoreDefinition<"KgForm", {
117
- changeListenersMap: Map<string, IKgFormChangeCb[]>;
118
- selectBeforeSetDatasListenersMap: Map<string, IKgFormSelectBeforeSetDatasCb[]>;
119
- selectChangeListenersMap: Map<string, IKgFormSelectChangeCb[]>;
120
- lookupBeforeOpenListenersMap: Map<string, IKgFormLookupBeforeOpenCb[]>;
121
- lookupBeforeOkListenersMap: Map<string, IKgFormLookupBeforeOkCb[]>;
122
- lookupOkListenersMap: Map<string, IKgFormLookupOkCb[]>;
123
- }, {}, {
148
+ export declare type IKgFormLookupOkEventListener = ((param: IKgFormLookupOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
149
+ export declare type IKgFormEventListenerParameter = IKgFormChangeEventListenerParameter | IKgFormSelectBeforeRequestEventListenerParameter | IKgFormSelectBeforeSetDatasEventListenerParameter | IKgFormSelectChangeEventListenerParameter | IKgFormLookupBeforeOpenEventListenerParameter | IKgFormLookupBeforeOkEventListenerParameter | IKgFormLookupOkEventListenerParameter;
150
+ export declare type IKgFormEventListener = IKgFormChangeEventListener | IKgFormSelectBeforeRequestEventListener | IKgFormSelectBeforeSetDatasEventListener | IKgFormSelectChangeEventListener | IKgFormLookupBeforeOpenEventListener | IKgFormLookupBeforeOkEventListener | IKgFormLookupOkEventListener;
151
+ export interface IUseKgFormStoreState {
152
+ changeEventListenersMap: Map<string, Array<IKgFormChangeEventListener>>;
153
+ lookupBeforeOkEventListenersMap: Map<string, Array<IKgFormLookupBeforeOkEventListener>>;
154
+ lookupBeforeOpenEventListenersMap: Map<string, Array<IKgFormLookupBeforeOpenEventListener>>;
155
+ lookupOkEventListenersMap: Map<string, Array<IKgFormLookupOkEventListener>>;
156
+ selectBeforeRequestEventListenersMap: Map<string, Array<IKgFormSelectBeforeRequestEventListener>>;
157
+ selectBeforeSetDatasEventListenersMap: Map<string, Array<IKgFormSelectBeforeSetDatasEventListener>>;
158
+ selectChangeEventListenersMap: Map<string, Array<IKgFormSelectChangeEventListener>>;
159
+ }
160
+ export interface IUseKgFormStoreGetters {
161
+ }
162
+ export interface IUseKgFormStoreActions {
124
163
  /**
125
164
  * 注册事件监听.
126
165
  * @param formID 界面标识.
127
166
  * @param event 事件名称.
128
167
  * @param cb 回调函数.
129
168
  */
130
- addEventListener(formID: string, event: IKgFormEvent, cb: IKgFormCb): void;
169
+ addEventListener(formID: string, event: IKgFormEvent, cb: IKgFormEventListener): void;
131
170
  /**
132
- * 退订事件监听.
133
- * @param formID 界面标识.
134
- * @param event 事件名称.
135
- * @param cb 回调函数.
171
+ * 清理数据.
172
+ * @param formID 页面标识.
136
173
  */
137
- removeEventListener(formID: string, event: IKgFormEvent, cb?: IKgFormCb): void;
174
+ dispose(formID: string | null | undefined): void;
138
175
  /**
139
176
  * 触发事件.
140
177
  * @param formID 界面标识.
141
178
  * @param event 事件名称.
142
179
  * @param param 数据.
143
180
  */
144
- emit<T = IKgFormCbParam>(formID: string, event: IKgFormEvent, param: T): Promise<boolean>;
145
- }>;
181
+ emit<T = IKgFormEventListenerParameter>(formID: string, event: IKgFormEvent, param: T): Promise<boolean>;
182
+ /**
183
+ * 退订事件监听.
184
+ * @param formID 界面标识.
185
+ * @param event 事件名称.
186
+ * @param cb 回调函数.
187
+ */
188
+ removeEventListener(formID: string, event: IKgFormEvent, cb?: IKgFormEventListener): void;
189
+ }
190
+ export declare type IUseKgFormStore = StoreDefinition<'KgForm', IUseKgFormStoreState, IUseKgFormStoreGetters, IUseKgFormStoreActions>;
191
+ export declare type IKgFormStore = ReturnType<IUseKgFormStore>;
192
+ export declare const useKgFormStore: IUseKgFormStore;
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<{
6
6
  required: boolean;
7
7
  };
8
8
  kgContext: {
9
- type: import("vue").PropType<string>;
9
+ type: import("vue").PropType<KG_FORM_CONTEXT>;
10
10
  default: KG_FORM_CONTEXT;
11
11
  };
12
12
  kgDisabled: {
@@ -48,7 +48,7 @@ declare const _default: import("vue").DefineComponent<{
48
48
  required: boolean;
49
49
  };
50
50
  kgContext: {
51
- type: import("vue").PropType<string>;
51
+ type: import("vue").PropType<KG_FORM_CONTEXT>;
52
52
  default: KG_FORM_CONTEXT;
53
53
  };
54
54
  kgDisabled: {
@@ -91,7 +91,7 @@ declare const _default: import("vue").DefineComponent<{
91
91
  }, {
92
92
  value: import("./index.vm").IKgFormItemValue;
93
93
  kgDisabled: boolean;
94
- kgContext: string;
94
+ kgContext: KG_FORM_CONTEXT;
95
95
  kgShowLabel: boolean;
96
96
  kgAllowClear: boolean;
97
97
  kgShowTime: boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>;
@@ -1,11 +1,11 @@
1
- import { IKgFormItemProps } from './index.vm';
2
- export declare function _useFormRules(props: IKgFormItemProps): {
1
+ import { KgFormItemProps } from './index.vm';
2
+ export declare function _useFormRules(props: KgFormItemProps): {
3
3
  /** 表单验证规则. */
4
4
  formRules: import("vue").ComputedRef<import("ant-design-vue/es/form").RuleObject[]>;
5
5
  /** 正在计算表单验证规则. */
6
6
  isFormRulesLoading: import("vue").Ref<boolean>;
7
7
  };
8
- export declare function useKgFormItem<T = Record<string, any>>(props?: IKgFormItemProps): {
8
+ export declare function useKgFormItem<T = Record<string, any>>(props?: KgFormItemProps): {
9
9
  /** 控件类型. */
10
10
  controlType: import("vue").ComputedRef<string | null | undefined>;
11
11
  /** 控件配置参数. */