ll-plus 2.3.5 → 2.3.6
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/component.mjs +2 -0
- package/es/component.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs +0 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs +0 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs.map +1 -1
- package/es/components/api-component/index.d.ts +130 -49
- package/es/components/api-component/index.mjs +1 -1
- package/es/components/api-component/src/api-component.vue.d.ts +136 -54
- package/es/components/api-component/src/api-component.vue2.mjs +130 -78
- 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 +47 -49
- package/es/components/api-component/src/components/api-url.vue2.mjs +24 -17
- 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 +95 -83
- package/es/components/api-component/src/components/params-table-row.vue2.mjs.map +1 -1
- package/es/components/api-component/src/components/params-table.vue2.mjs +43 -28
- 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 +22 -0
- package/es/components/api-component/src/config/api-component.mjs +21 -0
- package/es/components/api-component/src/config/api-component.mjs.map +1 -1
- package/es/components/api-component/src/config/api-url.d.ts +16 -2
- package/es/components/api-component/src/config/api-url.mjs +11 -3
- package/es/components/api-component/src/config/api-url.mjs.map +1 -1
- package/es/components/api-component/src/config/index.mjs +1 -1
- package/es/components/api-component/src/config/table.mjs +1 -1
- package/es/components/api-component/src/config/table.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +3 -1
- package/es/components/index.mjs.map +1 -1
- package/es/components/tag-group/src/tag-group.vue2.mjs +0 -1
- package/es/components/tag-group/src/tag-group.vue2.mjs.map +1 -1
- package/es/components/upload-image/index.d.ts +130 -0
- package/es/components/upload-image/index.mjs +10 -0
- package/es/components/upload-image/index.mjs.map +1 -0
- package/es/components/upload-image/src/upload-image.d.ts +40 -0
- package/es/components/upload-image/src/upload-image.mjs +46 -0
- package/es/components/upload-image/src/upload-image.mjs.map +1 -0
- package/es/components/upload-image/src/upload-image.vue.d.ts +125 -0
- package/es/components/upload-image/src/upload-image.vue.mjs +8 -0
- package/es/components/upload-image/src/upload-image.vue.mjs.map +1 -0
- package/es/components/upload-image/src/upload-image.vue2.mjs +220 -0
- package/es/components/upload-image/src/upload-image.vue2.mjs.map +1 -0
- package/es/index.mjs +3 -1
- package/es/index.mjs.map +1 -1
- package/es/utils/file.d.ts +7 -0
- package/es/utils/file.mjs +23 -0
- package/es/utils/file.mjs.map +1 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/index.mjs.map +1 -1
- package/index.full.js +800 -413
- package/index.full.min.js +23 -23
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +24 -24
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +799 -416
- package/lib/component.js +4 -2
- package/lib/component.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js +0 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js +0 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js.map +1 -1
- package/lib/components/api-component/index.d.ts +130 -49
- 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 +136 -54
- package/lib/components/api-component/src/api-component.vue2.js +129 -77
- 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 +47 -49
- package/lib/components/api-component/src/components/api-url.vue2.js +23 -16
- 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 +95 -83
- package/lib/components/api-component/src/components/params-table-row.vue2.js.map +1 -1
- package/lib/components/api-component/src/components/params-table.vue2.js +43 -28
- 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 +22 -0
- package/lib/components/api-component/src/config/api-component.js +21 -0
- package/lib/components/api-component/src/config/api-component.js.map +1 -1
- package/lib/components/api-component/src/config/api-url.d.ts +16 -2
- package/lib/components/api-component/src/config/api-url.js +11 -2
- package/lib/components/api-component/src/config/api-url.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/api-component/src/config/table.js +1 -1
- package/lib/components/api-component/src/config/table.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +8 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/tag-group/src/tag-group.vue2.js +0 -1
- package/lib/components/tag-group/src/tag-group.vue2.js.map +1 -1
- package/lib/components/upload-image/index.d.ts +130 -0
- package/lib/components/upload-image/index.js +17 -0
- package/lib/components/upload-image/index.js.map +1 -0
- package/lib/components/upload-image/src/upload-image.d.ts +40 -0
- package/lib/components/upload-image/src/upload-image.js +49 -0
- package/lib/components/upload-image/src/upload-image.js.map +1 -0
- package/lib/components/upload-image/src/upload-image.vue.d.ts +125 -0
- package/lib/components/upload-image/src/upload-image.vue.js +12 -0
- package/lib/components/upload-image/src/upload-image.vue.js.map +1 -0
- package/lib/components/upload-image/src/upload-image.vue2.js +224 -0
- package/lib/components/upload-image/src/upload-image.vue2.js.map +1 -0
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/file.d.ts +7 -0
- package/lib/utils/file.js +26 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css/api-component.css +1 -1
- package/theme-chalk/css/easy-cron.css +1 -1
- package/theme-chalk/css/index.css +1 -1
- package/theme-chalk/css/upload-image.css +1 -0
- package/types/packages/components/api-component/index.d.ts +130 -49
- package/types/packages/components/api-component/src/api-component.vue.d.ts +136 -54
- package/types/packages/components/api-component/src/components/api-url.vue.d.ts +47 -49
- package/types/packages/components/api-component/src/config/api-component.d.ts +22 -0
- package/types/packages/components/api-component/src/config/api-url.d.ts +16 -2
- package/types/packages/components/index.d.ts +1 -0
- package/types/packages/components/upload-image/index.d.ts +130 -0
- package/types/packages/components/upload-image/src/upload-image.d.ts +40 -0
- package/types/packages/components/upload-image/src/upload-image.vue.d.ts +125 -0
- package/types/packages/utils/file.d.ts +7 -0
- package/types/packages/utils/index.d.ts +1 -0
|
@@ -1,62 +1,60 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
readonly
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
none: null;
|
|
9
|
-
'form-data': never[];
|
|
10
|
-
json: never[];
|
|
11
|
-
xml: never[];
|
|
12
|
-
raw: string;
|
|
13
|
-
'x-www-form-urlencoded': never[];
|
|
14
|
-
}, boolean>;
|
|
2
|
+
readonly value: {
|
|
3
|
+
readonly type: import("vue").PropType<any>;
|
|
4
|
+
readonly required: false;
|
|
5
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
6
|
+
__epPropKey: true;
|
|
7
|
+
};
|
|
15
8
|
}, {
|
|
16
9
|
props: import("@vue/shared").LooseRequired<{
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
readonly value?: any;
|
|
11
|
+
readonly onChange?: ((params: {
|
|
12
|
+
method: import("../config").IMethod;
|
|
13
|
+
url: string;
|
|
14
|
+
}) => any) | undefined;
|
|
15
|
+
readonly "onUpdate:value"?: ((params: {
|
|
16
|
+
method: import("../config").IMethod;
|
|
17
|
+
url: string;
|
|
18
|
+
}) => any) | undefined;
|
|
25
19
|
} & {}>;
|
|
26
|
-
emits: ((event: "
|
|
20
|
+
emits: ((event: "change", params: {
|
|
21
|
+
method: import("../config").IMethod;
|
|
22
|
+
url: string;
|
|
23
|
+
}) => void) & ((event: "update:value", params: {
|
|
24
|
+
method: import("../config").IMethod;
|
|
25
|
+
url: string;
|
|
26
|
+
}) => void);
|
|
27
27
|
disabled: unknown;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
innerValue: import("vue").Ref<any>;
|
|
29
|
+
handleChange: () => void;
|
|
30
30
|
readonly methods: {
|
|
31
31
|
label: string;
|
|
32
32
|
value: string;
|
|
33
33
|
}[];
|
|
34
34
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
'update:value': (params: {
|
|
36
|
+
method: import("../config").IMethod;
|
|
37
|
+
url: string;
|
|
38
|
+
}) => boolean;
|
|
39
|
+
change: (params: {
|
|
40
|
+
method: import("../config").IMethod;
|
|
41
|
+
url: string;
|
|
42
|
+
}) => boolean;
|
|
37
43
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
-
readonly
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
none: null;
|
|
45
|
-
'form-data': never[];
|
|
46
|
-
json: never[];
|
|
47
|
-
xml: never[];
|
|
48
|
-
raw: string;
|
|
49
|
-
'x-www-form-urlencoded': never[];
|
|
50
|
-
}, boolean>;
|
|
44
|
+
readonly value: {
|
|
45
|
+
readonly type: import("vue").PropType<any>;
|
|
46
|
+
readonly required: false;
|
|
47
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
48
|
+
__epPropKey: true;
|
|
49
|
+
};
|
|
51
50
|
}>> & {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, {}>;
|
|
51
|
+
onChange?: ((params: {
|
|
52
|
+
method: import("../config").IMethod;
|
|
53
|
+
url: string;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
"onUpdate:value"?: ((params: {
|
|
56
|
+
method: import("../config").IMethod;
|
|
57
|
+
url: string;
|
|
58
|
+
}) => any) | undefined;
|
|
59
|
+
}, {}, {}>;
|
|
62
60
|
export default _default;
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createVNode, unref } from 'vue';
|
|
2
2
|
import '../config/index.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import { apiUrlEmits, methods } from '../config/api-url.mjs';
|
|
3
|
+
import { apiUrlProps, apiUrlEmits, methods } from '../config/api-url.mjs';
|
|
5
4
|
|
|
6
5
|
"use strict";
|
|
7
6
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
7
|
__name: "api-url",
|
|
9
|
-
props:
|
|
8
|
+
props: apiUrlProps,
|
|
10
9
|
emits: apiUrlEmits,
|
|
11
10
|
setup(__props, { emit: __emit }) {
|
|
12
11
|
const props = __props;
|
|
13
12
|
const emits = __emit;
|
|
14
13
|
const disabled = inject("disabled");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
emits("update:
|
|
19
|
-
}
|
|
20
|
-
watch(
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const innerValue = ref(props.value);
|
|
15
|
+
const handleChange = () => {
|
|
16
|
+
emits("change", innerValue.value);
|
|
17
|
+
emits("update:value", innerValue.value);
|
|
18
|
+
};
|
|
19
|
+
watch(
|
|
20
|
+
() => props.value,
|
|
21
|
+
(val) => {
|
|
22
|
+
innerValue.value = val;
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
deep: true
|
|
26
|
+
}
|
|
27
|
+
);
|
|
23
28
|
return (_ctx, _cache) => {
|
|
24
29
|
const _component_ll_select = resolveComponent("ll-select");
|
|
25
30
|
const _component_ll_input = resolveComponent("ll-input");
|
|
@@ -27,18 +32,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
32
|
return openBlock(), createBlock(_component_a_input_group, { compact: "" }, {
|
|
28
33
|
default: withCtx(() => [
|
|
29
34
|
createVNode(_component_ll_select, {
|
|
30
|
-
value:
|
|
31
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) =>
|
|
35
|
+
value: innerValue.value.method,
|
|
36
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerValue.value.method = $event),
|
|
32
37
|
disabled: unref(disabled),
|
|
33
38
|
options: unref(methods),
|
|
34
|
-
style: { "width": "150px" }
|
|
39
|
+
style: { "width": "150px" },
|
|
40
|
+
onChange: handleChange
|
|
35
41
|
}, null, 8, ["value", "disabled", "options"]),
|
|
36
42
|
createVNode(_component_ll_input, {
|
|
37
|
-
value:
|
|
38
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) =>
|
|
43
|
+
value: innerValue.value.url,
|
|
44
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => innerValue.value.url = $event),
|
|
39
45
|
disabled: unref(disabled),
|
|
40
46
|
style: { "width": "50%" },
|
|
41
|
-
placeholder: "\u8BF7\u8F93\u5165\u5730\u5740\uFF08\u53BB\u9664\u524D\u7F6EURL)"
|
|
47
|
+
placeholder: "\u8BF7\u8F93\u5165\u5730\u5740\uFF08\u53BB\u9664\u524D\u7F6EURL)",
|
|
48
|
+
onInput: handleChange
|
|
42
49
|
}, null, 8, ["value", "disabled"])
|
|
43
50
|
]),
|
|
44
51
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-url.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/api-url.vue"],"sourcesContent":["<template>\n <a-input-group compact>\n <ll-select\n v-model:value=\"method\"\n :disabled=\"disabled\"\n :options=\"methods\"\n style=\"width: 150px\"\n />\n <ll-input\n v-model:value=\"url\"\n :disabled=\"disabled\"\n style=\"width: 50%\"\n placeholder=\"请输入地址(去除前置URL)\"\n />\n </a-input-group>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref,
|
|
1
|
+
{"version":3,"file":"api-url.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/api-url.vue"],"sourcesContent":["<template>\n <a-input-group compact>\n <ll-select\n v-model:value=\"innerValue.method\"\n :disabled=\"disabled\"\n :options=\"methods\"\n style=\"width: 150px\"\n @change=\"handleChange\"\n />\n <ll-input\n v-model:value=\"innerValue.url\"\n :disabled=\"disabled\"\n style=\"width: 50%\"\n placeholder=\"请输入地址(去除前置URL)\"\n @input=\"handleChange\"\n />\n </a-input-group>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, inject, watch } from 'vue'\nimport { methods, apiUrlProps, apiUrlEmits } from '../config'\n\nconst props = defineProps(apiUrlProps)\nconst emits = defineEmits(apiUrlEmits)\n\nconst disabled = inject('disabled')\n\nconst innerValue = ref(props.value)\n\nconst handleChange = () => {\n emits('change', innerValue.value)\n emits('update:value', innerValue.value)\n}\n\nwatch(\n () => props.value,\n val => {\n innerValue.value = val\n },\n {\n deep: true\n }\n)\n</script>\n\n<style scoped></style>\n"],"names":[],"mappings":";;;;;;;;;;AAuBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,QAAA,GAAW,OAAO,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,UAAA,GAAa,GAAI,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAElC,IAAA,MAAM,eAAe,MAAM;AACzB,MAAM,KAAA,CAAA,QAAA,EAAU,WAAW,KAAK,CAAA,CAAA;AAChC,MAAM,KAAA,CAAA,cAAA,EAAgB,WAAW,KAAK,CAAA,CAAA;AAAA,KACxC,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAO,GAAA,KAAA;AACL,QAAA,UAAA,CAAW,KAAQ,GAAA,GAAA,CAAA;AAAA,OACrB;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,98 +27,110 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
const _component_ll_switch = resolveComponent("ll-switch");
|
|
28
28
|
const _component_a_auto_complete = resolveComponent("a-auto-complete");
|
|
29
29
|
const _component_a_col = resolveComponent("a-col");
|
|
30
|
-
const _component_a_popconfirm = resolveComponent("a-popconfirm");
|
|
31
30
|
const _component_a_row = resolveComponent("a-row");
|
|
31
|
+
const _component_a_popconfirm = resolveComponent("a-popconfirm");
|
|
32
32
|
return openBlock(), createElementBlock("div", null, [
|
|
33
33
|
createVNode(_component_a_row, {
|
|
34
34
|
gutter: 20,
|
|
35
35
|
class: normalizeClass(unref(bem).e("table-row"))
|
|
36
36
|
}, {
|
|
37
37
|
default: withCtx(() => [
|
|
38
|
-
(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
renderList(props.columns, (col, index) => {
|
|
42
|
-
return openBlock(), createBlock(_component_a_col, {
|
|
43
|
-
key: index,
|
|
44
|
-
span: col.span || 24 / props.columns.length,
|
|
45
|
-
class: normalizeClass(unref(bem).e("table-col"))
|
|
46
|
-
}, {
|
|
38
|
+
createVNode(_component_a_col, { span: 22 }, {
|
|
39
|
+
default: withCtx(() => [
|
|
40
|
+
createVNode(_component_a_row, { gutter: 20 }, {
|
|
47
41
|
default: withCtx(() => [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
42
|
+
(openBlock(true), createElementBlock(
|
|
43
|
+
Fragment,
|
|
44
|
+
null,
|
|
45
|
+
renderList(props.columns, (col, index) => {
|
|
46
|
+
return openBlock(), createBlock(_component_a_col, {
|
|
47
|
+
key: index,
|
|
48
|
+
span: col.span || 24 / props.columns.length,
|
|
49
|
+
class: normalizeClass(unref(bem).e("table-col"))
|
|
50
|
+
}, {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
col.key === "name" ? (openBlock(), createBlock(_component_ll_input, {
|
|
53
|
+
key: 0,
|
|
54
|
+
value: innerData.value.name,
|
|
55
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerData.value.name = $event),
|
|
56
|
+
disabled: unref(disabled),
|
|
57
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
58
|
+
}, null, 8, ["value", "disabled"])) : createCommentVNode("v-if", true),
|
|
59
|
+
col.key === "required" ? (openBlock(), createBlock(_component_ll_button, {
|
|
60
|
+
key: 1,
|
|
61
|
+
type: "link",
|
|
62
|
+
disabled: unref(disabled),
|
|
63
|
+
class: normalizeClass(`${unref(bem).m("required")} ${innerData.value.required ? unref(bem).is("required") : ""}`),
|
|
64
|
+
onClick: _cache[1] || (_cache[1] = ($event) => innerData.value.required = !innerData.value.required)
|
|
65
|
+
}, {
|
|
66
|
+
default: withCtx(() => [
|
|
67
|
+
withDirectives(createVNode(
|
|
68
|
+
_component_ll_icon,
|
|
69
|
+
{ "icon-name": "icon-radio-check" },
|
|
70
|
+
null,
|
|
71
|
+
512
|
|
72
|
+
/* NEED_PATCH */
|
|
73
|
+
), [
|
|
74
|
+
[vShow, innerData.value.required]
|
|
75
|
+
])
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
/* STABLE */
|
|
79
|
+
}, 8, ["disabled", "class"])) : createCommentVNode("v-if", true),
|
|
80
|
+
col.key === "type" ? (openBlock(), createBlock(_component_ll_select, {
|
|
81
|
+
key: 2,
|
|
82
|
+
value: innerData.value.type,
|
|
83
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => innerData.value.type = $event),
|
|
84
|
+
options: unref(paramsOptions),
|
|
85
|
+
disabled: unref(disabled),
|
|
86
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
87
|
+
style: { "width": "100%" }
|
|
88
|
+
}, null, 8, ["value", "options", "disabled"])) : createCommentVNode("v-if", true),
|
|
89
|
+
col.key === "value" ? (openBlock(), createBlock(ClickInput, {
|
|
90
|
+
key: 3,
|
|
91
|
+
value: innerData.value.value,
|
|
92
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => innerData.value.value = $event),
|
|
93
|
+
type: "code",
|
|
94
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
95
|
+
style: { "width": "100%" }
|
|
96
|
+
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
97
|
+
col.key === "static" ? (openBlock(), createBlock(_component_ll_switch, {
|
|
98
|
+
key: 4,
|
|
99
|
+
value: innerData.value[col.key],
|
|
100
|
+
"onUpdate:value": ($event) => innerData.value[col.key] = $event,
|
|
101
|
+
disabled: unref(disabled)
|
|
102
|
+
}, null, 8, ["value", "onUpdate:value", "disabled"])) : createCommentVNode("v-if", true),
|
|
103
|
+
col.key === "description" ? (openBlock(), createBlock(_component_ll_input, {
|
|
104
|
+
key: 5,
|
|
105
|
+
value: innerData.value[col.key],
|
|
106
|
+
"onUpdate:value": ($event) => innerData.value[col.key] = $event,
|
|
107
|
+
placeholder: col.placeholder || "\u8BF7\u8F93\u5165",
|
|
108
|
+
disabled: unref(disabled)
|
|
109
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder", "disabled"])) : createCommentVNode("v-if", true),
|
|
110
|
+
col.key === "contentType" ? (openBlock(), createBlock(_component_a_auto_complete, {
|
|
111
|
+
key: 6,
|
|
112
|
+
value: innerData.value[col.key],
|
|
113
|
+
"onUpdate:value": ($event) => innerData.value[col.key] = $event,
|
|
114
|
+
disabled: unref(disabled),
|
|
115
|
+
options: unref(contentTypeOptions),
|
|
116
|
+
placeholder: col.placeholder || "\u8BF7\u8F93\u5165"
|
|
117
|
+
}, null, 8, ["value", "onUpdate:value", "disabled", "options", "placeholder"])) : createCommentVNode("v-if", true)
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
/* DYNAMIC */
|
|
121
|
+
}, 1032, ["span", "class"]);
|
|
122
|
+
}),
|
|
123
|
+
128
|
|
124
|
+
/* KEYED_FRAGMENT */
|
|
125
|
+
))
|
|
114
126
|
]),
|
|
115
|
-
_:
|
|
116
|
-
/*
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/*
|
|
121
|
-
)
|
|
127
|
+
_: 1
|
|
128
|
+
/* STABLE */
|
|
129
|
+
})
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
/* STABLE */
|
|
133
|
+
}),
|
|
122
134
|
createVNode(_component_a_col, {
|
|
123
135
|
span: 2,
|
|
124
136
|
class: normalizeClass(unref(bem).e("table-col"))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params-table-row.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/params-table-row.vue"],"sourcesContent":["<template>\n <div>\n <a-row :gutter=\"20\" :class=\"bem.e('table-row')\">\n <a-col\n v-for=\"(col, index) in props.columns\"\n
|
|
1
|
+
{"version":3,"file":"params-table-row.vue2.mjs","sources":["../../../../../../packages/components/api-component/src/components/params-table-row.vue"],"sourcesContent":["<template>\n <div>\n <a-row :gutter=\"20\" :class=\"bem.e('table-row')\">\n <a-col :span=\"22\">\n <a-row :gutter=\"20\">\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=\"innerData.name\"\n :disabled=\"disabled\"\n placeholder=\"请输入\"\n />\n </template>\n <template v-if=\"col.key === 'required'\">\n <ll-button\n type=\"link\"\n :disabled=\"disabled\"\n :class=\"`${bem.m('required')} ${\n innerData.required ? bem.is('required') : ''\n }`\"\n @click=\"innerData.required = !innerData.required\"\n >\n <ll-icon\n v-show=\"innerData.required\"\n icon-name=\"icon-radio-check\"\n />\n </ll-button>\n </template>\n\n <template v-if=\"col.key === 'type'\">\n <ll-select\n v-model:value=\"innerData.type\"\n :options=\"paramsOptions\"\n :disabled=\"disabled\"\n placeholder=\"请选择\"\n style=\"width: 100%\"\n />\n </template>\n <template v-if=\"col.key === 'value'\">\n <click-input\n v-model:value=\"innerData.value\"\n type=\"code\"\n placeholder=\"请输入\"\n style=\"width: 100%\"\n />\n </template>\n <template v-if=\"col.key === 'static'\">\n <ll-switch\n v-model:value=\"innerData[col.key]\"\n :disabled=\"disabled\"\n />\n </template>\n\n <template v-if=\"col.key === 'description'\">\n <ll-input\n v-model:value=\"innerData[col.key]\"\n :placeholder=\"col.placeholder || '请输入'\"\n :disabled=\"disabled\"\n />\n </template>\n <template v-if=\"col.key === 'contentType'\">\n <a-auto-complete\n v-model:value=\"innerData[col.key]\"\n :disabled=\"disabled\"\n :options=\"contentTypeOptions\"\n :placeholder=\"col.placeholder || '请输入'\"\n />\n </template>\n </a-col>\n </a-row>\n </a-col>\n <a-col :span=\"2\" :class=\"bem.e('table-col')\">\n <a-popconfirm\n title=\"你确定要移除吗?\"\n ok-text=\"确认\"\n cancel-text=\"取消\"\n placement=\"topRight\"\n :disabled=\"disabled\"\n :overlay-class-name=\"bem.e('popconfirm')\"\n @confirm=\"handleDelete(props.dataSource, innerData)\"\n >\n <ll-button type=\"link\" :disabled=\"disabled\">\n <ll-icon icon-name=\"icon-remove\" />\n </ll-button>\n </a-popconfirm>\n </a-col>\n </a-row>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, inject } from 'vue'\n// paramsTableRowEmits\nimport {\n paramsTableRowProps,\n paramsOptions,\n contentTypeOptions\n} from '../config'\n\nimport { createNamespace } from '@ll-plus/utils'\n\nimport ClickInput from './click-input.vue'\n\ndefineOptions({ name: 'LlParamsTableRow' })\n\nconst props = defineProps(paramsTableRowProps)\n\n// const emits = defineEmits(paramsTableRowEmits)\n\nconst bem = createNamespace('params-table')\n\nconst disabled = inject('disabled')\n\nconst innerData = ref(props.data)\n\nconst handleDelete = (list, data) => {\n const index = list.findIndex(item => item.name === data.name)\n list.splice(index, 1)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AA8GA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAId,IAAM,MAAA,GAAA,GAAM,gBAAgB,cAAc,CAAA,CAAA;AAE1C,IAAM,MAAA,QAAA,GAAW,OAAO,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAEhC,IAAM,MAAA,YAAA,GAAe,CAAC,IAAA,EAAM,IAAS,KAAA;AACnC,MAAA,MAAM,QAAQ,IAAK,CAAA,SAAA,CAAU,UAAQ,IAAK,CAAA,IAAA,KAAS,KAAK,IAAI,CAAA,CAAA;AAC5D,MAAK,IAAA,CAAA,MAAA,CAAO,OAAO,CAAC,CAAA,CAAA;AAAA,KACtB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -46,42 +46,57 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
gutter: 20
|
|
47
47
|
}, {
|
|
48
48
|
default: withCtx(() => [
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
renderList(props.columns, (col, index) => {
|
|
53
|
-
return openBlock(), createBlock(_component_a_col, {
|
|
54
|
-
key: index,
|
|
55
|
-
span: col.span,
|
|
56
|
-
class: normalizeClass(unref(bem).e("table-header-col"))
|
|
57
|
-
}, {
|
|
49
|
+
createVNode(_component_a_col, { span: 22 }, {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
createVNode(_component_a_row, { gutter: 20 }, {
|
|
58
52
|
default: withCtx(() => [
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
(openBlock(true), createElementBlock(
|
|
54
|
+
Fragment,
|
|
61
55
|
null,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
renderList(props.columns, (col, index) => {
|
|
57
|
+
return openBlock(), createBlock(_component_a_col, {
|
|
58
|
+
key: index,
|
|
59
|
+
span: col.span,
|
|
60
|
+
class: normalizeClass(unref(bem).e("table-header-col"))
|
|
61
|
+
}, {
|
|
62
|
+
default: withCtx(() => [
|
|
63
|
+
createElementVNode(
|
|
64
|
+
"span",
|
|
65
|
+
null,
|
|
66
|
+
toDisplayString(col.title),
|
|
67
|
+
1
|
|
68
|
+
/* TEXT */
|
|
69
|
+
),
|
|
70
|
+
col.key === "static" ? (openBlock(), createBlock(_component_ll_tooltip, {
|
|
71
|
+
key: 0,
|
|
72
|
+
tip: "Content-Type \u5B57\u6BB5\u7528\u4E8E\u6307\u5B9A\u8BF7\u6C42\u90E8\u5206\u7684\u5A92\u4F53\u7C7B\u578B"
|
|
73
|
+
})) : createCommentVNode("v-if", true)
|
|
74
|
+
]),
|
|
75
|
+
_: 2
|
|
76
|
+
/* DYNAMIC */
|
|
77
|
+
}, 1032, ["span", "class"]);
|
|
78
|
+
}),
|
|
79
|
+
128
|
|
80
|
+
/* KEYED_FRAGMENT */
|
|
81
|
+
))
|
|
70
82
|
]),
|
|
71
|
-
_:
|
|
72
|
-
/*
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/*
|
|
77
|
-
)
|
|
78
|
-
createVNode(_component_a_col, {
|
|
83
|
+
_: 1
|
|
84
|
+
/* STABLE */
|
|
85
|
+
})
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
/* STABLE */
|
|
89
|
+
}),
|
|
90
|
+
createVNode(_component_a_col, {
|
|
91
|
+
class: normalizeClass(unref(bem).e("table-header-col")),
|
|
92
|
+
span: 2
|
|
93
|
+
}, {
|
|
79
94
|
default: withCtx(() => [
|
|
80
95
|
createTextVNode(" \u64CD\u4F5C ")
|
|
81
96
|
]),
|
|
82
97
|
_: 1
|
|
83
98
|
/* STABLE */
|
|
84
|
-
})
|
|
99
|
+
}, 8, ["class"])
|
|
85
100
|
]),
|
|
86
101
|
_: 1
|
|
87
102
|
/* STABLE */
|
|
@@ -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
|
|
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 :span=\"22\">\n <a-row :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-row>\n </a-col>\n\n <a-col :class=\"bem.e('table-header-col')\" :span=\"2\"> 操作 </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 :disabled=\"disabled\"\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, inject } 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 disabled = inject('disabled')\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":";;;;;;;;;;;;;AA+DA,IAAM,MAAA,GAAA,GAAM,gBAAgB,cAAc,CAAA,CAAA;AAE1C,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAM,MAAA,QAAA,GAAW,OAAO,UAAU,CAAA,CAAA;AAElC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -44,6 +44,28 @@ export declare const apiComponentProps: {
|
|
|
44
44
|
raw: string;
|
|
45
45
|
'x-www-form-urlencoded': never[];
|
|
46
46
|
}, boolean>;
|
|
47
|
+
readonly isValid: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
48
|
+
readonly rules: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => {
|
|
49
|
+
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
50
|
+
}) | (() => {
|
|
51
|
+
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
52
|
+
} | undefined) | ((new (...args: any[]) => {
|
|
53
|
+
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
54
|
+
}) | (() => {
|
|
55
|
+
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
|
56
|
+
} | undefined))[], unknown, unknown, () => {
|
|
57
|
+
url: ({
|
|
58
|
+
required: boolean;
|
|
59
|
+
trigger: string;
|
|
60
|
+
message: string;
|
|
61
|
+
pattern?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
trigger: string;
|
|
64
|
+
pattern: RegExp;
|
|
65
|
+
message: string;
|
|
66
|
+
required?: undefined;
|
|
67
|
+
})[];
|
|
68
|
+
}, boolean>;
|
|
47
69
|
};
|
|
48
70
|
export declare const apiComponentEmits: {
|
|
49
71
|
change: (value: Record<string, any>) => boolean;
|
|
@@ -74,6 +74,27 @@ const apiComponentProps = buildProps({
|
|
|
74
74
|
raw: "",
|
|
75
75
|
"x-www-form-urlencoded": []
|
|
76
76
|
})
|
|
77
|
+
},
|
|
78
|
+
isValid: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false
|
|
81
|
+
},
|
|
82
|
+
rules: {
|
|
83
|
+
type: definePropType(Object),
|
|
84
|
+
default: () => ({
|
|
85
|
+
url: [
|
|
86
|
+
{
|
|
87
|
+
required: true,
|
|
88
|
+
trigger: "blur",
|
|
89
|
+
message: "\u8BF7\u8F93\u5165url"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
trigger: "change",
|
|
93
|
+
pattern: /^(http|https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w .-]*)*\/?$/,
|
|
94
|
+
message: "\u8F93\u5165url\u683C\u5F0F\u9519\u8BEF"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
})
|
|
77
98
|
}
|
|
78
99
|
});
|
|
79
100
|
const apiComponentEmits = {
|