ll-plus 2.3.6 → 2.3.7
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/es/components/api-component/index.d.ts +203 -87
- package/es/components/api-component/src/api-component.vue.d.ts +203 -87
- package/es/components/api-component/src/api-component.vue2.mjs +34 -28
- package/es/components/api-component/src/api-component.vue2.mjs.map +1 -1
- package/es/components/api-component/src/components/api-url.vue.d.ts +115 -45
- package/es/components/api-component/src/components/api-url.vue2.mjs.map +1 -1
- package/es/components/api-component/src/components/params-table-row.vue2.mjs +3 -3
- package/es/components/api-component/src/components/params-table-row.vue2.mjs.map +1 -1
- package/es/components/api-component/src/config/api-component.d.ts +32 -13
- package/es/components/api-component/src/config/api-component.mjs +18 -27
- package/es/components/api-component/src/config/api-component.mjs.map +1 -1
- package/es/components/api-component/src/config/api-url.d.ts +17 -15
- package/es/components/api-component/src/config/api-url.mjs +17 -1
- package/es/components/api-component/src/config/api-url.mjs.map +1 -1
- package/es/components/table/src/components/main-table.vue2.mjs +1 -7
- package/es/components/table/src/components/main-table.vue2.mjs.map +1 -1
- package/es/components/tree-search/index.d.ts +15 -4
- package/es/components/tree-search/src/components/header-search.vue.d.ts +2 -3
- package/es/components/tree-search/src/components/header-search.vue2.mjs +4 -6
- package/es/components/tree-search/src/components/header-search.vue2.mjs.map +1 -1
- package/es/components/tree-search/src/config/tree-search.d.ts +6 -0
- package/es/components/tree-search/src/config/tree-search.mjs +6 -0
- package/es/components/tree-search/src/config/tree-search.mjs.map +1 -1
- package/es/components/tree-search/src/tree-search.vue.d.ts +15 -4
- package/es/components/tree-search/src/tree-search.vue2.mjs +2 -4
- package/es/components/tree-search/src/tree-search.vue2.mjs.map +1 -1
- package/index.full.js +81 -74
- package/index.full.min.js +21 -21
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +18 -18
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +82 -75
- package/lib/components/api-component/index.d.ts +203 -87
- package/lib/components/api-component/src/api-component.vue.d.ts +203 -87
- package/lib/components/api-component/src/api-component.vue2.js +33 -27
- package/lib/components/api-component/src/api-component.vue2.js.map +1 -1
- package/lib/components/api-component/src/components/api-url.vue.d.ts +115 -45
- package/lib/components/api-component/src/components/api-url.vue2.js.map +1 -1
- package/lib/components/api-component/src/components/params-table-row.vue2.js +3 -3
- package/lib/components/api-component/src/components/params-table-row.vue2.js.map +1 -1
- package/lib/components/api-component/src/config/api-component.d.ts +32 -13
- package/lib/components/api-component/src/config/api-component.js +18 -27
- package/lib/components/api-component/src/config/api-component.js.map +1 -1
- package/lib/components/api-component/src/config/api-url.d.ts +17 -15
- package/lib/components/api-component/src/config/api-url.js +17 -1
- package/lib/components/api-component/src/config/api-url.js.map +1 -1
- package/lib/components/table/src/components/main-table.vue2.js +1 -7
- package/lib/components/table/src/components/main-table.vue2.js.map +1 -1
- package/lib/components/tree-search/index.d.ts +15 -4
- package/lib/components/tree-search/src/components/header-search.vue.d.ts +2 -3
- package/lib/components/tree-search/src/components/header-search.vue2.js +3 -5
- package/lib/components/tree-search/src/components/header-search.vue2.js.map +1 -1
- package/lib/components/tree-search/src/config/tree-search.d.ts +6 -0
- package/lib/components/tree-search/src/config/tree-search.js +6 -0
- package/lib/components/tree-search/src/config/tree-search.js.map +1 -1
- package/lib/components/tree-search/src/tree-search.vue.d.ts +15 -4
- package/lib/components/tree-search/src/tree-search.vue2.js +2 -4
- package/lib/components/tree-search/src/tree-search.vue2.js.map +1 -1
- package/package.json +1 -1
- package/types/packages/components/api-component/index.d.ts +203 -87
- package/types/packages/components/api-component/src/api-component.vue.d.ts +203 -87
- package/types/packages/components/api-component/src/components/api-url.vue.d.ts +115 -45
- package/types/packages/components/api-component/src/config/api-component.d.ts +32 -13
- package/types/packages/components/api-component/src/config/api-url.d.ts +17 -15
- package/types/packages/components/tree-search/index.d.ts +15 -4
- package/types/packages/components/tree-search/src/components/header-search.vue.d.ts +2 -3
- package/types/packages/components/tree-search/src/config/tree-search.d.ts +6 -0
- package/types/packages/components/tree-search/src/tree-search.vue.d.ts +15 -4
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { IMethod } from './config';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel) | ((new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel))[], unknown, unknown, () => {
|
|
4
|
+
url: string;
|
|
5
|
+
method: string;
|
|
6
|
+
requestParams: never[];
|
|
7
|
+
headerParams: never[];
|
|
8
|
+
bodyParams: {
|
|
9
|
+
none: null;
|
|
10
|
+
'form-data': never[];
|
|
11
|
+
json: never[];
|
|
12
|
+
xml: never[];
|
|
13
|
+
raw: string;
|
|
14
|
+
'x-www-form-urlencoded': never[];
|
|
15
|
+
};
|
|
15
16
|
}, boolean>;
|
|
17
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
16
18
|
readonly isValid: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
17
19
|
readonly rules: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => {
|
|
18
20
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
@@ -37,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
39
|
}, boolean>;
|
|
38
40
|
}, {
|
|
39
41
|
props: import("@vue/shared").LooseRequired<{
|
|
42
|
+
readonly value: import("./config").HttpModel;
|
|
40
43
|
readonly rules: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => {
|
|
41
44
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
42
45
|
}) | (() => {
|
|
@@ -47,15 +50,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
50
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
48
51
|
} | undefined))[], unknown, unknown>;
|
|
49
52
|
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
50
|
-
readonly method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod))[], unknown, unknown>;
|
|
51
|
-
readonly url: string;
|
|
52
|
-
readonly requestParams: import("./config").IParam[];
|
|
53
|
-
readonly headerParams: import("./config").IParam[];
|
|
54
|
-
readonly bodyParams: Record<string, any>;
|
|
55
53
|
readonly isValid: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
56
|
-
readonly onChange?: ((value:
|
|
54
|
+
readonly onChange?: ((value: import("./config").HttpModel) => any) | undefined;
|
|
55
|
+
readonly "onUpdate:value"?: ((value: import("./config").HttpModel) => any) | undefined;
|
|
57
56
|
} & {}>;
|
|
58
|
-
emits: (event: "change", value:
|
|
57
|
+
emits: ((event: "change", value: import("./config").HttpModel) => void) & ((event: "update:value", value: import("./config").HttpModel) => void);
|
|
59
58
|
bem: {
|
|
60
59
|
b: (blockSuffix?: string) => string;
|
|
61
60
|
e: (element?: string) => string;
|
|
@@ -80,10 +79,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
79
|
}) | (() => {
|
|
81
80
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
82
81
|
} | undefined))[], unknown, unknown>>;
|
|
83
|
-
httpModel: {
|
|
82
|
+
httpModel: import("vue").Ref<{
|
|
84
83
|
url: string;
|
|
85
|
-
method:
|
|
86
|
-
bodyParams: Record<string, any>;
|
|
84
|
+
method: IMethod;
|
|
87
85
|
requestParams: {
|
|
88
86
|
[x: string]: any;
|
|
89
87
|
required?: boolean | undefined;
|
|
@@ -108,7 +106,55 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
106
|
chineseName?: string | undefined;
|
|
109
107
|
children?: any[] | undefined;
|
|
110
108
|
}[];
|
|
111
|
-
|
|
109
|
+
bodyParams: {
|
|
110
|
+
none: null;
|
|
111
|
+
'form-data': {
|
|
112
|
+
[x: string]: any;
|
|
113
|
+
required?: boolean | undefined;
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
value?: string | undefined;
|
|
116
|
+
type?: any;
|
|
117
|
+
static?: boolean | undefined;
|
|
118
|
+
contentType?: string | undefined;
|
|
119
|
+
description?: string | undefined;
|
|
120
|
+
chineseName?: string | undefined;
|
|
121
|
+
children?: any[] | undefined;
|
|
122
|
+
}[];
|
|
123
|
+
json: {
|
|
124
|
+
[x: string]: any;
|
|
125
|
+
name?: string | undefined;
|
|
126
|
+
type?: import("./config").IType | undefined;
|
|
127
|
+
value?: any;
|
|
128
|
+
mock?: string | undefined;
|
|
129
|
+
chineseName?: string | undefined;
|
|
130
|
+
description?: string | undefined;
|
|
131
|
+
children?: any[] | undefined;
|
|
132
|
+
}[];
|
|
133
|
+
xml: {
|
|
134
|
+
[x: string]: any;
|
|
135
|
+
name?: string | undefined;
|
|
136
|
+
type?: import("./config").IType | undefined;
|
|
137
|
+
value?: any;
|
|
138
|
+
mock?: string | undefined;
|
|
139
|
+
chineseName?: string | undefined;
|
|
140
|
+
description?: string | undefined;
|
|
141
|
+
children?: any[] | undefined;
|
|
142
|
+
}[];
|
|
143
|
+
raw: string;
|
|
144
|
+
'x-www-form-urlencoded': {
|
|
145
|
+
[x: string]: any;
|
|
146
|
+
required?: boolean | undefined;
|
|
147
|
+
name?: string | undefined;
|
|
148
|
+
value?: string | undefined;
|
|
149
|
+
type?: any;
|
|
150
|
+
static?: boolean | undefined;
|
|
151
|
+
contentType?: string | undefined;
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
chineseName?: string | undefined;
|
|
154
|
+
children?: any[] | undefined;
|
|
155
|
+
}[];
|
|
156
|
+
};
|
|
157
|
+
}>;
|
|
112
158
|
computedRequestList: import("vue").ComputedRef<{
|
|
113
159
|
key: string;
|
|
114
160
|
name: string;
|
|
@@ -120,6 +166,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
166
|
url: string;
|
|
121
167
|
method: IMethod;
|
|
122
168
|
}) => void;
|
|
169
|
+
setValue: () => void;
|
|
123
170
|
readonly paramsTableColumns: ({
|
|
124
171
|
key: string;
|
|
125
172
|
dataIndex: string;
|
|
@@ -158,64 +205,133 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
158
205
|
span: number;
|
|
159
206
|
})[];
|
|
160
207
|
ApiUrl: import("vue").DefineComponent<{
|
|
161
|
-
readonly value: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
208
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel) | ((new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel))[], unknown, unknown, () => {
|
|
209
|
+
url: string;
|
|
210
|
+
method: string;
|
|
211
|
+
requestParams: never[];
|
|
212
|
+
headerParams: never[];
|
|
213
|
+
bodyParams: {
|
|
214
|
+
none: null;
|
|
215
|
+
'form-data': never[];
|
|
216
|
+
json: never[];
|
|
217
|
+
xml: never[];
|
|
218
|
+
raw: string;
|
|
219
|
+
'x-www-form-urlencoded': never[];
|
|
220
|
+
};
|
|
221
|
+
}, boolean>;
|
|
167
222
|
}, {
|
|
168
223
|
props: import("@vue/shared").LooseRequired<{
|
|
169
|
-
readonly value
|
|
170
|
-
readonly onChange?: ((params:
|
|
171
|
-
|
|
172
|
-
url: string;
|
|
173
|
-
}) => any) | undefined;
|
|
174
|
-
readonly "onUpdate:value"?: ((params: {
|
|
175
|
-
method: IMethod;
|
|
176
|
-
url: string;
|
|
177
|
-
}) => any) | undefined;
|
|
224
|
+
readonly value: import("./config").HttpModel;
|
|
225
|
+
readonly onChange?: ((params: import("./config").HttpModel) => any) | undefined;
|
|
226
|
+
readonly "onUpdate:value"?: ((params: import("./config").HttpModel) => any) | undefined;
|
|
178
227
|
} & {}>;
|
|
179
|
-
emits: ((event: "change", params:
|
|
180
|
-
|
|
228
|
+
emits: ((event: "change", params: import("./config").HttpModel) => void) & ((event: "update:value", params: import("./config").HttpModel) => void);
|
|
229
|
+
disabled: unknown;
|
|
230
|
+
innerValue: import("vue").Ref<{
|
|
181
231
|
url: string;
|
|
182
|
-
}) => void) & ((event: "update:value", params: {
|
|
183
232
|
method: IMethod;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
233
|
+
requestParams: {
|
|
234
|
+
[x: string]: any;
|
|
235
|
+
required?: boolean | undefined;
|
|
236
|
+
name?: string | undefined;
|
|
237
|
+
value?: string | undefined;
|
|
238
|
+
type?: any;
|
|
239
|
+
static?: boolean | undefined;
|
|
240
|
+
contentType?: string | undefined;
|
|
241
|
+
description?: string | undefined;
|
|
242
|
+
chineseName?: string | undefined;
|
|
243
|
+
children?: any[] | undefined;
|
|
244
|
+
}[];
|
|
245
|
+
headerParams: {
|
|
246
|
+
[x: string]: any;
|
|
247
|
+
required?: boolean | undefined;
|
|
248
|
+
name?: string | undefined;
|
|
249
|
+
value?: string | undefined;
|
|
250
|
+
type?: any;
|
|
251
|
+
static?: boolean | undefined;
|
|
252
|
+
contentType?: string | undefined;
|
|
253
|
+
description?: string | undefined;
|
|
254
|
+
chineseName?: string | undefined;
|
|
255
|
+
children?: any[] | undefined;
|
|
256
|
+
}[];
|
|
257
|
+
bodyParams: {
|
|
258
|
+
none: null;
|
|
259
|
+
'form-data': {
|
|
260
|
+
[x: string]: any;
|
|
261
|
+
required?: boolean | undefined;
|
|
262
|
+
name?: string | undefined;
|
|
263
|
+
value?: string | undefined;
|
|
264
|
+
type?: any;
|
|
265
|
+
static?: boolean | undefined;
|
|
266
|
+
contentType?: string | undefined;
|
|
267
|
+
description?: string | undefined;
|
|
268
|
+
chineseName?: string | undefined;
|
|
269
|
+
children?: any[] | undefined;
|
|
270
|
+
}[];
|
|
271
|
+
json: {
|
|
272
|
+
[x: string]: any;
|
|
273
|
+
name?: string | undefined;
|
|
274
|
+
type?: import("./config").IType | undefined;
|
|
275
|
+
value?: any;
|
|
276
|
+
mock?: string | undefined;
|
|
277
|
+
chineseName?: string | undefined;
|
|
278
|
+
description?: string | undefined;
|
|
279
|
+
children?: any[] | undefined;
|
|
280
|
+
}[];
|
|
281
|
+
xml: {
|
|
282
|
+
[x: string]: any;
|
|
283
|
+
name?: string | undefined;
|
|
284
|
+
type?: import("./config").IType | undefined;
|
|
285
|
+
value?: any;
|
|
286
|
+
mock?: string | undefined;
|
|
287
|
+
chineseName?: string | undefined;
|
|
288
|
+
description?: string | undefined;
|
|
289
|
+
children?: any[] | undefined;
|
|
290
|
+
}[];
|
|
291
|
+
raw: string;
|
|
292
|
+
'x-www-form-urlencoded': {
|
|
293
|
+
[x: string]: any;
|
|
294
|
+
required?: boolean | undefined;
|
|
295
|
+
name?: string | undefined;
|
|
296
|
+
value?: string | undefined;
|
|
297
|
+
type?: any;
|
|
298
|
+
static?: boolean | undefined;
|
|
299
|
+
contentType?: string | undefined;
|
|
300
|
+
description?: string | undefined;
|
|
301
|
+
chineseName?: string | undefined;
|
|
302
|
+
children?: any[] | undefined;
|
|
303
|
+
}[];
|
|
304
|
+
};
|
|
305
|
+
}>;
|
|
188
306
|
handleChange: () => void;
|
|
189
307
|
readonly methods: {
|
|
190
308
|
label: string;
|
|
191
309
|
value: string;
|
|
192
310
|
}[];
|
|
193
311
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
194
|
-
'update:value': (params:
|
|
195
|
-
|
|
196
|
-
url: string;
|
|
197
|
-
}) => boolean;
|
|
198
|
-
change: (params: {
|
|
199
|
-
method: IMethod;
|
|
200
|
-
url: string;
|
|
201
|
-
}) => boolean;
|
|
312
|
+
'update:value': (params: import("./config").HttpModel) => boolean;
|
|
313
|
+
change: (params: import("./config").HttpModel) => boolean;
|
|
202
314
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
203
|
-
readonly value: {
|
|
204
|
-
readonly type: import("vue").PropType<any>;
|
|
205
|
-
readonly required: false;
|
|
206
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
207
|
-
__epPropKey: true;
|
|
208
|
-
};
|
|
209
|
-
}>> & {
|
|
210
|
-
onChange?: ((params: {
|
|
211
|
-
method: IMethod;
|
|
315
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel) | ((new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel))[], unknown, unknown, () => {
|
|
212
316
|
url: string;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
317
|
+
method: string;
|
|
318
|
+
requestParams: never[];
|
|
319
|
+
headerParams: never[];
|
|
320
|
+
bodyParams: {
|
|
321
|
+
none: null;
|
|
322
|
+
'form-data': never[];
|
|
323
|
+
json: never[];
|
|
324
|
+
xml: never[];
|
|
325
|
+
raw: string;
|
|
326
|
+
'x-www-form-urlencoded': never[];
|
|
327
|
+
};
|
|
328
|
+
}, boolean>;
|
|
329
|
+
}>> & {
|
|
330
|
+
onChange?: ((params: import("./config").HttpModel) => any) | undefined;
|
|
331
|
+
"onUpdate:value"?: ((params: import("./config").HttpModel) => any) | undefined;
|
|
332
|
+
}, {
|
|
333
|
+
readonly value: import("./config").HttpModel;
|
|
334
|
+
}, {}>;
|
|
219
335
|
JsonXml: import("vue").DefineComponent<{
|
|
220
336
|
readonly value: import("ll-plus/es/utils").EpPropFinalized<ObjectConstructor, unknown, unknown, () => void, boolean>;
|
|
221
337
|
}, {
|
|
@@ -488,21 +604,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
488
604
|
readonly dataSource: import("./config").IParamsData[];
|
|
489
605
|
}, {}>;
|
|
490
606
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
491
|
-
change: (value:
|
|
607
|
+
change: (value: import("./config").HttpModel) => boolean;
|
|
608
|
+
'update:value': (value: import("./config").HttpModel) => boolean;
|
|
492
609
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
493
|
-
readonly
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
610
|
+
readonly value: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel) | ((new (...args: any[]) => import("./config").HttpModel) | (() => import("./config").HttpModel))[], unknown, unknown, () => {
|
|
611
|
+
url: string;
|
|
612
|
+
method: string;
|
|
613
|
+
requestParams: never[];
|
|
614
|
+
headerParams: never[];
|
|
615
|
+
bodyParams: {
|
|
616
|
+
none: null;
|
|
617
|
+
'form-data': never[];
|
|
618
|
+
json: never[];
|
|
619
|
+
xml: never[];
|
|
620
|
+
raw: string;
|
|
621
|
+
'x-www-form-urlencoded': never[];
|
|
622
|
+
};
|
|
505
623
|
}, boolean>;
|
|
624
|
+
readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
506
625
|
readonly isValid: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
507
626
|
readonly rules: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => {
|
|
508
627
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
@@ -526,8 +645,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
526
645
|
})[];
|
|
527
646
|
}, boolean>;
|
|
528
647
|
}>> & {
|
|
529
|
-
onChange?: ((value:
|
|
648
|
+
onChange?: ((value: import("./config").HttpModel) => any) | undefined;
|
|
649
|
+
"onUpdate:value"?: ((value: import("./config").HttpModel) => any) | undefined;
|
|
530
650
|
}, {
|
|
651
|
+
readonly value: import("./config").HttpModel;
|
|
531
652
|
readonly rules: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => {
|
|
532
653
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
533
654
|
}) | (() => {
|
|
@@ -538,11 +659,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
538
659
|
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
539
660
|
} | undefined))[], unknown, unknown>;
|
|
540
661
|
readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
541
|
-
readonly method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod))[], unknown, unknown>;
|
|
542
|
-
readonly url: string;
|
|
543
|
-
readonly requestParams: import("./config").IParam[];
|
|
544
|
-
readonly headerParams: import("./config").IParam[];
|
|
545
|
-
readonly bodyParams: Record<string, any>;
|
|
546
662
|
readonly isValid: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
547
663
|
}, {}>;
|
|
548
664
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, provide,
|
|
1
|
+
import { defineComponent, ref, computed, provide, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, normalizeProps, guardReactiveProps, withDirectives, vShow, createElementVNode, createBlock, createCommentVNode } from 'vue';
|
|
2
2
|
import { Form } from 'ant-design-vue';
|
|
3
3
|
import './config/index.mjs';
|
|
4
4
|
import '../../../utils/index.mjs';
|
|
@@ -26,15 +26,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
const bodyKey = ref("form-data");
|
|
27
27
|
const computedRules = computed(() => props.isValid ? props.rules : {});
|
|
28
28
|
provide("disabled", props.disabled);
|
|
29
|
-
const httpModel =
|
|
30
|
-
url: props.url,
|
|
31
|
-
method: props.method,
|
|
32
|
-
bodyParams: props.bodyParams,
|
|
33
|
-
requestParams: props.requestParams,
|
|
34
|
-
headerParams: props.headerParams
|
|
35
|
-
});
|
|
29
|
+
const httpModel = ref(props.value);
|
|
36
30
|
const computedRequestList = computed(() => {
|
|
37
|
-
if (httpModel.method === "GET") {
|
|
31
|
+
if (httpModel.value.method === "GET") {
|
|
38
32
|
return requestList.filter((item) => item.key !== "body");
|
|
39
33
|
}
|
|
40
34
|
return requestList;
|
|
@@ -49,19 +43,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
43
|
}
|
|
50
44
|
);
|
|
51
45
|
const handleChange = (params) => {
|
|
52
|
-
httpModel.method = params.method;
|
|
53
|
-
httpModel.url = params.url;
|
|
46
|
+
httpModel.value.method = params.method;
|
|
47
|
+
httpModel.value.url = params.url;
|
|
54
48
|
formItemContext.onFieldChange();
|
|
55
|
-
|
|
49
|
+
setValue();
|
|
50
|
+
};
|
|
51
|
+
const setValue = () => {
|
|
52
|
+
emits("change", httpModel.value);
|
|
53
|
+
emits("update:value", httpModel.value);
|
|
56
54
|
};
|
|
55
|
+
watch(
|
|
56
|
+
() => props.value,
|
|
57
|
+
(val) => {
|
|
58
|
+
httpModel.value = val;
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
deep: true
|
|
62
|
+
}
|
|
63
|
+
);
|
|
57
64
|
watch(
|
|
58
65
|
() => httpModel,
|
|
59
|
-
(
|
|
60
|
-
|
|
66
|
+
() => {
|
|
67
|
+
setValue();
|
|
61
68
|
},
|
|
62
69
|
{
|
|
63
|
-
deep: true
|
|
64
|
-
immediate: true
|
|
70
|
+
deep: true
|
|
65
71
|
}
|
|
66
72
|
);
|
|
67
73
|
__expose({
|
|
@@ -94,8 +100,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
100
|
{
|
|
95
101
|
default: withCtx(() => [
|
|
96
102
|
createVNode(ApiUrl, {
|
|
97
|
-
value: httpModel,
|
|
98
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => httpModel = $event),
|
|
103
|
+
value: httpModel.value,
|
|
104
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => httpModel.value = $event),
|
|
99
105
|
class: normalizeClass(unref(bem).m("header")),
|
|
100
106
|
onChange: handleChange
|
|
101
107
|
}, null, 8, ["value", "class"])
|
|
@@ -114,13 +120,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
120
|
}, null, 8, ["active-key", "tabs", "class"]),
|
|
115
121
|
withDirectives(createVNode(paramsTable, {
|
|
116
122
|
columns: unref(paramsTableColumns),
|
|
117
|
-
"data-source": httpModel.requestParams
|
|
123
|
+
"data-source": httpModel.value.requestParams
|
|
118
124
|
}, null, 8, ["columns", "data-source"]), [
|
|
119
125
|
[vShow, activeKey.value === "params"]
|
|
120
126
|
]),
|
|
121
127
|
withDirectives(createVNode(paramsTable, {
|
|
122
128
|
columns: unref(headersTableColumns),
|
|
123
|
-
"data-source": httpModel.headerParams
|
|
129
|
+
"data-source": httpModel.value.headerParams
|
|
124
130
|
}, null, 8, ["columns", "data-source"]), [
|
|
125
131
|
[vShow, activeKey.value === "headers"]
|
|
126
132
|
]),
|
|
@@ -135,31 +141,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
141
|
class: normalizeClass(unref(bem).m("body-tab"))
|
|
136
142
|
}, null, 8, ["active-key", "tabs", "class"]),
|
|
137
143
|
withDirectives(createVNode(JsonXml, {
|
|
138
|
-
value: httpModel.bodyParams["json"],
|
|
139
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => httpModel.bodyParams["json"] = $event)
|
|
144
|
+
value: httpModel.value.bodyParams["json"],
|
|
145
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => httpModel.value.bodyParams["json"] = $event)
|
|
140
146
|
}, null, 8, ["value"]), [
|
|
141
147
|
[vShow, bodyKey.value === "json"]
|
|
142
148
|
]),
|
|
143
149
|
withDirectives(createVNode(JsonXml, {
|
|
144
|
-
value: httpModel.bodyParams["xml"],
|
|
145
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => httpModel.bodyParams["xml"] = $event)
|
|
150
|
+
value: httpModel.value.bodyParams["xml"],
|
|
151
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => httpModel.value.bodyParams["xml"] = $event)
|
|
146
152
|
}, null, 8, ["value"]), [
|
|
147
153
|
[vShow, bodyKey.value === "xml"]
|
|
148
154
|
]),
|
|
149
155
|
bodyKey.value === "raw" ? (openBlock(), createBlock(_component_ll_code_editor, {
|
|
150
156
|
key: 0,
|
|
151
|
-
value: httpModel.bodyParams["raw"],
|
|
152
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => httpModel.bodyParams["raw"] = $event)
|
|
157
|
+
value: httpModel.value.bodyParams["raw"],
|
|
158
|
+
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => httpModel.value.bodyParams["raw"] = $event)
|
|
153
159
|
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
154
160
|
withDirectives(createVNode(paramsTable, {
|
|
155
161
|
columns: unref(paramsTableColumns),
|
|
156
|
-
"data-source": httpModel.bodyParams["x-www-form-urlencoded"]
|
|
162
|
+
"data-source": httpModel.value.bodyParams["x-www-form-urlencoded"]
|
|
157
163
|
}, null, 8, ["columns", "data-source"]), [
|
|
158
164
|
[vShow, bodyKey.value === "x-www-form-urlencoded"]
|
|
159
165
|
]),
|
|
160
166
|
withDirectives(createVNode(paramsTable, {
|
|
161
167
|
columns: unref(formdataTableColumns),
|
|
162
|
-
"data-source": httpModel.bodyParams["form-data"]
|
|
168
|
+
"data-source": httpModel.value.bodyParams["form-data"]
|
|
163
169
|
}, null, 8, ["columns", "data-source"]), [
|
|
164
170
|
[vShow, bodyKey.value === "form-data"]
|
|
165
171
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-component.vue2.mjs","sources":["../../../../../packages/components/api-component/src/api-component.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-form ref=\"form\">\n <ll-form-item v-bind=\"validateInfos.url\">\n <api-url\n v-model:value=\"httpModel\"\n :class=\"bem.m('header')\"\n @change=\"handleChange\"\n />\n </ll-form-item>\n\n <ll-tabs-simple\n v-model:active-key=\"activeKey\"\n :tabs=\"computedRequestList\"\n :class=\"bem.m('tab')\"\n />\n <params-table\n v-show=\"activeKey === 'params'\"\n :columns=\"paramsTableColumns\"\n :data-source=\"httpModel.requestParams\"\n />\n <params-table\n v-show=\"activeKey === 'headers'\"\n :columns=\"headersTableColumns\"\n :data-source=\"httpModel.headerParams\"\n />\n <div v-show=\"activeKey === 'body'\">\n <ll-tabs-simple\n v-model:active-key=\"bodyKey\"\n :tabs=\"bodyList\"\n :class=\"bem.m('body-tab')\"\n />\n <json-xml\n v-show=\"bodyKey === 'json'\"\n v-model:value=\"httpModel.bodyParams['json']\"\n />\n\n <json-xml\n v-show=\"bodyKey === 'xml'\"\n v-model:value=\"httpModel.bodyParams['xml']\"\n />\n <ll-code-editor\n v-if=\"bodyKey === 'raw'\"\n v-model:value=\"httpModel.bodyParams['raw']\"\n />\n <params-table\n v-show=\"bodyKey === 'x-www-form-urlencoded'\"\n :columns=\"paramsTableColumns\"\n :data-source=\"httpModel.bodyParams['x-www-form-urlencoded']\"\n />\n <params-table\n v-show=\"bodyKey === 'form-data'\"\n :columns=\"formdataTableColumns\"\n :data-source=\"httpModel.bodyParams['form-data']\"\n />\n <ll-empty v-show=\"bodyKey === 'none'\" />\n </div>\n </a-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed,
|
|
1
|
+
{"version":3,"file":"api-component.vue2.mjs","sources":["../../../../../packages/components/api-component/src/api-component.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-form ref=\"form\">\n <ll-form-item v-bind=\"validateInfos.url\">\n <api-url\n v-model:value=\"httpModel\"\n :class=\"bem.m('header')\"\n @change=\"handleChange\"\n />\n </ll-form-item>\n\n <ll-tabs-simple\n v-model:active-key=\"activeKey\"\n :tabs=\"computedRequestList\"\n :class=\"bem.m('tab')\"\n />\n <params-table\n v-show=\"activeKey === 'params'\"\n :columns=\"paramsTableColumns\"\n :data-source=\"httpModel.requestParams\"\n />\n <params-table\n v-show=\"activeKey === 'headers'\"\n :columns=\"headersTableColumns\"\n :data-source=\"httpModel.headerParams\"\n />\n <div v-show=\"activeKey === 'body'\">\n <ll-tabs-simple\n v-model:active-key=\"bodyKey\"\n :tabs=\"bodyList\"\n :class=\"bem.m('body-tab')\"\n />\n <json-xml\n v-show=\"bodyKey === 'json'\"\n v-model:value=\"httpModel.bodyParams['json']\"\n />\n\n <json-xml\n v-show=\"bodyKey === 'xml'\"\n v-model:value=\"httpModel.bodyParams['xml']\"\n />\n <ll-code-editor\n v-if=\"bodyKey === 'raw'\"\n v-model:value=\"httpModel.bodyParams['raw']\"\n />\n <params-table\n v-show=\"bodyKey === 'x-www-form-urlencoded'\"\n :columns=\"paramsTableColumns\"\n :data-source=\"httpModel.bodyParams['x-www-form-urlencoded']\"\n />\n <params-table\n v-show=\"bodyKey === 'form-data'\"\n :columns=\"formdataTableColumns\"\n :data-source=\"httpModel.bodyParams['form-data']\"\n />\n <ll-empty v-show=\"bodyKey === 'none'\" />\n </div>\n </a-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch, provide } from 'vue'\n\nimport { Form } from 'ant-design-vue'\n\nimport {\n apiComponentProps,\n apiComponentEmits,\n requestList,\n paramsTableColumns,\n bodyList,\n headersTableColumns,\n formdataTableColumns,\n IMethod\n} from './config'\n\nimport { createNamespace } from '@ll-plus/utils'\n// Components\nimport ApiUrl from './components/api-url.vue'\n\nimport JsonXml from './components/json-xml.vue'\n\nimport paramsTable from './components/params-table.vue'\n\ndefineOptions({ name: 'LlApiComponent' })\n\nconst props = defineProps(apiComponentProps)\n\nconst emits = defineEmits(apiComponentEmits)\n\nconst bem = createNamespace('api-component')\n\nconst useForm = Form.useForm\n\nconst formItemContext = Form.useInjectFormItemContext()\n\nconst form = ref()\n\nconst activeKey = ref('params')\n\nconst bodyKey = ref('form-data')\n\nconst computedRules = computed(() => (props.isValid ? props.rules : {}))\n\nprovide('disabled', props.disabled)\n\nconst httpModel = ref(props.value)\n\nconst computedRequestList = computed(() => {\n if (httpModel.value.method === 'GET') {\n return requestList.filter(item => item.key !== 'body')\n }\n return requestList\n})\n\nconst { resetFields, validate, validateInfos } = useForm(\n httpModel,\n computedRules.value,\n {\n onValidate: (...args) => {\n console.log('onValidate', args)\n }\n }\n)\n\nconst handleChange = (params: { url: string; method: IMethod }) => {\n httpModel.value.method = params.method\n httpModel.value.url = params.url\n formItemContext.onFieldChange()\n setValue()\n}\n\nconst setValue = () => {\n emits('change', httpModel.value)\n emits('update:value', httpModel.value)\n}\n\nwatch(\n () => props.value,\n val => {\n httpModel.value = val\n },\n {\n deep: true\n }\n)\n\nwatch(\n () => httpModel,\n () => {\n setValue()\n },\n {\n deep: true\n }\n)\n\ndefineExpose({\n validate,\n resetFields\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuFA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,eAAe,CAAA,CAAA;AAE3C,IAAA,MAAM,UAAU,IAAK,CAAA,OAAA,CAAA;AAErB,IAAM,MAAA,eAAA,GAAkB,KAAK,wBAAyB,EAAA,CAAA;AAEtD,IAAA,MAAM,OAAO,GAAI,EAAA,CAAA;AAEjB,IAAM,MAAA,SAAA,GAAY,IAAI,QAAQ,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,IAAI,WAAW,CAAA,CAAA;AAE/B,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAO,KAAA,CAAM,UAAU,KAAM,CAAA,KAAA,GAAQ,EAAG,CAAA,CAAA;AAEvE,IAAQ,OAAA,CAAA,UAAA,EAAY,MAAM,QAAQ,CAAA,CAAA;AAElC,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAEjC,IAAM,MAAA,mBAAA,GAAsB,SAAS,MAAM;AACzC,MAAI,IAAA,SAAA,CAAU,KAAM,CAAA,MAAA,KAAW,KAAO,EAAA;AACpC,QAAA,OAAO,WAAY,CAAA,MAAA,CAAO,CAAQ,IAAA,KAAA,IAAA,CAAK,QAAQ,MAAM,CAAA,CAAA;AAAA,OACvD;AACA,MAAO,OAAA,WAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,EAAE,WAAA,EAAa,QAAU,EAAA,aAAA,EAAkB,GAAA,OAAA;AAAA,MAC/C,SAAA;AAAA,MACA,aAAc,CAAA,KAAA;AAAA,MACd;AAAA,QACE,UAAA,EAAY,IAAI,IAAS,KAAA;AACvB,UAAQ,OAAA,CAAA,GAAA,CAAI,cAAc,IAAI,CAAA,CAAA;AAAA,SAChC;AAAA,OACF;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,CAAC,MAA6C,KAAA;AACjE,MAAU,SAAA,CAAA,KAAA,CAAM,SAAS,MAAO,CAAA,MAAA,CAAA;AAChC,MAAU,SAAA,CAAA,KAAA,CAAM,MAAM,MAAO,CAAA,GAAA,CAAA;AAC7B,MAAA,eAAA,CAAgB,aAAc,EAAA,CAAA;AAC9B,MAAS,QAAA,EAAA,CAAA;AAAA,KACX,CAAA;AAEA,IAAA,MAAM,WAAW,MAAM;AACrB,MAAM,KAAA,CAAA,QAAA,EAAU,UAAU,KAAK,CAAA,CAAA;AAC/B,MAAM,KAAA,CAAA,cAAA,EAAgB,UAAU,KAAK,CAAA,CAAA;AAAA,KACvC,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAO,GAAA,KAAA;AACL,QAAA,SAAA,CAAU,KAAQ,GAAA,GAAA,CAAA;AAAA,OACpB;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,SAAA;AAAA,MACN,MAAM;AACJ,QAAS,QAAA,EAAA,CAAA;AAAA,OACX;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAa,QAAA,CAAA;AAAA,MACX,QAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|