@kengic/vue 0.21.1-beta.1 → 0.21.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +4675 -4334
- package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Create.d.ts +3 -2
- package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Export.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Import.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.ImportTemplate.d.ts +5 -4
- package/dist/src/components/KgButton/components/KgButton.Search.d.ts +3 -3
- package/dist/src/components/KgButton/components/KgButton.Update.d.ts +3 -2
- package/dist/src/components/KgButton/index.hooks.d.ts +70 -22
- package/dist/src/components/KgButton/index.store.d.ts +56 -18
- package/dist/src/components/KgModal/KgModal.d.ts +424 -86
- package/dist/src/components/KgModal/KgModal.hooks.d.ts +33 -0
- package/dist/src/components/KgModal/components/KgModal.HeaderButtons.d.ts +74 -0
- package/dist/src/components/KgModal/index.d.ts +1 -2
- package/dist/src/components/KgModal/index.vm.d.ts +8 -194
- package/dist/src/components/KgResizable/KgResizable.d.ts +8 -8
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.Body.d.ts +9 -3
- package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.d.ts +16 -10
- package/dist/src/components/KgSearch/index.hooks.d.ts +132 -20
- package/dist/src/components/KgSearch/index.store.d.ts +206 -31
- package/dist/src/components/KgSubmit/KgSubmit.d.ts +7 -7
- package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +5 -3
- package/dist/src/components/KgSubmit/components/KgSubmit.VarSubmitConfig.Button.d.ts +7 -0
- package/dist/src/components/KgSubmit/components/{KgSubmit.Header.VarSubmitConfig.d.ts → KgSubmit.VarSubmitConfig.Modal.d.ts} +3 -2
- package/dist/src/components/KgSubmit/index.hooks.d.ts +15 -6
- package/dist/src/components/KgSubmit/index.store.d.ts +10 -0
- package/dist/src/components/KgSubmit/index.vm.d.ts +53 -7
- package/dist/src/components/KgTable/index.vm.d.ts +3 -1
- package/dist/src/config/index.hooks.d.ts +6 -29
- package/dist/src/config/index.store.d.ts +6 -4
- package/dist/src/consts/i18n/en.d.ts +1 -1
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -1
- package/dist/src/helpers/tsx.helper.d.ts +16 -6
- package/dist/src/utils/kg.util.d.ts +2 -1
- package/package.json +93 -93
- package/dist/src/components/KgModal/components/KgModal.Close.d.ts +0 -41
- package/dist/src/components/KgSubmit/components/KgSubmit.Header.d.ts +0 -82
@@ -1,4 +1,3 @@
|
|
1
|
-
import { StoreDefinition } from 'pinia';
|
2
1
|
import { IKgEventCb } from '../../consts';
|
3
2
|
import { IKgTableRequestParams } from '../KgTable';
|
4
3
|
/**
|
@@ -10,6 +9,7 @@ import { IKgTableRequestParams } from '../KgTable';
|
|
10
9
|
export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
|
11
10
|
/** 事件监听函数: ready. */
|
12
11
|
export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
12
|
+
/** 事件监听函数: search. */
|
13
13
|
export declare type IKgSearchSearchCb = ((param: IKgTableRequestParams) => Promise<boolean>) & IKgEventCb;
|
14
14
|
/** 事件监听函数: reset. */
|
15
15
|
export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
|
@@ -19,33 +19,198 @@ export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSear
|
|
19
19
|
export declare type IKgSearchSearchFn = (param?: IKgTableRequestParams) => void;
|
20
20
|
/** 重置方法. */
|
21
21
|
export declare type IKgSearchResetFn = () => void;
|
22
|
-
export
|
23
|
-
/**
|
22
|
+
export declare const useKgSearchStore: import("pinia").StoreDefinition<"KgSearch", {
|
23
|
+
/**
|
24
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
25
|
+
*/
|
24
26
|
isReadyMap: Map<string, boolean>;
|
25
27
|
/** 表单数据对象. */
|
26
28
|
modelMap: Map<string, Record<string, any>>;
|
27
|
-
/** 高级查询的操作符表单数据对象. */
|
28
|
-
operatorModelMap: Map<string, Record<string, string>>;
|
29
29
|
/** 事件监听函数列表: ready. */
|
30
|
-
onReadyListenersMap: Map<string,
|
31
|
-
/** 事件监听函数列表: search. */
|
32
|
-
onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
|
30
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
33
31
|
/** 事件监听函数列表: reset. */
|
34
|
-
onResetListenersMap: Map<string,
|
35
|
-
/**
|
36
|
-
|
32
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
33
|
+
/** 事件监听函数列表: search. */
|
34
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
35
|
+
/** 高级查询的操作符表单数据对象. */
|
36
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
37
37
|
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
38
38
|
resetFnMap: Map<string, IKgSearchResetFn>;
|
39
|
-
|
40
|
-
|
41
|
-
getIsReady(): (formID: string | null | undefined) => boolean;
|
42
|
-
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
43
|
-
getOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
|
44
|
-
getSearchFn(): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
45
|
-
getResetFn(): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
39
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
40
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
46
41
|
}, {
|
42
|
+
getIsReady(state: {
|
43
|
+
isReadyMap: Map<string, boolean>;
|
44
|
+
modelMap: Map<string, Record<string, any>>;
|
45
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
46
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
47
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
48
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
49
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
50
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
51
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
52
|
+
/**
|
53
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
54
|
+
*/
|
55
|
+
isReadyMap: Map<string, boolean>;
|
56
|
+
/** 表单数据对象. */
|
57
|
+
modelMap: Map<string, Record<string, any>>;
|
58
|
+
/** 事件监听函数列表: ready. */
|
59
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
60
|
+
/** 事件监听函数列表: reset. */
|
61
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
62
|
+
/** 事件监听函数列表: search. */
|
63
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
64
|
+
/** 高级查询的操作符表单数据对象. */
|
65
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
66
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
67
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
68
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
69
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
70
|
+
}>): (formID: string | null | undefined) => boolean;
|
71
|
+
getModel(state: {
|
72
|
+
isReadyMap: Map<string, boolean>;
|
73
|
+
modelMap: Map<string, Record<string, any>>;
|
74
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
75
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
76
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
77
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
78
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
79
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
80
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
81
|
+
/**
|
82
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
83
|
+
*/
|
84
|
+
isReadyMap: Map<string, boolean>;
|
85
|
+
/** 表单数据对象. */
|
86
|
+
modelMap: Map<string, Record<string, any>>;
|
87
|
+
/** 事件监听函数列表: ready. */
|
88
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
89
|
+
/** 事件监听函数列表: reset. */
|
90
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
91
|
+
/** 事件监听函数列表: search. */
|
92
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
93
|
+
/** 高级查询的操作符表单数据对象. */
|
94
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
95
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
96
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
97
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
98
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
99
|
+
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
100
|
+
getOperatorModel(state: {
|
101
|
+
isReadyMap: Map<string, boolean>;
|
102
|
+
modelMap: Map<string, Record<string, any>>;
|
103
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
104
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
105
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
106
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
107
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
108
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
109
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
110
|
+
/**
|
111
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
112
|
+
*/
|
113
|
+
isReadyMap: Map<string, boolean>;
|
114
|
+
/** 表单数据对象. */
|
115
|
+
modelMap: Map<string, Record<string, any>>;
|
116
|
+
/** 事件监听函数列表: ready. */
|
117
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
118
|
+
/** 事件监听函数列表: reset. */
|
119
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
120
|
+
/** 事件监听函数列表: search. */
|
121
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
122
|
+
/** 高级查询的操作符表单数据对象. */
|
123
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
124
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
125
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
126
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
127
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
128
|
+
}>): (formID: string | null | undefined) => Record<string, any> | null;
|
129
|
+
/**
|
130
|
+
* 根据 formID 获取查询方法.
|
131
|
+
* @param state
|
132
|
+
*/
|
133
|
+
getSearchFn(state: {
|
134
|
+
isReadyMap: Map<string, boolean>;
|
135
|
+
modelMap: Map<string, Record<string, any>>;
|
136
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
137
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
138
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
139
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
140
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
141
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
142
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
143
|
+
/**
|
144
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
145
|
+
*/
|
146
|
+
isReadyMap: Map<string, boolean>;
|
147
|
+
/** 表单数据对象. */
|
148
|
+
modelMap: Map<string, Record<string, any>>;
|
149
|
+
/** 事件监听函数列表: ready. */
|
150
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
151
|
+
/** 事件监听函数列表: reset. */
|
152
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
153
|
+
/** 事件监听函数列表: search. */
|
154
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
155
|
+
/** 高级查询的操作符表单数据对象. */
|
156
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
157
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
158
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
159
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
160
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
161
|
+
}>): (formID: string | null | undefined) => IKgSearchSearchFn | null;
|
162
|
+
/**
|
163
|
+
* 根据 formID 获取重置方法.
|
164
|
+
* @param state
|
165
|
+
*/
|
166
|
+
getResetFn(state: {
|
167
|
+
isReadyMap: Map<string, boolean>;
|
168
|
+
modelMap: Map<string, Record<string, any>>;
|
169
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
170
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
171
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
172
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
173
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
174
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
175
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
176
|
+
/**
|
177
|
+
* 是否就绪: 查询字段初始完成, 组件渲染完成.
|
178
|
+
*/
|
179
|
+
isReadyMap: Map<string, boolean>;
|
180
|
+
/** 表单数据对象. */
|
181
|
+
modelMap: Map<string, Record<string, any>>;
|
182
|
+
/** 事件监听函数列表: ready. */
|
183
|
+
onReadyListenersMap: Map<string, IKgSearchReadyCb[]>;
|
184
|
+
/** 事件监听函数列表: reset. */
|
185
|
+
onResetListenersMap: Map<string, IKgSearchResetCb[]>;
|
186
|
+
/** 事件监听函数列表: search. */
|
187
|
+
onSearchListenersMap: Map<string, IKgSearchSearchCb[]>;
|
188
|
+
/** 高级查询的操作符表单数据对象. */
|
189
|
+
operatorModelMap: Map<string, Record<string, string>>;
|
190
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
191
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
192
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
193
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
194
|
+
}>): (formID: string | null | undefined) => IKgSearchResetFn | null;
|
195
|
+
}, {
|
196
|
+
/**
|
197
|
+
* 清理数据.
|
198
|
+
* @param formID 页面标识.
|
199
|
+
*/
|
47
200
|
dispose(formID: string | null | undefined): void;
|
201
|
+
/**
|
202
|
+
* 注册事件监听.
|
203
|
+
* @param formID 界面标识.
|
204
|
+
* @param event 事件名称.
|
205
|
+
* @param cb 回调函数.
|
206
|
+
*/
|
48
207
|
addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchCb): void;
|
208
|
+
/**
|
209
|
+
* 退订事件监听.
|
210
|
+
* @param formID 界面标识.
|
211
|
+
* @param event 事件名称.
|
212
|
+
* @param cb 回调函数.
|
213
|
+
*/
|
49
214
|
removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
|
50
215
|
/**
|
51
216
|
* 触发事件.
|
@@ -54,28 +219,38 @@ export declare type IKgSearchStoreDefinition = StoreDefinition<'KgSearch', IKgSe
|
|
54
219
|
* @param param 事件参数.
|
55
220
|
*/
|
56
221
|
emit(formID: string, event: IKgSearchEvent, param: IKgSearchCbParam): Promise<boolean>;
|
222
|
+
setIsReady(formID: string | null | undefined, ready?: boolean): void;
|
57
223
|
/**
|
58
|
-
*
|
224
|
+
* 设置表单数据.
|
59
225
|
* @param formID 界面标识.
|
60
|
-
* @param
|
226
|
+
* @param model 表单数据.
|
61
227
|
*/
|
62
|
-
|
63
|
-
|
64
|
-
|
228
|
+
setModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
229
|
+
setOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
|
230
|
+
/**
|
231
|
+
* 修改查询字段的表单数据的部分属性.
|
232
|
+
*
|
233
|
+
* @param formID 界面标识.
|
234
|
+
* @param properties 要修改的部分属性.
|
235
|
+
*/
|
236
|
+
patchModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
|
65
237
|
/**
|
66
|
-
*
|
238
|
+
* 修改查询字段的高级查询操作符的部分属性.
|
239
|
+
*
|
67
240
|
* @param formID 界面标识.
|
68
|
-
* @param
|
241
|
+
* @param properties 要修改的部分属性.
|
69
242
|
*/
|
70
|
-
|
243
|
+
patchOperatorModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
|
71
244
|
/**
|
72
|
-
*
|
245
|
+
* 设置查询方法.
|
73
246
|
* @param formID 界面标识.
|
74
|
-
* @param
|
247
|
+
* @param fn 查询方法.
|
75
248
|
*/
|
76
|
-
patchOperatorModel(formID: string, model: Record<string, string>): Promise<void>;
|
77
249
|
setSearchFn(formID: string | null | undefined, fn?: IKgSearchSearchFn | null): void;
|
250
|
+
/**
|
251
|
+
* 设置重置方法.
|
252
|
+
* @param formID 界面标识.
|
253
|
+
* @param fn 重置方法.
|
254
|
+
*/
|
78
255
|
setResetFn(formID: string | null | undefined, fn?: IKgSearchResetFn | null): void;
|
79
256
|
}>;
|
80
|
-
export declare type IKgSearchStore = ReturnType<IKgSearchStoreDefinition>;
|
81
|
-
export declare const useKgSearchStore: () => IKgSearchStoreDefinition;
|
@@ -4,10 +4,10 @@ export declare const getProps: () => {
|
|
4
4
|
/** 自定义的样式类名. */
|
5
5
|
kgClass: PropType<string>;
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* 是否显示头部右侧的表单配置按钮.
|
8
8
|
* @default true
|
9
9
|
*/
|
10
|
-
|
10
|
+
kgIsShowVarSubmitConfigButton: {
|
11
11
|
type: PropType<boolean>;
|
12
12
|
default: boolean;
|
13
13
|
};
|
@@ -17,10 +17,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
17
17
|
/** 自定义的样式类名. */
|
18
18
|
kgClass: PropType<string>;
|
19
19
|
/**
|
20
|
-
*
|
20
|
+
* 是否显示头部右侧的表单配置按钮.
|
21
21
|
* @default true
|
22
22
|
*/
|
23
|
-
|
23
|
+
kgIsShowVarSubmitConfigButton: {
|
24
24
|
type: PropType<boolean>;
|
25
25
|
default: boolean;
|
26
26
|
};
|
@@ -28,14 +28,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
/** 自定义的样式类名. */
|
29
29
|
kgClass: PropType<string>;
|
30
30
|
/**
|
31
|
-
*
|
31
|
+
* 是否显示头部右侧的表单配置按钮.
|
32
32
|
* @default true
|
33
33
|
*/
|
34
|
-
|
34
|
+
kgIsShowVarSubmitConfigButton: {
|
35
35
|
type: PropType<boolean>;
|
36
36
|
default: boolean;
|
37
37
|
};
|
38
38
|
}>>, {
|
39
|
-
|
39
|
+
kgIsShowVarSubmitConfigButton: boolean;
|
40
40
|
}>;
|
41
41
|
export default _default;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { Ref, UnwrapRef } from 'vue';
|
2
|
-
import { IKgSubmitHeaderProps } from './components/KgSubmit.Header';
|
3
2
|
import { IKgSubmitProps } from './KgSubmit';
|
4
3
|
export declare function _useFormModel(): {
|
5
4
|
model: Ref<Record<string, any>>;
|
@@ -9,12 +8,15 @@ export declare function _useResizeObserver(kgFormRef: Ref<UnwrapRef<HTMLDivEleme
|
|
9
8
|
export declare function _useTitle(): {
|
10
9
|
title: Ref<string>;
|
11
10
|
};
|
12
|
-
export declare function _useClass(props: IKgSubmitProps
|
11
|
+
export declare function _useClass(props: IKgSubmitProps): {
|
13
12
|
getClass: Ref<string>;
|
14
13
|
};
|
15
14
|
export declare function _useLayout(): {
|
16
15
|
getLayout: Ref<'horizontal' | 'vertical'>;
|
17
16
|
};
|
18
17
|
export declare function _useDefaultWidth(): {
|
19
|
-
|
18
|
+
/**
|
19
|
+
* 默认宽度.
|
20
|
+
*/
|
21
|
+
getDefaultWidth: import("vue").ComputedRef<number>;
|
20
22
|
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
|
+
export declare const getProps: () => any;
|
3
|
+
export declare type KgSubmitVarSubmitConfigButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
4
|
+
declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
|
5
|
+
[x: string]: any;
|
6
|
+
}>;
|
7
|
+
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType } from 'vue';
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
2
2
|
export declare const FORM_ID__VAR_SUBMIT_CONFIG = "kg-submit.VarSubmitConfig";
|
3
3
|
export declare const getProps: () => {
|
4
4
|
/** 主页面的页面标识. */
|
@@ -8,6 +8,7 @@ export declare const getProps: () => {
|
|
8
8
|
};
|
9
9
|
onKgClose: PropType<() => void>;
|
10
10
|
};
|
11
|
+
export declare type KgSubmitVarSubmitConfigModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
11
12
|
declare const _default: import("vue").DefineComponent<{
|
12
13
|
/** 主页面的页面标识. */
|
13
14
|
hostFormID: {
|
@@ -15,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
15
16
|
required: boolean;
|
16
17
|
};
|
17
18
|
onKgClose: PropType<() => void>;
|
18
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgClose"[], "kgClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<
|
19
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgClose"[], "kgClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
19
20
|
/** 主页面的页面标识. */
|
20
21
|
hostFormID: {
|
21
22
|
type: PropType<string>;
|
@@ -11,15 +11,19 @@ export declare function useKgSubmit(formID?: string | null): {
|
|
11
11
|
isLoading(): (formID?: string | null | undefined) => boolean;
|
12
12
|
getModel(): (formID: string | null | undefined) => Record<string, any> | null;
|
13
13
|
getFormRef(): (formID?: string | null | undefined) => import("vue").Ref<import("ant-design-vue").FormInstance | null>;
|
14
|
-
getRules(): (formID?: string | null | undefined) => import("vue").Ref<Record<string, import("ant-design-vue/es/form").RuleObject[]>>;
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
*
|
14
|
+
getRules(): (formID?: string | null | undefined) => import("vue").Ref<Record<string, import("ant-design-vue/es/form").RuleObject[]>>; /**
|
15
|
+
* <p>事件: 关闭提交弹窗. 下面几种场景都会触发此事件:</p>
|
16
|
+
* <ul>
|
17
|
+
* <li>点击右上角的关闭按钮,</li>
|
18
|
+
* <li>点击取消按钮,</li>
|
19
|
+
* <li>点击保存按钮之后, 调用接口成功, 关闭弹窗,</li>
|
20
|
+
* </ul>
|
19
21
|
* @param cb 回调函数.
|
20
22
|
* @param once 是否只会触发一次. 默认为 undefined.
|
21
23
|
* @return {} 移除事件监听函数.
|
22
24
|
*/
|
25
|
+
}, {
|
26
|
+
dispose(formID?: string | null | undefined): void;
|
23
27
|
addEventListener(formID: string, event: IKgSubmitEvent, cb: import("./index.store").IKgSubmitCb): void;
|
24
28
|
removeEventListener(formID: string, event: IKgSubmitEvent, cb?: import("./index.store").IKgSubmitCb | undefined): void;
|
25
29
|
emit(formID: string, event: IKgSubmitEvent, param: import("./index.store").IKgSubmitCbParam): Promise<boolean>;
|
@@ -94,7 +98,12 @@ export declare function useKgSubmit(formID?: string | null): {
|
|
94
98
|
*/
|
95
99
|
onError: (cb: IKgSubmitErrorCb, once?: boolean | undefined) => import("../../consts").IRemoveEventListenerHandler;
|
96
100
|
/**
|
97
|
-
* <p>事件: 关闭提交弹窗.
|
101
|
+
* <p>事件: 关闭提交弹窗. 下面几种场景都会触发此事件:</p>
|
102
|
+
* <ul>
|
103
|
+
* <li>点击右上角的关闭按钮,</li>
|
104
|
+
* <li>点击取消按钮,</li>
|
105
|
+
* <li>点击保存按钮之后, 调用接口成功, 关闭弹窗,</li>
|
106
|
+
* </ul>
|
98
107
|
* @param cb 回调函数.
|
99
108
|
* @param once 是否只会触发一次. 默认为 undefined.
|
100
109
|
* @return {} 移除事件监听函数.
|
@@ -69,12 +69,22 @@ export declare type IKgSubmitAfterValidateCbParam = {
|
|
69
69
|
export declare type IKgSubmitAfterValidateCb = ((param: IKgSubmitAfterValidateCbParam) => Promise<boolean>) & IKgEventCb;
|
70
70
|
/** 事件监听函数: beforeRequest. */
|
71
71
|
export declare type IKgSubmitBeforeRequestCbParam = {
|
72
|
+
/**
|
73
|
+
* <p>请求参数.</p>
|
74
|
+
* <p>是一个对象或者列表.</p>
|
75
|
+
*/
|
72
76
|
data: Ref<Record<string, any> | Array<Record<string, any>>>;
|
73
77
|
isCopying: boolean | null;
|
74
78
|
isCreating: boolean | null;
|
75
79
|
isDeleting: boolean | null;
|
76
80
|
isUpdating: boolean | null;
|
81
|
+
/**
|
82
|
+
* 表单数据对象.
|
83
|
+
*/
|
77
84
|
model: Ref<Record<string, any>>;
|
85
|
+
/**
|
86
|
+
* 请求参数.
|
87
|
+
*/
|
78
88
|
params: Ref<Record<string, any>>;
|
79
89
|
row: IKgTableRow | null;
|
80
90
|
rows: Array<IKgTableRow> | null;
|
@@ -1,10 +1,56 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export declare const
|
5
|
-
/**
|
1
|
+
/**
|
2
|
+
* 表单的左边距.
|
3
|
+
*/
|
4
|
+
export declare const FORM_PADDING_LEFT = 6;
|
5
|
+
/**
|
6
|
+
* 表单的右边距.
|
7
|
+
*/
|
8
|
+
export declare const FOMR_PADDING_RIGHT = 6;
|
9
|
+
/**
|
10
|
+
* 表单控件宽度.
|
11
|
+
*/
|
12
|
+
export declare const FOMR_ITEM_WIDTH = 400;
|
13
|
+
/**
|
14
|
+
* 表单控件间隔距离.
|
15
|
+
*/
|
16
|
+
export declare const FOMR_ITEM_MARGIN = 12;
|
17
|
+
/**
|
18
|
+
* 除去表单之外, 其他部分所有的宽度之和.
|
19
|
+
*/
|
20
|
+
export declare const KG_SUBMIT_FRAME_WIDTH: number;
|
21
|
+
/**
|
22
|
+
* 获取弹窗宽度.
|
23
|
+
*
|
24
|
+
* @param param.span 列数.
|
25
|
+
*/
|
26
|
+
export declare function getKgModalWidth(param: {
|
27
|
+
span: number;
|
28
|
+
}): number;
|
29
|
+
/**
|
30
|
+
* 获取栅格布局行的宽度.
|
31
|
+
*
|
32
|
+
* @param param.span 列数.
|
33
|
+
*/
|
34
|
+
export declare function getRowWidth(param: {
|
35
|
+
span: number;
|
36
|
+
}): number;
|
37
|
+
/**
|
38
|
+
* 默认最小宽度, 刚好放下一个表单控件.
|
39
|
+
*/
|
40
|
+
export declare const SUBMIT_DEFAULT_MIN_WIDTH: number;
|
41
|
+
/**
|
42
|
+
* 默认宽度.
|
43
|
+
*/
|
44
|
+
export declare const SUBMIT_DEFAULT_WIDTH: number;
|
45
|
+
/**
|
46
|
+
* 默认布局方式.
|
47
|
+
*/
|
6
48
|
export declare const SUBMIT_DEFAULT_LAYOUT = "vertical";
|
7
|
-
/**
|
49
|
+
/**
|
50
|
+
* 单位为 SPAN 时, 文本的默认宽度.
|
51
|
+
*/
|
8
52
|
export declare const SUBMIT_DEFAULT_LABEL_COL_FOR_SPAN = 4;
|
9
|
-
/**
|
53
|
+
/**
|
54
|
+
* 单位为 PX 时, 文本的默认宽度.
|
55
|
+
*/
|
10
56
|
export declare const SUBMIT_DEFAULT_LABEL_COL_FOR_PX = 100;
|
@@ -12,11 +12,13 @@ export declare type IKgTableRow = {
|
|
12
12
|
export interface IKgTableRequestParams {
|
13
13
|
/**
|
14
14
|
* 是否查询首页, 否则查询当页.
|
15
|
+
*
|
15
16
|
* @default false
|
16
17
|
*/
|
17
18
|
isSearchFirstPage?: boolean;
|
18
19
|
/**
|
19
|
-
* 是否保留行的勾选状态.
|
20
|
+
* 重新查询之后, 是否保留行的勾选状态.
|
21
|
+
*
|
20
22
|
* @default false
|
21
23
|
*/
|
22
24
|
isPreserveSelectedRows?: boolean;
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { Pinia } from 'pinia';
|
2
|
-
import { ComputedRef, Ref } from 'vue';
|
3
2
|
/**
|
4
3
|
* @param pinia 在某些地方调用时(比如在路由守卫中), pinia 尚未设置, 此时需要手动传入 pinia 实例.
|
5
4
|
*/
|
6
5
|
export declare function useKg(pinia?: Pinia): {
|
7
6
|
store: import("pinia").Store<"Kg", import("./index.store").IKgState, {
|
8
|
-
getLocale: ComputedRef<import("..").IKgLocale> | null;
|
7
|
+
getLocale: import("vue").ComputedRef<import("..").IKgLocale> | null;
|
9
8
|
getRouter: import("vue-router").Router | null;
|
10
9
|
getUseUserStore(): import("pinia").StoreDefinition<string, import("./index.store").UserState, {
|
11
10
|
getToken(): string;
|
@@ -20,7 +19,7 @@ export declare function useKg(pinia?: Pinia): {
|
|
20
19
|
}, import("pinia")._ActionsTree> | null;
|
21
20
|
getOption: import("./index.store").IKgOption;
|
22
21
|
}, {
|
23
|
-
setLocale(locale: ComputedRef<import("..").IKgLocale> | null): void;
|
22
|
+
setLocale(locale: import("vue").ComputedRef<import("..").IKgLocale> | null): void;
|
24
23
|
setRouter(router: import("vue-router").Router): void;
|
25
24
|
setUseUserStore(useUserStore: import("pinia").StoreDefinition<any, any, any, any>): void;
|
26
25
|
setUsePermissionStore(usePermissionStore: import("pinia").StoreDefinition<any, any, any, any>): void;
|
@@ -31,10 +30,10 @@ export declare function useKg(pinia?: Pinia): {
|
|
31
30
|
p: import("./index.store").P;
|
32
31
|
}>;
|
33
32
|
/** 当前语言. */
|
34
|
-
locale: ComputedRef<"zh_CN" | "en" | "ru" | "ja" | "ko">;
|
33
|
+
locale: import("vue").ComputedRef<"zh_CN" | "en" | "ru" | "ja" | "ko">;
|
35
34
|
router: any;
|
36
35
|
/** 配置参数. */
|
37
|
-
option: ComputedRef<{
|
36
|
+
option: import("vue").ComputedRef<{
|
38
37
|
appIndex?: {
|
39
38
|
"data-manager"?: string | undefined;
|
40
39
|
"business-manager"?: string | undefined;
|
@@ -51,8 +50,8 @@ export declare function useKg(pinia?: Pinia): {
|
|
51
50
|
drag?: {
|
52
51
|
on?: boolean | undefined;
|
53
52
|
} | undefined;
|
54
|
-
|
55
|
-
|
53
|
+
dragToResize?: {
|
54
|
+
isOn?: boolean | undefined;
|
56
55
|
} | undefined;
|
57
56
|
} | undefined;
|
58
57
|
KgSearch?: {
|
@@ -83,25 +82,3 @@ export declare function useKg(pinia?: Pinia): {
|
|
83
82
|
/** 检查权限. */
|
84
83
|
p: import("./index.store").P;
|
85
84
|
};
|
86
|
-
export interface IUseKgDragModal {
|
87
|
-
draggable: Ref<boolean> | ComputedRef<boolean>;
|
88
|
-
visible: Ref<boolean> | ComputedRef<boolean>;
|
89
|
-
destroyOnClose: Ref<boolean | undefined> | undefined | ComputedRef<boolean>;
|
90
|
-
/**
|
91
|
-
* @default '.ant-modal-wrap'
|
92
|
-
*/
|
93
|
-
containerElementSelector: string;
|
94
|
-
/**
|
95
|
-
* @default '.ant-modal-header'
|
96
|
-
*/
|
97
|
-
handleElementSelector: string;
|
98
|
-
/**
|
99
|
-
* @default '.ant-modal'
|
100
|
-
*/
|
101
|
-
contentElementSelector: string;
|
102
|
-
}
|
103
|
-
/**
|
104
|
-
* 拖拽移动.
|
105
|
-
* @param param 参数.
|
106
|
-
*/
|
107
|
-
export declare function useKgDragModal(param: IUseKgDragModal): void;
|
@@ -27,21 +27,23 @@ export declare type IKgOption = {
|
|
27
27
|
[KG_APP.SYS]?: string;
|
28
28
|
};
|
29
29
|
KgModal?: {
|
30
|
-
/**
|
30
|
+
/** 拖拽改变位置. */
|
31
31
|
drag?: {
|
32
32
|
/**
|
33
33
|
* 是否启用功能.
|
34
|
+
*
|
34
35
|
* @default false
|
35
36
|
*/
|
36
37
|
on?: boolean;
|
37
38
|
};
|
38
|
-
/**
|
39
|
-
|
39
|
+
/** 拖拽改变大小. */
|
40
|
+
dragToResize?: {
|
40
41
|
/**
|
41
42
|
* 是否启用功能.
|
43
|
+
*
|
42
44
|
* @default false
|
43
45
|
*/
|
44
|
-
|
46
|
+
isOn?: boolean;
|
45
47
|
};
|
46
48
|
};
|
47
49
|
KgSearch?: {
|