ll-plus 2.2.1 → 2.2.2
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 +37 -29
- package/es/components/api-component/index.mjs +1 -1
- package/es/components/api-component/src/api-component.vue.d.ts +37 -29
- package/es/components/api-component/src/api-component.vue2.mjs +30 -34
- package/es/components/api-component/src/api-component.vue2.mjs.map +1 -1
- package/es/components/api-component/src/components/params-table.vue2.mjs +1 -10
- package/es/components/api-component/src/components/params-table.vue2.mjs.map +1 -1
- package/es/components/api-component/src/config/api-component.d.ts +11 -0
- package/es/components/api-component/src/config/api-component.mjs +4 -1
- package/es/components/api-component/src/config/api-component.mjs.map +1 -1
- package/es/components/api-component/src/config/index.mjs +1 -1
- package/es/components/easy-cron/index.d.ts +61 -68
- package/es/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +61 -68
- package/es/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +61 -68
- package/es/components/easy-cron/src/components/tabs/day-ui.vue.d.ts +1 -2
- package/es/components/easy-cron/src/components/tabs/day-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/day-ui.vue2.mjs +1 -4
- package/es/components/easy-cron/src/components/tabs/day-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/hour-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/hour-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/hour-ui.vue2.mjs +7 -13
- package/es/components/easy-cron/src/components/tabs/hour-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/minute-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/minute-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/minute-ui.vue2.mjs +7 -13
- package/es/components/easy-cron/src/components/tabs/minute-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/month-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/month-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/month-ui.vue2.mjs +7 -13
- package/es/components/easy-cron/src/components/tabs/month-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/second-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/second-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/second-ui.vue2.mjs +7 -13
- package/es/components/easy-cron/src/components/tabs/second-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/week-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/week-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/week-ui.vue2.mjs +0 -4
- package/es/components/easy-cron/src/components/tabs/week-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/year-ui.vue.d.ts +10 -11
- package/es/components/easy-cron/src/components/tabs/year-ui.vue.mjs.map +1 -1
- package/es/components/easy-cron/src/components/tabs/year-ui.vue2.mjs +6 -12
- package/es/components/easy-cron/src/components/tabs/year-ui.vue2.mjs.map +1 -1
- package/es/components/easy-cron/src/config/use-tab-mixin.d.ts +10 -1
- package/es/components/easy-cron/src/config/use-tab-mixin.mjs +4 -3
- package/es/components/easy-cron/src/config/use-tab-mixin.mjs.map +1 -1
- package/es/components/easy-cron/src/easy-cron.vue.d.ts +61 -68
- package/es/components/index.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/utils/props/runtime.d.ts +2 -2
- package/index.full.js +70 -102
- package/index.full.min.js +16 -16
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +22 -22
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +71 -104
- package/lib/components/api-component/index.d.ts +37 -29
- package/lib/components/api-component/index.js +1 -0
- package/lib/components/api-component/index.js.map +1 -1
- package/lib/components/api-component/src/api-component.vue.d.ts +37 -29
- package/lib/components/api-component/src/api-component.vue2.js +29 -33
- package/lib/components/api-component/src/api-component.vue2.js.map +1 -1
- package/lib/components/api-component/src/components/params-table.vue2.js +0 -9
- package/lib/components/api-component/src/components/params-table.vue2.js.map +1 -1
- package/lib/components/api-component/src/config/api-component.d.ts +11 -0
- package/lib/components/api-component/src/config/api-component.js +4 -0
- package/lib/components/api-component/src/config/api-component.js.map +1 -1
- package/lib/components/api-component/src/config/index.js +1 -0
- package/lib/components/api-component/src/config/index.js.map +1 -1
- package/lib/components/easy-cron/index.d.ts +61 -68
- package/lib/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +61 -68
- package/lib/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +61 -68
- package/lib/components/easy-cron/src/components/tabs/day-ui.vue.d.ts +1 -2
- package/lib/components/easy-cron/src/components/tabs/day-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/day-ui.vue2.js +1 -4
- package/lib/components/easy-cron/src/components/tabs/day-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/hour-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/hour-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/hour-ui.vue2.js +7 -13
- package/lib/components/easy-cron/src/components/tabs/hour-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/minute-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/minute-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/minute-ui.vue2.js +7 -13
- package/lib/components/easy-cron/src/components/tabs/minute-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/month-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/month-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/month-ui.vue2.js +7 -13
- package/lib/components/easy-cron/src/components/tabs/month-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/second-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/second-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/second-ui.vue2.js +7 -13
- package/lib/components/easy-cron/src/components/tabs/second-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/week-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/week-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/week-ui.vue2.js +0 -4
- package/lib/components/easy-cron/src/components/tabs/week-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/year-ui.vue.d.ts +10 -11
- package/lib/components/easy-cron/src/components/tabs/year-ui.vue.js.map +1 -1
- package/lib/components/easy-cron/src/components/tabs/year-ui.vue2.js +6 -12
- package/lib/components/easy-cron/src/components/tabs/year-ui.vue2.js.map +1 -1
- package/lib/components/easy-cron/src/config/use-tab-mixin.d.ts +10 -1
- package/lib/components/easy-cron/src/config/use-tab-mixin.js +3 -2
- package/lib/components/easy-cron/src/config/use-tab-mixin.js.map +1 -1
- package/lib/components/easy-cron/src/easy-cron.vue.d.ts +61 -68
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/props/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/types/packages/components/api-component/index.d.ts +37 -29
- package/types/packages/components/api-component/src/api-component.vue.d.ts +37 -29
- package/types/packages/components/api-component/src/config/api-component.d.ts +11 -0
- package/types/packages/components/easy-cron/index.d.ts +61 -68
- package/types/packages/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +61 -68
- package/types/packages/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +61 -68
- package/types/packages/components/easy-cron/src/components/tabs/day-ui.vue.d.ts +1 -2
- package/types/packages/components/easy-cron/src/components/tabs/hour-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/components/tabs/minute-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/components/tabs/month-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/components/tabs/second-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/components/tabs/week-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/components/tabs/year-ui.vue.d.ts +10 -11
- package/types/packages/components/easy-cron/src/config/use-tab-mixin.d.ts +10 -1
- package/types/packages/components/easy-cron/src/easy-cron.vue.d.ts +61 -68
- package/types/packages/utils/props/runtime.d.ts +2 -2
|
@@ -19,7 +19,9 @@ export declare const LlApiComponent: import("ll-plus/es/utils").SFCWithInstall<i
|
|
|
19
19
|
readonly requestParams: import("./src/config").IParam[];
|
|
20
20
|
readonly headerParams: import("./src/config").IParam[];
|
|
21
21
|
readonly bodyParams: Record<string, any>;
|
|
22
|
+
readonly onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
22
23
|
} & {}>;
|
|
24
|
+
emits: (event: "change", value: Record<string, any>) => void;
|
|
23
25
|
bem: {
|
|
24
26
|
b: (blockSuffix?: string) => string;
|
|
25
27
|
e: (element?: string) => string;
|
|
@@ -30,35 +32,37 @@ export declare const LlApiComponent: import("ll-plus/es/utils").SFCWithInstall<i
|
|
|
30
32
|
bem: (blockSuffix: string, element: string, modifier: string) => string;
|
|
31
33
|
is: (name?: string) => string;
|
|
32
34
|
};
|
|
33
|
-
method: import("vue").Ref<import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod))[], unknown, unknown>>;
|
|
34
|
-
url: import("vue").Ref<string>;
|
|
35
35
|
activeKey: import("vue").Ref<string>;
|
|
36
36
|
bodyKey: import("vue").Ref<string>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
httpModel: {
|
|
38
|
+
url: string;
|
|
39
|
+
method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod))[], unknown, unknown>;
|
|
40
|
+
bodyParams: Record<string, any>;
|
|
41
|
+
requestParams: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
required?: boolean | undefined;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
value?: string | undefined;
|
|
46
|
+
type?: any;
|
|
47
|
+
static?: boolean | undefined;
|
|
48
|
+
contentType?: string | undefined;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
chineseName?: string | undefined;
|
|
51
|
+
children?: any[] | undefined;
|
|
52
|
+
}[];
|
|
53
|
+
headerParams: {
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
required?: boolean | undefined;
|
|
56
|
+
name?: string | undefined;
|
|
57
|
+
value?: string | undefined;
|
|
58
|
+
type?: any;
|
|
59
|
+
static?: boolean | undefined;
|
|
60
|
+
contentType?: string | undefined;
|
|
61
|
+
description?: string | undefined;
|
|
62
|
+
chineseName?: string | undefined;
|
|
63
|
+
children?: any[] | undefined;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
62
66
|
computedRequestList: import("vue").ComputedRef<{
|
|
63
67
|
key: string;
|
|
64
68
|
name: string;
|
|
@@ -413,7 +417,9 @@ export declare const LlApiComponent: import("ll-plus/es/utils").SFCWithInstall<i
|
|
|
413
417
|
readonly columns: import("./src/config").IParamsColumn[];
|
|
414
418
|
readonly dataSource: import("./src/config").IParamsData[];
|
|
415
419
|
}, {}>;
|
|
416
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
420
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
421
|
+
change: (value: Record<string, any>) => boolean;
|
|
422
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
417
423
|
readonly url: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
418
424
|
readonly method: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod))[], unknown, unknown, "GET", boolean>;
|
|
419
425
|
readonly requestParams: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./src/config").IParam[]) | (() => import("./src/config").IParam[]) | ((new (...args: any[]) => import("./src/config").IParam[]) | (() => import("./src/config").IParam[]))[], unknown, unknown, () => import("./src/config").IParam[], boolean>;
|
|
@@ -426,7 +432,9 @@ export declare const LlApiComponent: import("ll-plus/es/utils").SFCWithInstall<i
|
|
|
426
432
|
raw: string;
|
|
427
433
|
'x-www-form-urlencoded': never[];
|
|
428
434
|
}, boolean>;
|
|
429
|
-
}
|
|
435
|
+
}>> & {
|
|
436
|
+
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
437
|
+
}, {
|
|
430
438
|
readonly method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./src/config").IMethod))[], unknown, unknown>;
|
|
431
439
|
readonly url: string;
|
|
432
440
|
readonly requestParams: import("./src/config").IParam[];
|
|
@@ -2,7 +2,7 @@ import '../../utils/index.mjs';
|
|
|
2
2
|
import ApiComponent from './src/api-component.vue.mjs';
|
|
3
3
|
import './src/config/index.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
5
|
-
export { DEFAULT_METHOD, apiComponentProps, bodyList, requestList } from './src/config/api-component.mjs';
|
|
5
|
+
export { DEFAULT_METHOD, apiComponentEmits, apiComponentProps, bodyList, requestList } from './src/config/api-component.mjs';
|
|
6
6
|
export { apiModalEmits, apiModalProps } from './src/config/api-modal.mjs';
|
|
7
7
|
export { apiUrlEmits, methods } from './src/config/api-url.mjs';
|
|
8
8
|
export { batchEditingEmits, batchEditingOptions, batchEditingProps } from './src/config/batch-editing.mjs';
|
|
@@ -18,7 +18,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
readonly requestParams: import("./config").IParam[];
|
|
19
19
|
readonly headerParams: import("./config").IParam[];
|
|
20
20
|
readonly bodyParams: Record<string, any>;
|
|
21
|
+
readonly onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
21
22
|
} & {}>;
|
|
23
|
+
emits: (event: "change", value: Record<string, any>) => void;
|
|
22
24
|
bem: {
|
|
23
25
|
b: (blockSuffix?: string) => string;
|
|
24
26
|
e: (element?: string) => string;
|
|
@@ -29,35 +31,37 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
31
|
bem: (blockSuffix: string, element: string, modifier: string) => string;
|
|
30
32
|
is: (name?: string) => string;
|
|
31
33
|
};
|
|
32
|
-
method: import("vue").Ref<import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod))[], unknown, unknown>>;
|
|
33
|
-
url: import("vue").Ref<string>;
|
|
34
34
|
activeKey: import("vue").Ref<string>;
|
|
35
35
|
bodyKey: import("vue").Ref<string>;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
36
|
+
httpModel: {
|
|
37
|
+
url: string;
|
|
38
|
+
method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod))[], unknown, unknown>;
|
|
39
|
+
bodyParams: Record<string, any>;
|
|
40
|
+
requestParams: {
|
|
41
|
+
[x: string]: any;
|
|
42
|
+
required?: boolean | undefined;
|
|
43
|
+
name?: string | undefined;
|
|
44
|
+
value?: string | undefined;
|
|
45
|
+
type?: any;
|
|
46
|
+
static?: boolean | undefined;
|
|
47
|
+
contentType?: string | undefined;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
chineseName?: string | undefined;
|
|
50
|
+
children?: any[] | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
headerParams: {
|
|
53
|
+
[x: string]: any;
|
|
54
|
+
required?: boolean | undefined;
|
|
55
|
+
name?: string | undefined;
|
|
56
|
+
value?: string | undefined;
|
|
57
|
+
type?: any;
|
|
58
|
+
static?: boolean | undefined;
|
|
59
|
+
contentType?: string | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
|
+
chineseName?: string | undefined;
|
|
62
|
+
children?: any[] | undefined;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
61
65
|
computedRequestList: import("vue").ComputedRef<{
|
|
62
66
|
key: string;
|
|
63
67
|
name: string;
|
|
@@ -412,7 +416,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
412
416
|
readonly columns: import("./config").IParamsColumn[];
|
|
413
417
|
readonly dataSource: import("./config").IParamsData[];
|
|
414
418
|
}, {}>;
|
|
415
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
419
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
420
|
+
change: (value: Record<string, any>) => boolean;
|
|
421
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
416
422
|
readonly url: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
417
423
|
readonly method: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod))[], unknown, unknown, "GET", boolean>;
|
|
418
424
|
readonly requestParams: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("./config").IParam[]) | (() => import("./config").IParam[]) | ((new (...args: any[]) => import("./config").IParam[]) | (() => import("./config").IParam[]))[], unknown, unknown, () => import("./config").IParam[], boolean>;
|
|
@@ -425,7 +431,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
425
431
|
raw: string;
|
|
426
432
|
'x-www-form-urlencoded': never[];
|
|
427
433
|
}, boolean>;
|
|
428
|
-
}
|
|
434
|
+
}>> & {
|
|
435
|
+
onChange?: ((value: Record<string, any>) => any) | undefined;
|
|
436
|
+
}, {
|
|
429
437
|
readonly method: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => import("./config").IMethod))[], unknown, unknown>;
|
|
430
438
|
readonly url: string;
|
|
431
439
|
readonly requestParams: import("./config").IParam[];
|
|
@@ -4,7 +4,7 @@ import '../../../utils/index.mjs';
|
|
|
4
4
|
import ApiUrl from './components/api-url.vue.mjs';
|
|
5
5
|
import JsonXml from './components/json-xml.vue.mjs';
|
|
6
6
|
import paramsTable from './components/params-table.vue.mjs';
|
|
7
|
-
import { apiComponentProps, requestList, bodyList } from './config/api-component.mjs';
|
|
7
|
+
import { apiComponentProps, apiComponentEmits, requestList, bodyList } from './config/api-component.mjs';
|
|
8
8
|
import { createNamespace } from '../../../utils/create-namespace.mjs';
|
|
9
9
|
import { paramsTableColumns, headersTableColumns, formdataTableColumns } from './config/table.mjs';
|
|
10
10
|
|
|
@@ -13,38 +13,34 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
...{ name: "LlApiComponent" },
|
|
14
14
|
__name: "api-component",
|
|
15
15
|
props: apiComponentProps,
|
|
16
|
-
|
|
16
|
+
emits: apiComponentEmits,
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
17
18
|
const props = __props;
|
|
19
|
+
const emits = __emit;
|
|
18
20
|
const bem = createNamespace("api-component");
|
|
19
|
-
const method = ref(props.method);
|
|
20
|
-
const url = ref(props.url);
|
|
21
21
|
const activeKey = ref("params");
|
|
22
22
|
const bodyKey = ref("form-data");
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const httpModel = reactive({
|
|
24
|
+
url: props.url,
|
|
25
|
+
method: props.method,
|
|
26
|
+
bodyParams: props.bodyParams,
|
|
27
|
+
requestParams: props.requestParams,
|
|
28
|
+
headerParams: props.headerParams
|
|
29
|
+
});
|
|
26
30
|
const computedRequestList = computed(() => {
|
|
27
|
-
if (method
|
|
31
|
+
if (httpModel.method === "GET") {
|
|
28
32
|
return requestList.filter((item) => item.key !== "body");
|
|
29
33
|
}
|
|
30
34
|
return requestList;
|
|
31
35
|
});
|
|
32
36
|
watch(
|
|
33
|
-
|
|
34
|
-
(n) => {
|
|
35
|
-
console.log("requestParams", n);
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
deep: true
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
watch(
|
|
42
|
-
bodyParams,
|
|
37
|
+
() => httpModel,
|
|
43
38
|
(n) => {
|
|
44
|
-
|
|
39
|
+
emits("change", n);
|
|
45
40
|
},
|
|
46
41
|
{
|
|
47
|
-
deep: true
|
|
42
|
+
deep: true,
|
|
43
|
+
immediate: true
|
|
48
44
|
}
|
|
49
45
|
);
|
|
50
46
|
return (_ctx, _cache) => {
|
|
@@ -58,10 +54,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
54
|
},
|
|
59
55
|
[
|
|
60
56
|
createVNode(ApiUrl, {
|
|
61
|
-
method: method
|
|
62
|
-
"onUpdate:method": _cache[0] || (_cache[0] = ($event) => method
|
|
63
|
-
url: url
|
|
64
|
-
"onUpdate:url": _cache[1] || (_cache[1] = ($event) => url
|
|
57
|
+
method: httpModel.method,
|
|
58
|
+
"onUpdate:method": _cache[0] || (_cache[0] = ($event) => httpModel.method = $event),
|
|
59
|
+
url: httpModel.url,
|
|
60
|
+
"onUpdate:url": _cache[1] || (_cache[1] = ($event) => httpModel.url = $event),
|
|
65
61
|
class: normalizeClass(unref(bem).m("header"))
|
|
66
62
|
}, null, 8, ["method", "url", "class"]),
|
|
67
63
|
createVNode(_component_ll_tabs_simple, {
|
|
@@ -72,13 +68,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
68
|
}, null, 8, ["active-key", "tabs", "class"]),
|
|
73
69
|
withDirectives(createVNode(paramsTable, {
|
|
74
70
|
columns: unref(paramsTableColumns),
|
|
75
|
-
"data-source": requestParams
|
|
71
|
+
"data-source": httpModel.requestParams
|
|
76
72
|
}, null, 8, ["columns", "data-source"]), [
|
|
77
73
|
[vShow, activeKey.value === "params"]
|
|
78
74
|
]),
|
|
79
75
|
withDirectives(createVNode(paramsTable, {
|
|
80
76
|
columns: unref(headersTableColumns),
|
|
81
|
-
"data-source": headerParams
|
|
77
|
+
"data-source": httpModel.headerParams
|
|
82
78
|
}, null, 8, ["columns", "data-source"]), [
|
|
83
79
|
[vShow, activeKey.value === "headers"]
|
|
84
80
|
]),
|
|
@@ -93,31 +89,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
89
|
class: normalizeClass(unref(bem).m("body-tab"))
|
|
94
90
|
}, null, 8, ["active-key", "tabs", "class"]),
|
|
95
91
|
withDirectives(createVNode(JsonXml, {
|
|
96
|
-
value: bodyParams["json"],
|
|
97
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => bodyParams["json"] = $event)
|
|
92
|
+
value: httpModel.bodyParams["json"],
|
|
93
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => httpModel.bodyParams["json"] = $event)
|
|
98
94
|
}, null, 8, ["value"]), [
|
|
99
95
|
[vShow, bodyKey.value === "json"]
|
|
100
96
|
]),
|
|
101
97
|
withDirectives(createVNode(JsonXml, {
|
|
102
|
-
value: bodyParams["xml"],
|
|
103
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => bodyParams["xml"] = $event)
|
|
98
|
+
value: httpModel.bodyParams["xml"],
|
|
99
|
+
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => httpModel.bodyParams["xml"] = $event)
|
|
104
100
|
}, null, 8, ["value"]), [
|
|
105
101
|
[vShow, bodyKey.value === "xml"]
|
|
106
102
|
]),
|
|
107
103
|
bodyKey.value === "raw" ? (openBlock(), createBlock(_component_ll_code_editor, {
|
|
108
104
|
key: 0,
|
|
109
|
-
value: bodyParams["raw"],
|
|
110
|
-
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => bodyParams["raw"] = $event)
|
|
105
|
+
value: httpModel.bodyParams["raw"],
|
|
106
|
+
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => httpModel.bodyParams["raw"] = $event)
|
|
111
107
|
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
112
108
|
withDirectives(createVNode(paramsTable, {
|
|
113
109
|
columns: unref(paramsTableColumns),
|
|
114
|
-
"data-source": bodyParams["x-www-form-urlencoded"]
|
|
110
|
+
"data-source": httpModel.bodyParams["x-www-form-urlencoded"]
|
|
115
111
|
}, null, 8, ["columns", "data-source"]), [
|
|
116
112
|
[vShow, bodyKey.value === "x-www-form-urlencoded"]
|
|
117
113
|
]),
|
|
118
114
|
withDirectives(createVNode(paramsTable, {
|
|
119
115
|
columns: unref(formdataTableColumns),
|
|
120
|
-
"data-source": bodyParams["form-data"]
|
|
116
|
+
"data-source": httpModel.bodyParams["form-data"]
|
|
121
117
|
}, null, 8, ["columns", "data-source"]), [
|
|
122
118
|
[vShow, bodyKey.value === "form-data"]
|
|
123
119
|
]),
|
|
@@ -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 <api-url\n v-model:method=\"method\"\n v-model:url=\"url\"\n :class=\"bem.m('header')\"\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=\"requestParams\"\n />\n <params-table\n v-show=\"activeKey === 'headers'\"\n :columns=\"headersTableColumns\"\n :data-source=\"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=\"bodyParams['json']\"\n />\n\n <json-xml
|
|
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 <api-url\n v-model:method=\"httpModel.method\"\n v-model:url=\"httpModel.url\"\n :class=\"bem.m('header')\"\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 </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, reactive, watch } from 'vue'\n\nimport {\n apiComponentProps,\n apiComponentEmits,\n requestList,\n paramsTableColumns,\n bodyList,\n headersTableColumns,\n formdataTableColumns\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 activeKey = ref('params')\n\nconst bodyKey = ref('form-data')\n\n// const method = ref(props.method)\n\n// const url = ref(props.url)\n\n// const requestParams = ref(props.requestParams)\n\n// const headerParams = ref(props.headerParams)\n\n// const bodyParams = reactive(props.bodyParams)\n\n// const httpModel = reactive({\n// url: props.url,\n// method: props.method,\n// bodyParams: props.bodyParams,\n// requestParams: props.requestParams,\n// headerParams: props.headerParams\n// })\nconst httpModel = reactive({\n url: props.url,\n method: props.method,\n bodyParams: props.bodyParams,\n requestParams: props.requestParams,\n headerParams: props.headerParams\n})\n\nconst computedRequestList = computed(() => {\n if (httpModel.method === 'GET') {\n return requestList.filter(item => item.key !== 'body')\n }\n return requestList\n})\n\nwatch(\n () => httpModel,\n n => {\n emits('change', n)\n },\n {\n deep: true,\n immediate: true\n }\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA+EA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,eAAe,CAAA,CAAA;AAE3C,IAAM,MAAA,SAAA,GAAY,IAAI,QAAQ,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,IAAI,WAAW,CAAA,CAAA;AAmB/B,IAAA,MAAM,YAAY,QAAS,CAAA;AAAA,MACzB,KAAK,KAAM,CAAA,GAAA;AAAA,MACX,QAAQ,KAAM,CAAA,MAAA;AAAA,MACd,YAAY,KAAM,CAAA,UAAA;AAAA,MAClB,eAAe,KAAM,CAAA,aAAA;AAAA,MACrB,cAAc,KAAM,CAAA,YAAA;AAAA,KACrB,CAAA,CAAA;AAED,IAAM,MAAA,mBAAA,GAAsB,SAAS,MAAM;AACzC,MAAI,IAAA,SAAA,CAAU,WAAW,KAAO,EAAA;AAC9B,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,KAAA;AAAA,MACE,MAAM,SAAA;AAAA,MACN,CAAK,CAAA,KAAA;AACH,QAAA,KAAA,CAAM,UAAU,CAAC,CAAA,CAAA;AAAA,OACnB;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,QACN,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode, toDisplayString, createCommentVNode, createTextVNode } from 'vue';
|
|
2
2
|
import '../config/index.mjs';
|
|
3
3
|
import '../../../../utils/index.mjs';
|
|
4
4
|
import TableRow from './params-table-row.vue.mjs';
|
|
@@ -29,15 +29,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
addData.value = "";
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
watch(
|
|
33
|
-
() => props.dataSource,
|
|
34
|
-
(n) => {
|
|
35
|
-
console.log({ n });
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
deep: true
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
32
|
return (_ctx, _cache) => {
|
|
42
33
|
const _component_ll_tooltip = resolveComponent("ll-tooltip");
|
|
43
34
|
const _component_a_col = resolveComponent("a-col");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params-table.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/params-table.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-row :class=\"bem.m('table-header')\" :gutter=\"20\">\n <a-col\n v-for=\"(col, index) in props.columns\"\n :key=\"index\"\n :span=\"col.span\"\n :class=\"bem.e('table-header-col')\"\n >\n <span>{{ col.title }}</span>\n <ll-tooltip\n v-if=\"col.key === 'static'\"\n tip=\"Content-Type 字段用于指定请求部分的媒体类型\"\n />\n </a-col>\n <a-col :span=\"1\"> 操作 </a-col>\n </a-row>\n <div :class=\"bem.m('table-body')\">\n <table-row\n v-for=\"(item, index) in props.dataSource\"\n :key=\"index\"\n :data=\"item\"\n :columns=\"props.columns\"\n :data-source=\"props.dataSource\"\n />\n <a-row :gutter=\"20\" :class=\"bem.e('table-row')\">\n <a-col\n v-for=\"(col, index) in props.columns\"\n :key=\"index\"\n :span=\"col.span || 24 / props.columns.length\"\n :class=\"bem.e('table-col')\"\n >\n <template v-if=\"col.key === 'name'\">\n <ll-input\n v-model:value=\"addData\"\n placeholder=\"添加参数\"\n :bordered=\"false\"\n @blur=\"handleAdd(props.dataSource)\"\n />\n </template>\n </a-col>\n </a-row>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref
|
|
1
|
+
{"version":3,"file":"params-table.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/params-table.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <a-row :class=\"bem.m('table-header')\" :gutter=\"20\">\n <a-col\n v-for=\"(col, index) in props.columns\"\n :key=\"index\"\n :span=\"col.span\"\n :class=\"bem.e('table-header-col')\"\n >\n <span>{{ col.title }}</span>\n <ll-tooltip\n v-if=\"col.key === 'static'\"\n tip=\"Content-Type 字段用于指定请求部分的媒体类型\"\n />\n </a-col>\n <a-col :span=\"1\"> 操作 </a-col>\n </a-row>\n <div :class=\"bem.m('table-body')\">\n <table-row\n v-for=\"(item, index) in props.dataSource\"\n :key=\"index\"\n :data=\"item\"\n :columns=\"props.columns\"\n :data-source=\"props.dataSource\"\n />\n <a-row :gutter=\"20\" :class=\"bem.e('table-row')\">\n <a-col\n v-for=\"(col, index) in props.columns\"\n :key=\"index\"\n :span=\"col.span || 24 / props.columns.length\"\n :class=\"bem.e('table-col')\"\n >\n <template v-if=\"col.key === 'name'\">\n <ll-input\n v-model:value=\"addData\"\n placeholder=\"添加参数\"\n :bordered=\"false\"\n @blur=\"handleAdd(props.dataSource)\"\n />\n </template>\n </a-col>\n </a-row>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\nimport { paramsTableProps } from '../config'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport TableRow from './params-table-row.vue'\n\ndefineOptions({ name: 'LlParamsTable' })\n\nconst bem = createNamespace('params-table')\n\nconst props = defineProps(paramsTableProps)\n\nconst addData = ref('')\n\nconst handleAdd = dataSource => {\n if (\n (addData.value && dataSource.find(e => e.name !== addData.value)) ||\n !dataSource.length\n ) {\n if (!addData.value) return\n dataSource.push({\n name: addData.value,\n required: false,\n value: '',\n static: false,\n description: '',\n contentType: ''\n })\n addData.value = ''\n }\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyDA,IAAM,MAAA,GAAA,GAAM,gBAAgB,cAAc,CAAA,CAAA;AAE1C,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,OAAA,GAAU,IAAI,EAAE,CAAA,CAAA;AAEtB,IAAA,MAAM,YAAY,CAAc,UAAA,KAAA;AAC9B,MAAA,IACG,OAAQ,CAAA,KAAA,IAAS,UAAW,CAAA,IAAA,CAAK,CAAK,CAAA,KAAA,CAAA,CAAE,IAAS,KAAA,OAAA,CAAQ,KAAK,CAAA,IAC/D,CAAC,UAAA,CAAW,MACZ,EAAA;AACA,QAAA,IAAI,CAAC,OAAQ,CAAA,KAAA;AAAO,UAAA,OAAA;AACpB,QAAA,UAAA,CAAW,IAAK,CAAA;AAAA,UACd,MAAM,OAAQ,CAAA,KAAA;AAAA,UACd,QAAU,EAAA,KAAA;AAAA,UACV,KAAO,EAAA,EAAA;AAAA,UACP,MAAQ,EAAA,KAAA;AAAA,UACR,WAAa,EAAA,EAAA;AAAA,UACb,WAAa,EAAA,EAAA;AAAA,SACd,CAAA,CAAA;AACD,QAAA,OAAA,CAAQ,KAAQ,GAAA,EAAA,CAAA;AAAA,OAClB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,6 +23,13 @@ export declare const bodyList: {
|
|
|
23
23
|
key: string;
|
|
24
24
|
name: string;
|
|
25
25
|
}[];
|
|
26
|
+
export interface IApiParams {
|
|
27
|
+
url?: string;
|
|
28
|
+
method?: IMethod;
|
|
29
|
+
requestParams?: IParam[];
|
|
30
|
+
headerParams?: IParam[];
|
|
31
|
+
bodyParams?: Record<string, any>;
|
|
32
|
+
}
|
|
26
33
|
export declare const apiComponentProps: {
|
|
27
34
|
readonly url: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
28
35
|
readonly method: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod) | ((new (...args: any[]) => "POST" | "PUT" | "GET" | "DELETE") | (() => IMethod))[], unknown, unknown, "GET", boolean>;
|
|
@@ -37,5 +44,9 @@ export declare const apiComponentProps: {
|
|
|
37
44
|
'x-www-form-urlencoded': never[];
|
|
38
45
|
}, boolean>;
|
|
39
46
|
};
|
|
47
|
+
export declare const apiComponentEmits: {
|
|
48
|
+
change: (value: Record<string, any>) => boolean;
|
|
49
|
+
};
|
|
40
50
|
export type ApiComponentProps = ExtractPropTypes<typeof apiComponentProps>;
|
|
51
|
+
export type ApiComponentEmits = typeof apiComponentEmits;
|
|
41
52
|
export type ApiComponentInstance = InstanceType<typeof ApiComponent>;
|
|
@@ -72,6 +72,9 @@ const apiComponentProps = buildProps({
|
|
|
72
72
|
})
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
const apiComponentEmits = {
|
|
76
|
+
change: (value) => !!value
|
|
77
|
+
};
|
|
75
78
|
|
|
76
|
-
export { DEFAULT_METHOD, apiComponentProps, bodyList, requestList };
|
|
79
|
+
export { DEFAULT_METHOD, apiComponentEmits, apiComponentProps, bodyList, requestList };
|
|
77
80
|
//# sourceMappingURL=api-component.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-component.mjs","sources":["../../../../../../packages/components/api-component/src/config/api-component.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nimport type ApiComponent from '../api-component.vue'\n\nexport type IMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\nexport type IValueType =\n | 'string'\n | 'integer'\n | 'boolean'\n | 'number'\n | 'array'\n | null\n | any\n\nexport interface IParam {\n required?: boolean\n name?: string\n value?: string\n type?: IValueType\n static?: boolean\n contentType?: string\n description?: string\n chineseName?: string\n children?: IParam[]\n [key: string]: any\n}\n\nexport const DEFAULT_METHOD = 'GET'\n\nexport const requestList = [\n {\n key: 'params',\n name: '请求参数'\n },\n {\n key: 'body',\n name: '请求报文体'\n },\n {\n key: 'headers',\n name: '请求头'\n }\n]\n\nexport const bodyList = [\n {\n key: 'none',\n name: 'none'\n },\n {\n key: 'form-data',\n name: 'form-data'\n },\n {\n key: 'x-www-form-urlencoded',\n name: 'x-www-form-urlencoded'\n },\n {\n key: 'json',\n name: 'json'\n },\n {\n key: 'xml',\n name: 'xml'\n },\n {\n key: 'raw',\n name: 'raw'\n }\n]\n\nexport const apiComponentProps = buildProps({\n url: {\n type: String,\n default: ''\n },\n method: {\n type: definePropType<IMethod>(String),\n default: DEFAULT_METHOD\n },\n requestParams: {\n type: definePropType<IParam[]>(Array),\n default: () => [] as IParam[]\n },\n headerParams: {\n type: definePropType<IParam[]>(Array),\n default: () => [] as IParam[]\n },\n bodyParams: {\n type: Object,\n default: () => ({\n none: null,\n 'form-data': [],\n json: [],\n xml: [],\n raw: '',\n 'x-www-form-urlencoded': []\n })\n }\n} as const)\n\n// props\nexport type ApiComponentProps = ExtractPropTypes<typeof apiComponentProps>\n\n// emits\
|
|
1
|
+
{"version":3,"file":"api-component.mjs","sources":["../../../../../../packages/components/api-component/src/config/api-component.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nimport type ApiComponent from '../api-component.vue'\n\nexport type IMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'\n\nexport type IValueType =\n | 'string'\n | 'integer'\n | 'boolean'\n | 'number'\n | 'array'\n | null\n | any\n\nexport interface IParam {\n required?: boolean\n name?: string\n value?: string\n type?: IValueType\n static?: boolean\n contentType?: string\n description?: string\n chineseName?: string\n children?: IParam[]\n [key: string]: any\n}\n\nexport const DEFAULT_METHOD = 'GET'\n\nexport const requestList = [\n {\n key: 'params',\n name: '请求参数'\n },\n {\n key: 'body',\n name: '请求报文体'\n },\n {\n key: 'headers',\n name: '请求头'\n }\n]\n\nexport const bodyList = [\n {\n key: 'none',\n name: 'none'\n },\n {\n key: 'form-data',\n name: 'form-data'\n },\n {\n key: 'x-www-form-urlencoded',\n name: 'x-www-form-urlencoded'\n },\n {\n key: 'json',\n name: 'json'\n },\n {\n key: 'xml',\n name: 'xml'\n },\n {\n key: 'raw',\n name: 'raw'\n }\n]\n\nexport interface IApiParams {\n url?: string\n method?: IMethod\n requestParams?: IParam[]\n headerParams?: IParam[]\n bodyParams?: Record<string, any>\n}\n\nexport const apiComponentProps = buildProps({\n url: {\n type: String,\n default: ''\n },\n method: {\n type: definePropType<IMethod>(String),\n default: DEFAULT_METHOD\n },\n requestParams: {\n type: definePropType<IParam[]>(Array),\n default: () => [] as IParam[]\n },\n headerParams: {\n type: definePropType<IParam[]>(Array),\n default: () => [] as IParam[]\n },\n bodyParams: {\n type: Object,\n default: () => ({\n none: null,\n 'form-data': [],\n json: [],\n xml: [],\n raw: '',\n 'x-www-form-urlencoded': []\n })\n }\n} as const)\n\nexport const apiComponentEmits = {\n change: (value: Record<string, any>) => !!value\n}\n// props\nexport type ApiComponentProps = ExtractPropTypes<typeof apiComponentProps>\n\n// emits\nexport type ApiComponentEmits = typeof apiComponentEmits\n\n// instance\nexport type ApiComponentInstance = InstanceType<typeof ApiComponent>\n"],"names":[],"mappings":";;;;AA8BO,MAAM,cAAiB,GAAA,MAAA;AAEvB,MAAM,WAAc,GAAA;AAAA,EACzB;AAAA,IACE,GAAK,EAAA,QAAA;AAAA,IACL,IAAM,EAAA,0BAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,MAAA;AAAA,IACL,IAAM,EAAA,gCAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,SAAA;AAAA,IACL,IAAM,EAAA,oBAAA;AAAA,GACR;AACF,EAAA;AAEO,MAAM,QAAW,GAAA;AAAA,EACtB;AAAA,IACE,GAAK,EAAA,MAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,WAAA;AAAA,IACL,IAAM,EAAA,WAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,uBAAA;AAAA,IACL,IAAM,EAAA,uBAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,MAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,KAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,GAAK,EAAA,KAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,GACR;AACF,EAAA;AAUO,MAAM,oBAAoB,UAAW,CAAA;AAAA,EAC1C,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,eAAwB,MAAM,CAAA;AAAA,IACpC,OAAS,EAAA,cAAA;AAAA,GACX;AAAA,EACA,aAAe,EAAA;AAAA,IACb,IAAA,EAAM,eAAyB,KAAK,CAAA;AAAA,IACpC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAA,EAAM,eAAyB,KAAK,CAAA;AAAA,IACpC,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO;AAAA,MACd,IAAM,EAAA,IAAA;AAAA,MACN,aAAa,EAAC;AAAA,MACd,MAAM,EAAC;AAAA,MACP,KAAK,EAAC;AAAA,MACN,GAAK,EAAA,EAAA;AAAA,MACL,yBAAyB,EAAC;AAAA,KAC5B,CAAA;AAAA,GACF;AACF,CAAU,EAAA;AAEH,MAAM,iBAAoB,GAAA;AAAA,EAC/B,MAAQ,EAAA,CAAC,KAA+B,KAAA,CAAC,CAAC,KAAA;AAC5C;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_METHOD, apiComponentProps, bodyList, requestList } from './api-component.mjs';
|
|
1
|
+
export { DEFAULT_METHOD, apiComponentEmits, apiComponentProps, bodyList, requestList } from './api-component.mjs';
|
|
2
2
|
export { apiModalEmits, apiModalProps } from './api-modal.mjs';
|
|
3
3
|
export { apiUrlEmits, methods } from './api-url.mjs';
|
|
4
4
|
export { batchEditingEmits, batchEditingOptions, batchEditingProps } from './batch-editing.mjs';
|