star-horse-lowcode 3.1.6 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/api/star_horse_apis.d.ts +1 -1
- package/dist/api/star_horse_utils.d.ts +3 -2
- package/dist/api/system.d.ts +3 -3
- package/dist/assets/index.css +1 -1
- package/dist/components/comp/StarHorseSearchForm.vue.d.ts +9 -62
- package/dist/components/formcomp/utils/FieldList.vue.d.ts +12 -3
- package/dist/components/formcomp/utils/ItemRelationEventUtils.d.ts +13 -3
- package/dist/components/types/ApiUrls.d.ts +20 -0
- package/dist/components/types/ItemPreps.d.ts +155 -2
- package/dist/components/types/PageFieldInfo.d.ts +8 -0
- package/dist/index.es.js +6 -6
- package/dist/plugins/AblesPlugin.d.ts +15 -1
- package/dist/store/FormDataCache.d.ts +252 -0
- package/dist/store/SelfOperation.d.ts +30 -0
- package/dist/store/StoreManager.d.ts +564 -0
- package/dist/types/api/star_horse_apis.d.ts +1 -1
- package/dist/types/api/star_horse_utils.d.ts +3 -2
- package/dist/types/api/system.d.ts +3 -3
- package/dist/types/components/comp/StarHorseSearchForm.vue.d.ts +9 -62
- package/dist/types/components/formcomp/utils/FieldList.vue.d.ts +12 -3
- package/dist/types/components/formcomp/utils/ItemRelationEventUtils.d.ts +13 -3
- package/dist/types/components/types/ApiUrls.d.ts +20 -0
- package/dist/types/components/types/ItemPreps.d.ts +155 -2
- package/dist/types/components/types/PageFieldInfo.d.ts +8 -0
- package/dist/types/plugins/AblesPlugin.d.ts +15 -1
- package/dist/types/store/FormDataCache.d.ts +252 -0
- package/dist/types/store/SelfOperation.d.ts +30 -0
- package/dist/types/store/StoreManager.d.ts +564 -0
- package/package.json +12 -11
|
@@ -50,7 +50,7 @@ export declare function httpRequest(url: string, method: string, data: any): Pro
|
|
|
50
50
|
* @param url
|
|
51
51
|
* @param data
|
|
52
52
|
*/
|
|
53
|
-
export declare function uploadRequest(url: string, data:
|
|
53
|
+
export declare function uploadRequest(url: string, data: any): Promise<AxiosResponse<any, any, {}>>;
|
|
54
54
|
/**
|
|
55
55
|
* 加载Post 数据
|
|
56
56
|
* @param url 接口地址
|
|
@@ -144,15 +144,16 @@ export declare function batchFieldDefaultValues(datas: BatchFieldInfo, dataForm:
|
|
|
144
144
|
* 动态组件数据
|
|
145
145
|
* @param field 组件参数信息
|
|
146
146
|
* @param analysisUrl 是否解析Url
|
|
147
|
+
* @param proxyUrl 代理接口
|
|
147
148
|
*/
|
|
148
|
-
export declare function compDynamicData(field: any, analysisUrl?: false): Promise<any>;
|
|
149
|
+
export declare function compDynamicData(field: any, analysisUrl?: false, proxyUrl?: string): Promise<any>;
|
|
149
150
|
/**
|
|
150
151
|
*
|
|
151
152
|
* @param preps 组件参数信息
|
|
152
153
|
* @param queryInfo 查询条件
|
|
153
154
|
* @param proxyUrl 代理接口,为空时,默认使用/system-config/redirect/execute
|
|
154
155
|
*/
|
|
155
|
-
export declare function dynamicUrlOperation(preps: any, queryInfo?: SearchParams[], proxyUrl?: string): Promise<
|
|
156
|
+
export declare function dynamicUrlOperation(preps: any, queryInfo?: SearchParams[], proxyUrl?: string): Promise<any>;
|
|
156
157
|
/**
|
|
157
158
|
* 创建过滤器
|
|
158
159
|
* @param queryString 查询参数
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DyCompField } from "../components/types/DyCompField";
|
|
2
|
-
import { RelationDetail } from "../components/types/ItemPreps";
|
|
3
2
|
import { SearchParams } from "../components/types/Params";
|
|
4
3
|
import { Ref } from "vue";
|
|
4
|
+
import { ItemRelation } from "../components/types";
|
|
5
5
|
/**
|
|
6
6
|
* UUID
|
|
7
7
|
*/
|
|
@@ -74,5 +74,5 @@ export declare const useZIndex: (zIndexOverrides?: Ref<number>) => {
|
|
|
74
74
|
nextZIndex: () => number;
|
|
75
75
|
};
|
|
76
76
|
export declare const baseEvent: (eventName: string, recall?: Function) => (e: Event) => void;
|
|
77
|
-
export declare const baseRelationEvent: (props: any,
|
|
78
|
-
export declare function getDynamicEvents(props: any, recall: Function): Record<string, any>;
|
|
77
|
+
export declare const baseRelationEvent: (props: any, relation: ItemRelation, formData: any, actionName: string) => (e: Event) => void;
|
|
78
|
+
export declare function getDynamicEvents(props: any, recall: Function, formData: any): Record<string, any>;
|
|
@@ -1,77 +1,24 @@
|
|
|
1
1
|
import { SearchParams } from "../../components/types/Params";
|
|
2
2
|
import { SearchFields } from "../../components/types/SearchProps";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type: {
|
|
11
|
-
(arrayLength: number): SearchParams[];
|
|
12
|
-
(...items: SearchParams[]): SearchParams[];
|
|
13
|
-
new (arrayLength: number): SearchParams[];
|
|
14
|
-
new (...items: SearchParams[]): SearchParams[];
|
|
15
|
-
isArray(arg: any): arg is any[];
|
|
16
|
-
readonly prototype: any[];
|
|
17
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
18
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
19
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
20
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
21
|
-
of<T>(...items: T[]): T[];
|
|
22
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
dialogInput: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
mutComp: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
default: boolean;
|
|
32
|
-
};
|
|
33
|
-
}>, {
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
formData: SearchFields;
|
|
5
|
+
defaultCondition: SearchParams[];
|
|
6
|
+
dialogInput: boolean;
|
|
7
|
+
mutComp: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
34
10
|
searchForm: import("vue").Ref<any, any>;
|
|
35
11
|
setData: (data: any) => void;
|
|
36
12
|
createSearchParams: (formData: any) => any[];
|
|
37
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
14
|
searchData: (...args: any[]) => void;
|
|
39
15
|
initComplete: (...args: any[]) => void;
|
|
40
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
41
|
-
formData: {
|
|
42
|
-
type: PropType<SearchFields>;
|
|
43
|
-
required: true;
|
|
44
|
-
};
|
|
45
|
-
defaultCondition: {
|
|
46
|
-
type: {
|
|
47
|
-
(arrayLength: number): SearchParams[];
|
|
48
|
-
(...items: SearchParams[]): SearchParams[];
|
|
49
|
-
new (arrayLength: number): SearchParams[];
|
|
50
|
-
new (...items: SearchParams[]): SearchParams[];
|
|
51
|
-
isArray(arg: any): arg is any[];
|
|
52
|
-
readonly prototype: any[];
|
|
53
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
54
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
55
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
56
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
57
|
-
of<T>(...items: T[]): T[];
|
|
58
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
dialogInput: {
|
|
62
|
-
type: BooleanConstructor;
|
|
63
|
-
default: boolean;
|
|
64
|
-
};
|
|
65
|
-
mutComp: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
|
-
}>> & Readonly<{
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
70
17
|
onSearchData?: (...args: any[]) => any;
|
|
71
18
|
onInitComplete?: (...args: any[]) => any;
|
|
72
19
|
}>, {
|
|
73
20
|
dialogInput: boolean;
|
|
74
21
|
mutComp: boolean;
|
|
75
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
76
23
|
declare const _default: typeof __VLS_export;
|
|
77
24
|
export default _default;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
showContainer: boolean;
|
|
3
|
+
showFormItems: boolean;
|
|
4
|
+
showThirdItems: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
7
|
selectData: (...args: any[]) => void;
|
|
3
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
4
9
|
onSelectData?: (...args: any[]) => any;
|
|
5
|
-
}>, {
|
|
10
|
+
}>, {
|
|
11
|
+
showContainer: boolean;
|
|
12
|
+
showFormItems: boolean;
|
|
13
|
+
showThirdItems: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
15
|
declare const _default: typeof __VLS_export;
|
|
7
16
|
export default _default;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { RelationDetail } from "../../../components/types";
|
|
1
|
+
import { ItemRelation, RelationDetail } from "../../../components/types";
|
|
2
|
+
import { Ref } from "vue";
|
|
2
3
|
import { executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers } from "../../../components/formcomp/utils/FormulaEngine";
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 联动事件分发函数
|
|
6
|
+
* @param props
|
|
7
|
+
* @param item
|
|
8
|
+
* @param e
|
|
9
|
+
* @param formData
|
|
10
|
+
* @param actionName
|
|
11
|
+
*/
|
|
12
|
+
declare const relationEventDispatcher: (props: any, item: ItemRelation, e: any, formData: Ref<Record<string, any>>, actionName: string) => void;
|
|
13
|
+
declare const relationEvent: (props: any, relationDetails: RelationDetail[], e: any, formData: Ref<Record<string, any>>, actionName: string) => void;
|
|
4
14
|
/** 所有触发的事件 */
|
|
5
15
|
declare const allAction: (context: any, emits: any, formData: any, actionName: string, _isInit?: boolean) => void;
|
|
6
16
|
/** Button 组件的点击事件 */
|
|
@@ -13,4 +23,4 @@ declare const useFormField: (context: any, field: any) => {
|
|
|
13
23
|
declare const initCompCallEvent: (props: any, emits: any, formData: any) => void;
|
|
14
24
|
declare const prepsFilter: (preps: any) => any;
|
|
15
25
|
declare const convertData: (data: any) => any;
|
|
16
|
-
export { allAction, buttonAction, checkIsDisabled, initCompCallEvent, prepsFilter, relationEvent, useFormField, convertData, executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers, };
|
|
26
|
+
export { allAction, buttonAction, checkIsDisabled, initCompCallEvent, prepsFilter, relationEvent, relationEventDispatcher, useFormField, convertData, executeFormulaWithFill, initFormFormulaWatchers, setupFormulaWatchers, };
|
|
@@ -71,6 +71,26 @@ export type ApiUrls = {
|
|
|
71
71
|
* 修改字段接口
|
|
72
72
|
*/
|
|
73
73
|
modifyColumnsUrl?: string;
|
|
74
|
+
/**
|
|
75
|
+
* 用户自定义接口1,用户自定义接口使用时保持原样,不会像系统接口那样拼接上下文
|
|
76
|
+
*/
|
|
77
|
+
customerUrl1?: string;
|
|
78
|
+
/**
|
|
79
|
+
* 用户自定义接口2
|
|
80
|
+
*/
|
|
81
|
+
customerUrl2?: string;
|
|
82
|
+
/**
|
|
83
|
+
* 用户自定义接口3
|
|
84
|
+
*/
|
|
85
|
+
customerUrl3?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 用户自定义接口4
|
|
88
|
+
*/
|
|
89
|
+
customerUrl4?: string;
|
|
90
|
+
/**
|
|
91
|
+
* 用户自定义接口5
|
|
92
|
+
*/
|
|
93
|
+
customerUrl5?: string;
|
|
74
94
|
/**
|
|
75
95
|
* 接口路径前缀
|
|
76
96
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiUrls } from "./ApiUrls";
|
|
2
|
-
import { FieldInfo, PageFieldInfo } from "./PageFieldInfo";
|
|
2
|
+
import { FieldInfo, FieldMapping, PageFieldInfo } from "./PageFieldInfo";
|
|
3
3
|
import { RedirectParams } from "./Params";
|
|
4
4
|
import { SelectOption } from "./SearchProps";
|
|
5
5
|
export interface ItemPreps {
|
|
@@ -143,6 +143,155 @@ export interface RelationDetail {
|
|
|
143
143
|
*/
|
|
144
144
|
isWorking: boolean;
|
|
145
145
|
}
|
|
146
|
+
export interface ApiParam {
|
|
147
|
+
/**
|
|
148
|
+
* 值类型,如果是动态值,需要提取value 中的${xx},替换为具体的xx
|
|
149
|
+
*/
|
|
150
|
+
valueType: "dynamic" | "static";
|
|
151
|
+
/**
|
|
152
|
+
* 名称
|
|
153
|
+
*/
|
|
154
|
+
paramName?: string;
|
|
155
|
+
/**
|
|
156
|
+
* 值
|
|
157
|
+
*/
|
|
158
|
+
paramValue?: string;
|
|
159
|
+
/**
|
|
160
|
+
* 数据匹配方式
|
|
161
|
+
*/
|
|
162
|
+
matchType?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface ApiInfo {
|
|
165
|
+
/**
|
|
166
|
+
* 请求头
|
|
167
|
+
*/
|
|
168
|
+
headers?: ApiParam[];
|
|
169
|
+
/**
|
|
170
|
+
* 请求参数
|
|
171
|
+
*/
|
|
172
|
+
requestParams?: ApiParam[];
|
|
173
|
+
/**
|
|
174
|
+
* 数据返回模板
|
|
175
|
+
*/
|
|
176
|
+
responseTemplate?: string;
|
|
177
|
+
/**
|
|
178
|
+
* 消息路径,如:返回数据位 {code:0,msg:'xxx',data:业务数据},这里的路径是msg
|
|
179
|
+
* 返回数据位 {code:0,data:{
|
|
180
|
+
* msg:'xxx',
|
|
181
|
+
* instanceData:{}
|
|
182
|
+
* }},这里的路径是data.msg
|
|
183
|
+
*/
|
|
184
|
+
messagePath?: string;
|
|
185
|
+
/**
|
|
186
|
+
* 编码路径,参考messagePath
|
|
187
|
+
*/
|
|
188
|
+
codePath?: string;
|
|
189
|
+
/**
|
|
190
|
+
* 业务数据路径,参考messagePath
|
|
191
|
+
*/
|
|
192
|
+
dataPath?: string;
|
|
193
|
+
/**
|
|
194
|
+
* 成功码
|
|
195
|
+
*/
|
|
196
|
+
successCode?: string;
|
|
197
|
+
/**
|
|
198
|
+
* 请求方式
|
|
199
|
+
*/
|
|
200
|
+
httpMethod?: string;
|
|
201
|
+
/**
|
|
202
|
+
* 请求数据类型
|
|
203
|
+
*/
|
|
204
|
+
requestDataType?: "form" | "json" | "binary";
|
|
205
|
+
/**
|
|
206
|
+
* 接口地址
|
|
207
|
+
*/
|
|
208
|
+
url?: string;
|
|
209
|
+
/**
|
|
210
|
+
* 请求协议
|
|
211
|
+
*/
|
|
212
|
+
protocol?: string;
|
|
213
|
+
/**
|
|
214
|
+
* 超时
|
|
215
|
+
*/
|
|
216
|
+
timeout?: number;
|
|
217
|
+
/**
|
|
218
|
+
* 接口类型
|
|
219
|
+
*/
|
|
220
|
+
apiType: "systemApi" | "thirdApi";
|
|
221
|
+
/*******************以下参数是systemApi专属**********************/
|
|
222
|
+
/**
|
|
223
|
+
* 是否代理
|
|
224
|
+
*/
|
|
225
|
+
redirect?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* 接口调用方法
|
|
228
|
+
*/
|
|
229
|
+
method?: string;
|
|
230
|
+
/**
|
|
231
|
+
* 接口名称
|
|
232
|
+
*/
|
|
233
|
+
interfaceName?: string;
|
|
234
|
+
/**
|
|
235
|
+
* 服务名
|
|
236
|
+
*/
|
|
237
|
+
serviceName?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface OptionField {
|
|
240
|
+
/**
|
|
241
|
+
* 显示属性
|
|
242
|
+
*/
|
|
243
|
+
displayField: string;
|
|
244
|
+
/**
|
|
245
|
+
* 值属性
|
|
246
|
+
*/
|
|
247
|
+
valueField: string;
|
|
248
|
+
/**
|
|
249
|
+
* 子节点属性
|
|
250
|
+
*/
|
|
251
|
+
childrenField?: string;
|
|
252
|
+
/**
|
|
253
|
+
* 是否叶子节点属性
|
|
254
|
+
*/
|
|
255
|
+
leafField?: string;
|
|
256
|
+
/**
|
|
257
|
+
* 禁用属性
|
|
258
|
+
*/
|
|
259
|
+
disabledField?: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* 第三方接口
|
|
263
|
+
*/
|
|
264
|
+
export interface ApiLinkageDetail {
|
|
265
|
+
/**
|
|
266
|
+
* 业务接口
|
|
267
|
+
*/
|
|
268
|
+
apiInfo: ApiInfo;
|
|
269
|
+
/**
|
|
270
|
+
* 认证信息
|
|
271
|
+
*/
|
|
272
|
+
authInfo?: ApiInfo;
|
|
273
|
+
/**
|
|
274
|
+
* 字段映射,接口字段与表单字段之间的转换关系
|
|
275
|
+
*/
|
|
276
|
+
fieldMappings?: FieldMapping[];
|
|
277
|
+
/**
|
|
278
|
+
* 数据源中数据返回后的显示属性配置
|
|
279
|
+
*/
|
|
280
|
+
optionField?: OptionField;
|
|
281
|
+
/**
|
|
282
|
+
* 代理接口
|
|
283
|
+
*/
|
|
284
|
+
proxyUrl?: string;
|
|
285
|
+
/**
|
|
286
|
+
* 赋值方式
|
|
287
|
+
*/
|
|
288
|
+
assignValueType?: "form" | "datasource";
|
|
289
|
+
/** 接口来源模式 */
|
|
290
|
+
apiMode: "system" | "custom";
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* 联动对象
|
|
294
|
+
*/
|
|
146
295
|
export interface ItemRelation {
|
|
147
296
|
/**
|
|
148
297
|
* 关联事件名称
|
|
@@ -151,5 +300,9 @@ export interface ItemRelation {
|
|
|
151
300
|
/**
|
|
152
301
|
* 关联关系详情
|
|
153
302
|
*/
|
|
154
|
-
relationDetails
|
|
303
|
+
relationDetails?: RelationDetail[];
|
|
304
|
+
/**
|
|
305
|
+
* 动态接口
|
|
306
|
+
*/
|
|
307
|
+
apiLinkage?: ApiLinkageDetail;
|
|
155
308
|
}
|
|
@@ -45,4 +45,18 @@ export declare function dynamicFormContextMenuData(item: any, parentItem: any, f
|
|
|
45
45
|
* @param node
|
|
46
46
|
* @param recallFunction
|
|
47
47
|
*/
|
|
48
|
-
export declare function dynamicPageContextMenuData(node: DynamicNode, recallFunction: Function):
|
|
48
|
+
export declare function dynamicPageContextMenuData(node: DynamicNode, recallFunction: Function): ({
|
|
49
|
+
type: string;
|
|
50
|
+
text: any;
|
|
51
|
+
icon: string;
|
|
52
|
+
display: boolean;
|
|
53
|
+
handler: () => void;
|
|
54
|
+
direction?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
type: string;
|
|
57
|
+
direction: string;
|
|
58
|
+
display: boolean;
|
|
59
|
+
text?: undefined;
|
|
60
|
+
icon?: undefined;
|
|
61
|
+
handler?: undefined;
|
|
62
|
+
})[];
|