@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,8 +1,10 @@
1
1
  import { RuleObject } from 'ant-design-vue/es/form';
2
2
  import { FormInstance } from 'ant-design-vue/lib/form/Form';
3
+ import { StoreDefinition } from 'pinia';
3
4
  import { Ref } from 'vue';
4
5
  import { VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
5
- import { IKgEventCb, KG_BUTTON_TYPE } from '../../consts';
6
+ import { IKgEventListener, KG_BUTTON_TYPE } from '../../consts';
7
+ import { KgAny } from '../../types';
6
8
  import { IKgTableRow } from '../KgTable';
7
9
  /**
8
10
  * 事件类型.
@@ -11,33 +13,35 @@ import { IKgTableRow } from '../KgTable';
11
13
  * 'beforeOk': 点击确认按钮之后, 执行默认逻辑之前
12
14
  * 'afterValidate': 点击确认按钮之后, 表单验证完成,
13
15
  * 'beforeRequest': 发起接口请求之前. 表单验证完成, 参数解析完成,
14
- * 'ok': 请求成功, 即将关闭提交弹窗
16
+ * 'ok': 请求成功, 关闭提交弹窗之后
15
17
  * 'error': 请求失败. 请求失败了, 或者请求返回了错误消息
16
18
  * 'close': 关闭提交弹窗
17
19
  */
18
20
  export declare type IKgSubmitEvent = 'beforeOpen' | 'open' | 'beforeOk' | 'afterValidate' | 'beforeRequest' | 'ok' | 'error' | 'close';
19
- /** 事件监听函数: beforeOpen. */
20
- export declare type IKgSubmitBeforeOpenCbParam = {
21
+ export declare type IKgSubmitBeforeOpenEventListenerParameter = {
21
22
  isCreating: boolean | null;
22
23
  isUpdating: boolean | null;
23
24
  isCopying: boolean | null;
24
25
  isDeleting: boolean | null;
25
26
  row: IKgTableRow | null;
26
27
  };
27
- export declare type IKgSubmitBeforeOpenCb = ((param: IKgSubmitBeforeOpenCbParam) => Promise<boolean>) & IKgEventCb;
28
- /** 事件监听函数: open. */
29
- export declare type IKgSubmitOpenCbParam = {
28
+ export declare type IKgSubmitBeforeOpenEventListener = ((param: IKgSubmitBeforeOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
29
+ export declare type IKgSubmitOpenEventListenerParameter = {
30
+ /** @deprecated 请直接使用 {@link IUseKgVar.isCreating} */
30
31
  isCreating: boolean | null;
32
+ /** @deprecated 请直接使用 {@link IUseKgVar.isUpdating} */
31
33
  isUpdating: boolean | null;
34
+ /** @deprecated 请直接使用 {@link IUseKgVar.isCopying} */
32
35
  isCopying: boolean | null;
36
+ /** @deprecated 请直接使用 {@link IUseKgVar.isDeleting} */
33
37
  isDeleting: boolean | null;
34
- /** 勾选的表格行. */
38
+ /** @deprecated 请直接使用 {@link IUseKgTable.selectedRow} */
35
39
  row: IKgTableRow | null;
40
+ /** @deprecated 请直接使用 {@link IUseKgSearch.formModel} */
36
41
  model: Ref<Record<string, any>>;
37
42
  };
38
- export declare type IKgSubmitOpenCb = ((param: IKgSubmitOpenCbParam) => Promise<boolean>) & IKgEventCb;
39
- /** 事件监听函数: beforeOk. */
40
- export declare type IKgSubmitBeforeOkCbParam = {
43
+ export declare type IKgSubmitOpenEventListener = ((param: IKgSubmitOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
44
+ export declare type IKgSubmitBeforeOkEventListenerParameter = {
41
45
  isCopying: boolean | null;
42
46
  isCreating: boolean | null;
43
47
  isDeleting: boolean | null;
@@ -55,9 +59,8 @@ export declare type IKgSubmitBeforeOkCbParam = {
55
59
  */
56
60
  rules: Ref<Record<string, RuleObject[]>>;
57
61
  };
58
- export declare type IKgSubmitBeforeOkCb = ((param: IKgSubmitBeforeOkCbParam) => Promise<boolean>) & IKgEventCb;
59
- /** 事件监听函数: afterValidate. */
60
- export declare type IKgSubmitAfterValidateCbParam = {
62
+ export declare type IKgSubmitBeforeOkEventListener = ((param: IKgSubmitBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
63
+ export declare type IKgSubmitAfterValidateEventListenerParameter = {
61
64
  isCopying: boolean | null;
62
65
  isCreating: boolean | null;
63
66
  isDeleting: boolean | null;
@@ -66,14 +69,13 @@ export declare type IKgSubmitAfterValidateCbParam = {
66
69
  row: IKgTableRow | null;
67
70
  rows: Array<IKgTableRow> | null;
68
71
  };
69
- export declare type IKgSubmitAfterValidateCb = ((param: IKgSubmitAfterValidateCbParam) => Promise<boolean>) & IKgEventCb;
70
- /** 事件监听函数: beforeRequest. */
71
- export declare type IKgSubmitBeforeRequestCbParam = {
72
+ export declare type IKgSubmitAfterValidateEventListener = ((param: IKgSubmitAfterValidateEventListenerParameter) => Promise<boolean>) & IKgEventListener;
73
+ export declare type IKgSubmitBeforeRequestEventListenerParameter = {
72
74
  /**
73
75
  * <p>请求参数.</p>
74
76
  * <p>是一个对象或者列表.</p>
75
77
  */
76
- data: Ref<Record<string, any> | Array<Record<string, any>>>;
78
+ data: Ref<KgAny>;
77
79
  isCopying: boolean | null;
78
80
  isCreating: boolean | null;
79
81
  isDeleting: boolean | null;
@@ -89,9 +91,8 @@ export declare type IKgSubmitBeforeRequestCbParam = {
89
91
  row: IKgTableRow | null;
90
92
  rows: Array<IKgTableRow> | null;
91
93
  };
92
- export declare type IKgSubmitBeforeRequestCb = ((param: IKgSubmitBeforeRequestCbParam) => Promise<boolean>) & IKgEventCb;
93
- /** 事件监听函数: ok. */
94
- export declare type IKgSubmitOkCbParam = {
94
+ export declare type IKgSubmitBeforeRequestEventListener = ((param: IKgSubmitBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
95
+ export declare type IKgSubmitOkEventListenerParameter = {
95
96
  isCreating: boolean | null;
96
97
  isUpdating: boolean | null;
97
98
  isCopying: boolean | null;
@@ -101,268 +102,81 @@ export declare type IKgSubmitOkCbParam = {
101
102
  /** 接口返回结果. */
102
103
  result: any | null;
103
104
  };
104
- export declare type IKgSubmitOkCb = ((param: IKgSubmitOkCbParam) => Promise<boolean>) & IKgEventCb;
105
- /** 事件监听函数: error. */
106
- export declare type IKgSubmitErrorCb = ((param: any) => Promise<boolean>) & IKgEventCb;
107
- /** 事件监听函数: close. */
108
- export declare type IKgSubmitCloseCb = ((param?: any | null) => Promise<boolean>) & IKgEventCb;
109
- export declare type IKgSubmitCbParam = IKgSubmitBeforeOpenCbParam | IKgSubmitOpenCbParam | IKgSubmitBeforeOkCbParam | IKgSubmitAfterValidateCbParam | IKgSubmitBeforeRequestCbParam | IKgSubmitOkCbParam | null;
110
- export declare type IKgSubmitCb = IKgSubmitBeforeOpenCb | IKgSubmitOpenCb | IKgSubmitBeforeOkCb | IKgSubmitAfterValidateCb | IKgSubmitBeforeRequestCb | IKgSubmitOkCb | IKgSubmitErrorCb | IKgSubmitCloseCb;
111
- export declare const useKgSubmitStore: import("pinia").StoreDefinition<"KgSubmit", {
112
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
113
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
114
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
115
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
116
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
117
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
105
+ export declare type IKgSubmitOkEventListener = ((param: IKgSubmitOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
106
+ export declare type IKgSubmitErrorEventListenerParameter = {};
107
+ export declare type IKgSubmitErrorEventListener = ((param: IKgSubmitErrorEventListenerParameter) => Promise<boolean>) & IKgEventListener;
108
+ export declare type IKgSubmitCloseEventListenerParameter = {} | null | undefined;
109
+ export declare type IKgSubmitCloseEventListener = ((param: IKgSubmitCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
110
+ export declare type IKgSubmitEventListenerParameter = IKgSubmitBeforeOpenEventListenerParameter | IKgSubmitOpenEventListenerParameter | IKgSubmitBeforeOkEventListenerParameter | IKgSubmitAfterValidateEventListenerParameter | IKgSubmitBeforeRequestEventListenerParameter | IKgSubmitOkEventListenerParameter | IKgSubmitErrorEventListenerParameter | IKgSubmitCloseEventListenerParameter;
111
+ export declare type IKgSubmitEventListener = IKgSubmitBeforeOpenEventListener | IKgSubmitOpenEventListener | IKgSubmitBeforeOkEventListener | IKgSubmitAfterValidateEventListener | IKgSubmitBeforeRequestEventListener | IKgSubmitOkEventListener | IKgSubmitErrorEventListener | IKgSubmitCloseEventListener;
112
+ export interface IUseKgSubmitStoreState {
113
+ afterValidateEventListenersMap: Map<string, Array<IKgSubmitAfterValidateEventListener>>;
114
+ beforeOkEventListenersMap: Map<string, Array<IKgSubmitBeforeOkEventListener>>;
115
+ beforeOpenEventListenersMap: Map<string, Array<IKgSubmitBeforeOpenEventListener>>;
116
+ beforeRequestEventListenersMap: Map<string, Array<IKgSubmitBeforeRequestEventListener>>;
117
+ closeEventListenersMap: Map<string, Array<IKgSubmitCloseEventListener>>;
118
+ errorEventListenersMap: Map<string, Array<IKgSubmitErrorEventListener>>;
119
+ /** 表单数据对象. */
120
+ formModelMap: Map<string, Record<string, any>>;
118
121
  /** 表单对象. */
119
122
  formRefMap: Map<string, Ref<FormInstance | null>>;
120
- isLoadingMap: Map<string, boolean>;
121
- /** 表单数据对象. */
122
- modelMap: Map<string, Record<string, any>>;
123
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
124
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
125
123
  /**
126
124
  * <p>表单验证规则.</p>
127
125
  * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
128
126
  */
129
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
130
- }, {
131
- /** 是否处于加载状态. */
132
- isLoading(state: {
133
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
134
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
135
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
136
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
137
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
138
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
139
- formRefMap: Map<string, Ref<FormInstance | null>>;
140
- isLoadingMap: Map<string, boolean>;
141
- modelMap: Map<string, Record<string, any>>;
142
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
143
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
144
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
145
- } & import("pinia").PiniaCustomStateProperties<{
146
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
147
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
148
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
149
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
150
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
151
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
152
- /** 表单对象. */
153
- formRefMap: Map<string, Ref<FormInstance | null>>;
154
- isLoadingMap: Map<string, boolean>;
155
- /** 表单数据对象. */
156
- modelMap: Map<string, Record<string, any>>;
157
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
158
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
159
- /**
160
- * <p>表单验证规则.</p>
161
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
162
- */
163
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
164
- }>): (formID?: string | null) => boolean;
165
- getModel(state: {
166
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
167
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
168
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
169
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
170
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
171
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
172
- formRefMap: Map<string, Ref<FormInstance | null>>;
173
- isLoadingMap: Map<string, boolean>;
174
- modelMap: Map<string, Record<string, any>>;
175
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
176
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
177
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
178
- } & import("pinia").PiniaCustomStateProperties<{
179
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
180
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
181
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
182
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
183
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
184
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
185
- /** 表单对象. */
186
- formRefMap: Map<string, Ref<FormInstance | null>>;
187
- isLoadingMap: Map<string, boolean>;
188
- /** 表单数据对象. */
189
- modelMap: Map<string, Record<string, any>>;
190
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
191
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
192
- /**
193
- * <p>表单验证规则.</p>
194
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
195
- */
196
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
197
- }>): (formID?: string | null) => Record<string, any> | null;
198
- getFormRef(state: {
199
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
200
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
201
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
202
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
203
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
204
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
205
- formRefMap: Map<string, Ref<FormInstance | null>>;
206
- isLoadingMap: Map<string, boolean>;
207
- modelMap: Map<string, Record<string, any>>;
208
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
209
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
210
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
211
- } & import("pinia").PiniaCustomStateProperties<{
212
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
213
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
214
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
215
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
216
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
217
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
218
- /** 表单对象. */
219
- formRefMap: Map<string, Ref<FormInstance | null>>;
220
- isLoadingMap: Map<string, boolean>;
221
- /** 表单数据对象. */
222
- modelMap: Map<string, Record<string, any>>;
223
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
224
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
225
- /**
226
- * <p>表单验证规则.</p>
227
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
228
- */
229
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
230
- }>): (formID?: string | null) => Ref<FormInstance | null>;
231
- getRules(state: {
232
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
233
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
234
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
235
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
236
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
237
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
238
- formRefMap: Map<string, Ref<FormInstance | null>>;
239
- isLoadingMap: Map<string, boolean>;
240
- modelMap: Map<string, Record<string, any>>;
241
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
242
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
243
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
244
- } & import("pinia").PiniaCustomStateProperties<{
245
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
246
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
247
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
248
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
249
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
250
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
251
- /** 表单对象. */
252
- formRefMap: Map<string, Ref<FormInstance | null>>;
253
- isLoadingMap: Map<string, boolean>;
254
- /** 表单数据对象. */
255
- modelMap: Map<string, Record<string, any>>;
256
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
257
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
258
- /**
259
- * <p>表单验证规则.</p>
260
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
261
- */
262
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
263
- }>): (formID?: string | null) => Ref<Record<string, Array<RuleObject>>>;
264
- getVarSubmitConfig(state: {
265
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
266
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
267
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
268
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
269
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
270
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
271
- formRefMap: Map<string, Ref<FormInstance | null>>;
272
- isLoadingMap: Map<string, boolean>;
273
- modelMap: Map<string, Record<string, any>>;
274
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
275
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
276
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
277
- } & import("pinia").PiniaCustomStateProperties<{
278
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
279
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
280
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
281
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
282
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
283
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
284
- /** 表单对象. */
285
- formRefMap: Map<string, Ref<FormInstance | null>>;
286
- isLoadingMap: Map<string, boolean>;
287
- /** 表单数据对象. */
288
- modelMap: Map<string, Record<string, any>>;
289
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
290
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
291
- /**
292
- * <p>表单验证规则.</p>
293
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
294
- */
295
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
296
- }>): (formID: string | null | undefined, param?: {
127
+ formRulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
128
+ isLoadingMap: Map<string, boolean>;
129
+ okEventListenersMap: Map<string, Array<IKgSubmitOkEventListener>>;
130
+ openEventListenersMap: Map<string, Array<IKgSubmitOpenEventListener>>;
131
+ }
132
+ export interface IUseKgSubmitStoreGetters {
133
+ getFormModel(): (formID?: string | null) => Record<string, any> | null;
134
+ getFormRef(): (formID?: string | null) => Ref<FormInstance | null>;
135
+ getFormRules(): (formID?: string | null) => Ref<Record<string, Array<RuleObject>>>;
136
+ getVarSubmitConfig(): (formID: string | null | undefined, param?: {
297
137
  buttonType?: KG_BUTTON_TYPE;
298
138
  buttonVarName?: string | null;
299
139
  }) => VarSubmitConfig | null;
300
- getVarSubmitDetails(state: {
301
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
302
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
303
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
304
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
305
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
306
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
307
- formRefMap: Map<string, Ref<FormInstance | null>>;
308
- isLoadingMap: Map<string, boolean>;
309
- modelMap: Map<string, Record<string, any>>;
310
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
311
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
312
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
313
- } & import("pinia").PiniaCustomStateProperties<{
314
- afterValidateListenersMap: Map<string, IKgSubmitAfterValidateCb[]>;
315
- beforeOkListenersMap: Map<string, IKgSubmitBeforeOkCb[]>;
316
- beforeOpenListenersMap: Map<string, IKgSubmitBeforeOpenCb[]>;
317
- beforeRequestListenersMap: Map<string, IKgSubmitBeforeRequestCb[]>;
318
- closeListenersMap: Map<string, IKgSubmitCloseCb[]>;
319
- errorListenersMap: Map<string, IKgSubmitErrorCb[]>;
320
- /** 表单对象. */
321
- formRefMap: Map<string, Ref<FormInstance | null>>;
322
- isLoadingMap: Map<string, boolean>;
323
- /** 表单数据对象. */
324
- modelMap: Map<string, Record<string, any>>;
325
- okListenersMap: Map<string, IKgSubmitOkCb[]>;
326
- openListenersMap: Map<string, IKgSubmitOpenCb[]>;
327
- /**
328
- * <p>表单验证规则.</p>
329
- * <p>在 beforeOk 事件中会将此对象传给调用者, 调用者可以修改此对象, 从而添加自定义的验证规则.</p>
330
- */
331
- rulesMap: Map<string, Ref<Record<string, RuleObject[]>>>;
332
- }>): (formID: string | null | undefined, param?: {
140
+ getVarSubmitDetails(): (formID: string | null | undefined, param?: {
333
141
  buttonType?: KG_BUTTON_TYPE;
334
142
  buttonVarName?: string | null;
335
143
  isKey?: 0 | 1 | null;
336
144
  isVisible?: 0 | 1 | null;
337
145
  varName?: string | null;
338
146
  } | null) => Array<VarSubmitDetail>;
339
- }, {
340
- /**
341
- * 清理数据.
342
- * @param formID 页面标识.
343
- */
344
- dispose(formID?: string | null): null | undefined;
147
+ /** 是否处于加载状态. */
148
+ isLoading(): (formID?: string | null) => boolean;
149
+ }
150
+ export interface IUseKgSubmitStoreActions {
345
151
  /**
346
152
  * 注册事件监听.
347
153
  * @param formID 界面标识.
348
154
  * @param event 事件名称.
349
155
  * @param cb 回调函数.
350
156
  */
351
- addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
157
+ addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitEventListener): void;
352
158
  /**
353
- * 退订事件监听.
354
- * @param formID 界面标识.
355
- * @param event 事件名称.
356
- * @param cb 回调函数.
159
+ * 清理数据.
160
+ * @param formID 页面标识.
357
161
  */
358
- removeEventListener(formID: string, event: IKgSubmitEvent, cb?: IKgSubmitCb): void;
359
- emit(formID: string, event: IKgSubmitEvent, param: IKgSubmitCbParam): Promise<boolean>;
360
- setIsLoading(formID: string, value: boolean): void;
361
- setModel(formID?: string | null, model?: Record<string, any> | null): void;
162
+ dispose(formID?: string | null): void;
163
+ emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent, param: T): Promise<boolean>;
362
164
  patchVarSubmitDetail(formID: string | null | undefined, param: {
363
165
  buttonType?: KG_BUTTON_TYPE;
364
166
  buttonVarName?: string | null;
365
167
  properties: VarSubmitDetail;
366
168
  varName: string | null | undefined;
367
169
  }): void;
368
- }>;
170
+ /**
171
+ * 退订事件监听.
172
+ * @param formID 界面标识.
173
+ * @param event 事件名称.
174
+ * @param cb 回调函数.
175
+ */
176
+ removeEventListener(formID: string, event: IKgSubmitEvent, cb?: IKgSubmitEventListener): void;
177
+ setFormModel(formID?: string | null, model?: Record<string, any> | null): void;
178
+ setIsLoading(formID: string, value: boolean): void;
179
+ }
180
+ export declare type IUseKgSubmitStore = StoreDefinition<'KgSubmit', IUseKgSubmitStoreState, IUseKgSubmitStoreGetters, IUseKgSubmitStoreActions>;
181
+ export declare type IKgSubmitStore = ReturnType<IUseKgSubmitStore>;
182
+ export declare const useKgSubmitStore: IUseKgSubmitStore;
@@ -1,3 +1,4 @@
1
+ import { KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../consts';
1
2
  /**
2
3
  * 表单的左边距.
3
4
  */
@@ -45,7 +46,7 @@ export declare const SUBMIT_DEFAULT_WIDTH: number;
45
46
  /**
46
47
  * 默认布局方式.
47
48
  */
48
- export declare const SUBMIT_DEFAULT_LAYOUT = "vertical";
49
+ export declare const SUBMIT_DEFAULT_LAYOUT = KG__VAR_SUBMIT_CONFIG__LAYOUT.VERTICAL;
49
50
  /**
50
51
  * 单位为 SPAN 时, 文本的默认宽度.
51
52
  */
@@ -17,25 +17,17 @@ export declare type IUseColumns = {
17
17
  scrollX: ComputedRef<string>;
18
18
  };
19
19
  export declare function _useColumns(props: IKgTableProps): IUseColumns;
20
- export declare type IUseLoading = {
20
+ export declare function _useLoading(): {
21
21
  /** 是否显示加载状态. */
22
22
  isLoading: ComputedRef<boolean>;
23
23
  };
24
- export declare function _useLoading(): IUseLoading;
25
- export declare type IUseResizeObserver = {};
26
- export declare function _useResizeObserver(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>): IUseResizeObserver;
27
- export declare type IUseDragColumn = {};
28
- export declare function _useDragColumn(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>, columns: ComputedRef<ColumnsType<IKgTableRow>>): IUseDragColumn;
29
- export interface IUseDatas {
30
- /** 表格数据. */
31
- datas: ComputedRef<Array<IKgTableRow>>;
32
- /**
33
- * 处理表格数据.
34
- * @param response 查询接口返回数据.
35
- */
36
- transformDatas(response: Ref<any>): {
24
+ export declare function _useResizeObserver(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>): {};
25
+ export declare function _useDragColumn(kgTableRef: Ref<UnwrapRef<HTMLDivElement | null>>, columns: ComputedRef<ColumnsType<IKgTableRow>>): {};
26
+ export declare function _useDatas(): {
27
+ datas: ComputedRef<IKgTableRow[]>;
28
+ transformDatas: (response: Ref<any>) => {
37
29
  datas: Ref<Array<IKgTableRow>>;
38
30
  total: Ref<number>;
39
31
  };
40
- }
41
- export declare function _useDatas(): IUseDatas;
32
+ requestDescriptions: () => Promise<void>;
33
+ };
@@ -1,5 +1,4 @@
1
1
  import { PropType } from 'vue';
2
- import './KgTable.Setting.less';
3
2
  export declare const getProps: () => {
4
3
  kgDisabled: {
5
4
  type: PropType<boolean>;
@@ -11,4 +11,4 @@ export declare type IUseServices = {
11
11
  };
12
12
  export declare function _useServices(): IUseServices;
13
13
  /** 监控表格列的下拉列表的尺寸变化, 从而调整位置, 防止遮盖. */
14
- export declare function _useObserveMenuColumns(isMenuItemColumnsVisible: Ref<boolean>): void;
14
+ export declare function _useObserveMenuItemColumns(isMenuItemColumnsVisible: Ref<boolean>): void;
@@ -1,6 +1,4 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
- import '../KgTable.Setting.less';
3
- import './KgTable.Setting.ConfigModal.less';
4
2
  export declare const getProps: () => {
5
3
  visible: PropType<boolean>;
6
4
  'onUpdate:visible': PropType<(value: boolean) => void>;