sun-card-design 1.1.41 → 1.1.43
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/dist/mobile/sun-card-design-mobile.es21.js +3 -2
- package/dist/mobile/sun-card-design-mobile.es23.js +3 -2
- package/dist/mobile/sun-card-design-mobile.es25.js +6 -6
- package/dist/mobile/sun-card-design-mobile.es32.js +1 -1
- package/dist/mobile/sun-card-design-mobile.es51.js +4 -0
- package/dist/mobile/sun-card-design-mobile.es56.js +207 -45
- package/dist/mobile/sun-card-design-mobile.es57.js +45 -207
- package/dist/mobile/sun-card-design-mobile.es58.js +70 -47
- package/dist/mobile/sun-card-design-mobile.es59.js +20 -9
- package/dist/mobile/sun-card-design-mobile.es60.js +7 -7
- package/dist/mobile/sun-card-design-mobile.es61.js +5 -5
- package/dist/mobile/sun-card-design-mobile.es62.js +5 -5
- package/dist/mobile/sun-card-design-mobile.es63.js +98 -0
- package/dist/pc/sun-card-design-pc.es21.js +3 -2
- package/dist/pc/sun-card-design-pc.es23.js +3 -2
- package/dist/pc/sun-card-design-pc.es25.js +6 -6
- package/dist/pc/sun-card-design-pc.es32.js +1 -1
- package/dist/pc/sun-card-design-pc.es51.js +4 -0
- package/dist/pc/sun-card-design-pc.es56.js +207 -45
- package/dist/pc/sun-card-design-pc.es57.js +47 -70
- package/dist/pc/sun-card-design-pc.es58.js +9 -20
- package/dist/pc/sun-card-design-pc.es59.js +7 -7
- package/dist/pc/sun-card-design-pc.es60.js +5 -5
- package/dist/pc/sun-card-design-pc.es61.js +98 -0
- package/dist/public/sun-card-design.css +1 -1
- package/package.json +1 -1
- package/dist/mobile/sun-card-design-mobile.es55.js +0 -226
- package/dist/pc/sun-card-design-pc.es55.js +0 -226
- /package/dist/mobile/{sun-card-design-mobile.es65.js → sun-card-design-mobile.es66.js} +0 -0
- /package/dist/pc/{sun-card-design-pc.es65.js → sun-card-design-pc.es66.js} +0 -0
|
@@ -1,87 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { markRaw, defineComponent, h, computed, createElementBlock, openBlock, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
|
|
2
|
+
import * as Icons from "@ant-design/icons-vue";
|
|
3
|
+
import { customIcon } from "./sun-card-design-pc.es66.js";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
5
6
|
const _sfc_main = {
|
|
6
|
-
__name: "
|
|
7
|
-
props: ["record"
|
|
8
|
-
emits: ["clickEvent"
|
|
7
|
+
__name: "sunIconComp",
|
|
8
|
+
props: ["record"],
|
|
9
|
+
emits: ["clickEvent"],
|
|
9
10
|
setup(__props, { emit: __emit }) {
|
|
10
11
|
const props = __props;
|
|
11
12
|
const emit = __emit;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
const customIconComponents = Object.entries(customIcon || {}).reduce((acc, [key, svg]) => {
|
|
14
|
+
const normalized = svg.replace(/fill="#000000"/gi, 'fill="currentColor"');
|
|
15
|
+
acc[key] = markRaw(
|
|
16
|
+
defineComponent({
|
|
17
|
+
name: `CustomIcon${key}`,
|
|
18
|
+
setup() {
|
|
19
|
+
return () => h("span", { innerHTML: normalized });
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
return acc;
|
|
24
|
+
}, {});
|
|
25
|
+
const iconMap = { ...Icons, ...customIconComponents };
|
|
26
|
+
const iconComponent = computed(() => {
|
|
27
|
+
const name = props?.record?.options?.style?.iconName || "CheckCircleOutlined";
|
|
28
|
+
return iconMap[name] || Icons["CheckCircleOutlined"];
|
|
29
|
+
});
|
|
30
|
+
const iconStyle = computed(() => {
|
|
31
|
+
const color = props?.record?.options?.style?.color || "#000000";
|
|
32
|
+
const justifyContent = props?.record?.options?.style?.justifyContent || "flex-start";
|
|
33
|
+
return {
|
|
34
|
+
color,
|
|
35
|
+
display: "flex",
|
|
36
|
+
justifyContent,
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
width: "100%"
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
function onClick() {
|
|
42
|
+
if (props.record.options.clickEvent) {
|
|
43
|
+
emit("clickEvent", props.record);
|
|
25
44
|
}
|
|
26
|
-
return props.recordData.config.background;
|
|
27
|
-
};
|
|
28
|
-
function isGradientColor(color) {
|
|
29
|
-
return /^(linear|radial)-gradient\(.*\)$/.test(color);
|
|
30
45
|
}
|
|
31
46
|
return (_ctx, _cache) => {
|
|
32
|
-
const _component_a_col = resolveComponent("a-col");
|
|
33
|
-
const _component_a_row = resolveComponent("a-row");
|
|
34
47
|
return openBlock(), createElementBlock("div", {
|
|
35
|
-
class: "main-
|
|
36
|
-
style: normalizeStyle({
|
|
48
|
+
class: "main-icon",
|
|
49
|
+
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
37
50
|
}, [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
key: index.toString(),
|
|
45
|
-
flex: props.record.columns[index]?.flex,
|
|
46
|
-
span: 24
|
|
47
|
-
}, {
|
|
48
|
-
default: withCtx(() => [
|
|
49
|
-
createElementVNode("div", {
|
|
50
|
-
class: "box",
|
|
51
|
-
style: normalizeStyle({
|
|
52
|
-
background: props.record.options.style?.background,
|
|
53
|
-
border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
|
|
54
|
-
borderRadius: props.record.options.style?.borderRadius + "px",
|
|
55
|
-
padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
|
|
56
|
-
justifyContent: props.record.options.style?.alignItems || "start",
|
|
57
|
-
minHeight: props.record.options.style?.minHeight + "px" || "48px",
|
|
58
|
-
boxShadow: props.record.options.style?.boxShadow || null
|
|
59
|
-
})
|
|
60
|
-
}, [
|
|
61
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
|
|
62
|
-
return openBlock(), createBlock(FormItem, {
|
|
63
|
-
record: element,
|
|
64
|
-
key: index2,
|
|
65
|
-
recordData: props.recordData,
|
|
66
|
-
columnsIndex: props.columnsIndex,
|
|
67
|
-
onClickEvent: onClick,
|
|
68
|
-
onFileUpdateEvent: onUpdate,
|
|
69
|
-
onClickColumnsEvent: onClickColumns
|
|
70
|
-
}, null, 8, ["record", "recordData", "columnsIndex"]);
|
|
71
|
-
}), 128))
|
|
72
|
-
], 4)
|
|
73
|
-
]),
|
|
74
|
-
_: 2
|
|
75
|
-
}, 1032, ["flex"]);
|
|
76
|
-
}), 128))
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 8, ["gutter"])
|
|
51
|
+
createElementVNode("span", {
|
|
52
|
+
style: normalizeStyle(iconStyle.value),
|
|
53
|
+
onClick
|
|
54
|
+
}, [
|
|
55
|
+
(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value), { style: { "height": "18px", "width": "18px" } }))
|
|
56
|
+
], 4)
|
|
80
57
|
], 4);
|
|
81
58
|
};
|
|
82
59
|
}
|
|
83
60
|
};
|
|
84
|
-
const
|
|
61
|
+
const SunIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b920fa7"]]);
|
|
85
62
|
export {
|
|
86
|
-
|
|
63
|
+
SunIcon as default
|
|
87
64
|
};
|
|
@@ -2,20 +2,13 @@ import { resolveComponent, createElementBlock, openBlock, normalizeStyle, create
|
|
|
2
2
|
import FormItem from "./sun-card-design-pc.es25.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
5
|
-
const _hoisted_1 = ["onClick"];
|
|
6
5
|
const _sfc_main = {
|
|
7
|
-
__name: "
|
|
6
|
+
__name: "singleColumn",
|
|
8
7
|
props: ["record", "recordData", "columnsIndex"],
|
|
9
8
|
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
|
|
10
9
|
setup(__props, { emit: __emit }) {
|
|
11
10
|
const props = __props;
|
|
12
11
|
const emit = __emit;
|
|
13
|
-
const getIndex = (index) => {
|
|
14
|
-
if (index !== void 0) {
|
|
15
|
-
return index;
|
|
16
|
-
}
|
|
17
|
-
return props.columnsIndex;
|
|
18
|
-
};
|
|
19
12
|
const onClick = (record) => {
|
|
20
13
|
emit("clickEvent", record);
|
|
21
14
|
};
|
|
@@ -39,7 +32,7 @@ const _sfc_main = {
|
|
|
39
32
|
const _component_a_col = resolveComponent("a-col");
|
|
40
33
|
const _component_a_row = resolveComponent("a-row");
|
|
41
34
|
return openBlock(), createElementBlock("div", {
|
|
42
|
-
class: "main-
|
|
35
|
+
class: "main-singleColumn",
|
|
43
36
|
style: normalizeStyle({ background: getBackground() })
|
|
44
37
|
}, [
|
|
45
38
|
createVNode(_component_a_row, {
|
|
@@ -50,10 +43,7 @@ const _sfc_main = {
|
|
|
50
43
|
return openBlock(), createBlock(_component_a_col, {
|
|
51
44
|
key: index.toString(),
|
|
52
45
|
flex: props.record.columns[index]?.flex,
|
|
53
|
-
span: 24
|
|
54
|
-
style: normalizeStyle({
|
|
55
|
-
flex: props.record.columns[index]?.flex
|
|
56
|
-
})
|
|
46
|
+
span: 24
|
|
57
47
|
}, {
|
|
58
48
|
default: withCtx(() => [
|
|
59
49
|
createElementVNode("div", {
|
|
@@ -66,24 +56,23 @@ const _sfc_main = {
|
|
|
66
56
|
justifyContent: props.record.options.style?.alignItems || "start",
|
|
67
57
|
minHeight: props.record.options.style?.minHeight + "px" || "48px",
|
|
68
58
|
boxShadow: props.record.options.style?.boxShadow || null
|
|
69
|
-
})
|
|
70
|
-
onClick: ($event) => onClickColumns(item)
|
|
59
|
+
})
|
|
71
60
|
}, [
|
|
72
61
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
|
|
73
62
|
return openBlock(), createBlock(FormItem, {
|
|
74
63
|
record: element,
|
|
75
64
|
key: index2,
|
|
76
65
|
recordData: props.recordData,
|
|
77
|
-
columnsIndex:
|
|
66
|
+
columnsIndex: props.columnsIndex,
|
|
78
67
|
onClickEvent: onClick,
|
|
79
68
|
onFileUpdateEvent: onUpdate,
|
|
80
69
|
onClickColumnsEvent: onClickColumns
|
|
81
70
|
}, null, 8, ["record", "recordData", "columnsIndex"]);
|
|
82
71
|
}), 128))
|
|
83
|
-
],
|
|
72
|
+
], 4)
|
|
84
73
|
]),
|
|
85
74
|
_: 2
|
|
86
|
-
}, 1032, ["flex"
|
|
75
|
+
}, 1032, ["flex"]);
|
|
87
76
|
}), 128))
|
|
88
77
|
]),
|
|
89
78
|
_: 1
|
|
@@ -92,7 +81,7 @@ const _sfc_main = {
|
|
|
92
81
|
};
|
|
93
82
|
}
|
|
94
83
|
};
|
|
95
|
-
const
|
|
84
|
+
const SingleColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1fc2bfb4"]]);
|
|
96
85
|
export {
|
|
97
|
-
|
|
86
|
+
SingleColumn as default
|
|
98
87
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode
|
|
1
|
+
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode } from "vue";
|
|
2
2
|
import FormItem from "./sun-card-design-pc.es25.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
5
5
|
const _hoisted_1 = ["onClick"];
|
|
6
6
|
const _sfc_main = {
|
|
7
|
-
__name: "
|
|
7
|
+
__name: "multipleColumn",
|
|
8
8
|
props: ["record", "recordData", "columnsIndex"],
|
|
9
9
|
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
|
|
10
10
|
setup(__props, { emit: __emit }) {
|
|
@@ -52,12 +52,12 @@ const _sfc_main = {
|
|
|
52
52
|
flex: props.record.columns[index]?.flex,
|
|
53
53
|
span: 24,
|
|
54
54
|
style: normalizeStyle({
|
|
55
|
-
flex:
|
|
55
|
+
flex: props.record.columns[index]?.flex
|
|
56
56
|
})
|
|
57
57
|
}, {
|
|
58
58
|
default: withCtx(() => [
|
|
59
59
|
createElementVNode("div", {
|
|
60
|
-
class:
|
|
60
|
+
class: "box",
|
|
61
61
|
style: normalizeStyle({
|
|
62
62
|
background: props.record.options.style?.background,
|
|
63
63
|
border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
|
|
@@ -80,7 +80,7 @@ const _sfc_main = {
|
|
|
80
80
|
onClickColumnsEvent: onClickColumns
|
|
81
81
|
}, null, 8, ["record", "recordData", "columnsIndex"]);
|
|
82
82
|
}), 128))
|
|
83
|
-
],
|
|
83
|
+
], 12, _hoisted_1)
|
|
84
84
|
]),
|
|
85
85
|
_: 2
|
|
86
86
|
}, 1032, ["flex", "style"]);
|
|
@@ -92,7 +92,7 @@ const _sfc_main = {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
const
|
|
95
|
+
const MultipleColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20b79e7a"]]);
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
MultipleColumn as default
|
|
98
98
|
};
|
|
@@ -4,7 +4,7 @@ import FormItem from "./sun-card-design-pc.es25.js";
|
|
|
4
4
|
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
5
5
|
const _hoisted_1 = ["onClick"];
|
|
6
6
|
const _sfc_main = {
|
|
7
|
-
__name: "
|
|
7
|
+
__name: "multipleLine",
|
|
8
8
|
props: ["record", "recordData", "columnsIndex"],
|
|
9
9
|
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
|
|
10
10
|
setup(__props, { emit: __emit }) {
|
|
@@ -50,7 +50,7 @@ const _sfc_main = {
|
|
|
50
50
|
return openBlock(), createBlock(_component_a_col, {
|
|
51
51
|
key: index.toString(),
|
|
52
52
|
flex: props.record.columns[index]?.flex,
|
|
53
|
-
span: 24
|
|
53
|
+
span: 24,
|
|
54
54
|
style: normalizeStyle({
|
|
55
55
|
flex: _ctx.none
|
|
56
56
|
})
|
|
@@ -83,7 +83,7 @@ const _sfc_main = {
|
|
|
83
83
|
], 14, _hoisted_1)
|
|
84
84
|
]),
|
|
85
85
|
_: 2
|
|
86
|
-
}, 1032, ["flex", "
|
|
86
|
+
}, 1032, ["flex", "style"]);
|
|
87
87
|
}), 128))
|
|
88
88
|
]),
|
|
89
89
|
_: 1
|
|
@@ -92,7 +92,7 @@ const _sfc_main = {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
const
|
|
95
|
+
const MultipleLine = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c1ba89a8"]]);
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
MultipleLine as default
|
|
98
98
|
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode, normalizeClass } from "vue";
|
|
2
|
+
import FormItem from "./sun-card-design-pc.es25.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
5
|
+
const _hoisted_1 = ["onClick"];
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: "gridList",
|
|
8
|
+
props: ["record", "recordData", "columnsIndex"],
|
|
9
|
+
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
|
|
10
|
+
setup(__props, { emit: __emit }) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const emit = __emit;
|
|
13
|
+
const getIndex = (index) => {
|
|
14
|
+
if (index !== void 0) {
|
|
15
|
+
return index;
|
|
16
|
+
}
|
|
17
|
+
return props.columnsIndex;
|
|
18
|
+
};
|
|
19
|
+
const onClick = (record) => {
|
|
20
|
+
emit("clickEvent", record);
|
|
21
|
+
};
|
|
22
|
+
const onUpdate = (record) => {
|
|
23
|
+
emit("fileUpdateEvent", record);
|
|
24
|
+
};
|
|
25
|
+
const onClickColumns = (record) => {
|
|
26
|
+
if (!record.options.clickEvent) return;
|
|
27
|
+
emit("clickColumnsEvent", record);
|
|
28
|
+
};
|
|
29
|
+
const getBackground = () => {
|
|
30
|
+
if (isGradientColor(props.recordData.config.background)) {
|
|
31
|
+
return "none";
|
|
32
|
+
}
|
|
33
|
+
return props.recordData.config.background;
|
|
34
|
+
};
|
|
35
|
+
function isGradientColor(color) {
|
|
36
|
+
return /^(linear|radial)-gradient\(.*\)$/.test(color);
|
|
37
|
+
}
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
const _component_a_col = resolveComponent("a-col");
|
|
40
|
+
const _component_a_row = resolveComponent("a-row");
|
|
41
|
+
return openBlock(), createElementBlock("div", {
|
|
42
|
+
class: "main-grid",
|
|
43
|
+
style: normalizeStyle({ background: getBackground() })
|
|
44
|
+
}, [
|
|
45
|
+
createVNode(_component_a_row, {
|
|
46
|
+
gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
|
|
47
|
+
}, {
|
|
48
|
+
default: withCtx(() => [
|
|
49
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.record.columns, (item, index) => {
|
|
50
|
+
return openBlock(), createBlock(_component_a_col, {
|
|
51
|
+
key: index.toString(),
|
|
52
|
+
flex: props.record.columns[index]?.flex,
|
|
53
|
+
span: 24 / props.record.options.autoNumber,
|
|
54
|
+
style: normalizeStyle({
|
|
55
|
+
flex: _ctx.none
|
|
56
|
+
})
|
|
57
|
+
}, {
|
|
58
|
+
default: withCtx(() => [
|
|
59
|
+
createElementVNode("div", {
|
|
60
|
+
class: normalizeClass(["box", { active: _ctx.currentUuid === item.uuid }]),
|
|
61
|
+
style: normalizeStyle({
|
|
62
|
+
background: props.record.options.style?.background,
|
|
63
|
+
border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
|
|
64
|
+
borderRadius: props.record.options.style?.borderRadius + "px",
|
|
65
|
+
padding: props.record.options.style?.tbPadding + "px " + props.record.options.style?.lrPadding + "px",
|
|
66
|
+
justifyContent: props.record.options.style?.alignItems || "start",
|
|
67
|
+
minHeight: props.record.options.style?.minHeight + "px" || "48px",
|
|
68
|
+
boxShadow: props.record.options.style?.boxShadow || null
|
|
69
|
+
}),
|
|
70
|
+
onClick: ($event) => onClickColumns(item)
|
|
71
|
+
}, [
|
|
72
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
|
|
73
|
+
return openBlock(), createBlock(FormItem, {
|
|
74
|
+
record: element,
|
|
75
|
+
key: index2,
|
|
76
|
+
recordData: props.recordData,
|
|
77
|
+
columnsIndex: getIndex(item.index),
|
|
78
|
+
onClickEvent: onClick,
|
|
79
|
+
onFileUpdateEvent: onUpdate,
|
|
80
|
+
onClickColumnsEvent: onClickColumns
|
|
81
|
+
}, null, 8, ["record", "recordData", "columnsIndex"]);
|
|
82
|
+
}), 128))
|
|
83
|
+
], 14, _hoisted_1)
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1032, ["flex", "span", "style"]);
|
|
87
|
+
}), 128))
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}, 8, ["gutter"])
|
|
91
|
+
], 4);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const GridList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c6c62c4f"]]);
|
|
96
|
+
export {
|
|
97
|
+
GridList as default
|
|
98
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.main-title[data-v-1093ec93]{display:flex;align-items:center;width:100%}.main-title .line[data-v-1093ec93]{width:5px;border-radius:2px;margin-right:6px}.main-title h3[data-v-1093ec93]{margin:0}.main-text[data-v-1705860f]{display:flex;align-items:center;width:100%}.main-text .line[data-v-1705860f]{width:4px;border-radius:1px;margin-right:6px}.main-button[data-v-a265d74a]{display:flex;align-items:center;margin:0;padding:0;width:100%}.main-grid[data-v-812d703d]{width:100%}.main-grid .box[data-v-812d703d]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-title[data-v-42f0f48a]{width:100%}.main-title .file-box[data-v-42f0f48a]{display:grid;grid-template-columns:32px 1fr;grid-column-gap:10px;align-items:flex-start}.main-title .file-box .file-icon[data-v-42f0f48a]{grid-column:1 / 2;grid-row:1 / span 2;display:flex;align-items:flex-start}.main-title .file-box .file-icon.align-center[data-v-42f0f48a]{align-self:center}.main-title .file-box .name[data-v-42f0f48a]{grid-column:2 / 3;grid-row:1 / 2;margin:0;line-height:1.2;align-self:flex-start}.main-title .file-box .name.align-center[data-v-42f0f48a]{grid-row:1 / span 2;align-self:center}.main-title .file-box .subtitle[data-v-42f0f48a]{grid-column:2 / 3;grid-row:2 / 3;margin-top:4px;line-height:1.4;word-break:break-word;white-space:normal}.main-title .file-box[data-v-42f0f48a] svg path{fill:currentColor!important}.upload-comp[data-v-4363e2fe]{display:flex;flex-direction:column;align-items:flex-start;width:100%;overflow:hidden;border-radius:6px}.upload-comp .parse-type-info[data-v-4363e2fe]{margin-top:8px;display:flex;align-items:center}.upload-comp .upload-progress[data-v-4363e2fe]{display:flex;position:absolute;left:50%;top:12px;width:90%;transform:translate(-50%);z-index:1000;display:inline-flex;align-items:center;gap:12px;background:#404040f2;color:#fff;padding:10px 16px;border-radius:12px;box-shadow:0 6px 18px #0003}.upload-comp .upload-progress .spinner[data-v-4363e2fe]{width:28px;height:28px;border-radius:50%;border:3px solid rgba(255,255,255,.2);border-top-color:#4ad46a;animation:spin-4363e2fe 1s linear infinite}.upload-comp .upload-progress .progress-text-container[data-v-4363e2fe]{flex:1;display:flex;align-items:center;justify-content:space-between}.upload-comp .upload-progress .progress-text[data-v-4363e2fe]{font-size:14px;color:#fff}.upload-comp .upload-progress .cancel-btn[data-v-4363e2fe]{background:#666;color:#eee;border:none}@keyframes spin-4363e2fe{to{transform:rotate(360deg)}}.upload-comp .file-list[data-v-4363e2fe]{width:100%;margin-top:6px}.upload-comp .file-item-name[data-v-4363e2fe]{font-size:13px;color:#333}.main-picture[data-v-ff07b8c5]{display:flex;width:100%}.main-picture .picture-container[data-v-ff07b8c5]{background-color:#fff;border-radius:4px}.main-picture h3[data-v-ff07b8c5]{margin:0}.main-tag[data-v-6bc73f7b],.main-rate[data-v-20282c61]{width:100%}.main-rate[data-v-20282c61] .ant-rate-star-full,.main-rate[data-v-20282c61] .ant-rate-star-half,.main-rate[data-v-20282c61] .ant-rate-star-active{color:#ff9500}.main-divider[data-v-bd99764a]{display:flex;justify-content:center;align-items:center;width:100%}.custom-player[data-v-f85fd551]{--play-btn-color: #4a6bff;--progress-color: linear-gradient(90deg, #ff4d4d, #f9cb28);width:100%;position:relative}.custom-player audio[data-v-f85fd551]{display:none}.controls[data-v-f85fd551]{display:flex;align-items:center}.play-btn[data-v-f85fd551]{width:32px;height:32px;background:var(--play-btn-color);border-radius:50%;border:none;cursor:pointer;position:relative;margin-right:15px;transition:all .3s}.play-btn[data-v-f85fd551]:before{content:"";position:absolute;left:50%;top:50%;transform:translate(-35%,-50%);width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:12px solid white}.play-btn.paused[data-v-f85fd551]:before{width:14px;height:16px;border:none;background:linear-gradient(to right,white 0 4px,transparent 4px) left center / 4px 16px no-repeat,linear-gradient(to right,white 0 4px,transparent 4px) right center / 4px 16px no-repeat;transform:translate(-50%,-50%)}.progress-container[data-v-f85fd551]{flex:1;height:4px;background:#0000001a;border-radius:2px;cursor:pointer}.progress-bar[data-v-f85fd551]{height:100%;width:0;background:var(--progress-color);border-radius:2px;position:relative}.progress-bar[data-v-f85fd551]:after{content:"";position:absolute;right:-6px;top:50%;transform:translateY(-50%);width:12px;height:12px;background:#fff;border-radius:50%;box-shadow:0 0 4px #0000004d;opacity:0;transition:opacity .2s}.progress-container:hover .progress-bar[data-v-f85fd551]:after{opacity:1}.main-audio[data-v-3a42929f],.main-select[data-v-5707ab7d]{width:100%}.main-select h3[data-v-5707ab7d],.main-select[data-v-5707ab7d] .ant-form-item{margin:0}.main-video[data-v-ba6459c2]{width:100%}.main-video .custom-video[data-v-ba6459c2]{width:100%;outline:none;background:#000}.main-input[data-v-f4e2b8e3]{width:100%}.main-input h3[data-v-f4e2b8e3],.main-input[data-v-f4e2b8e3] .ant-form-item{margin:0}.main-button[data-v-4806336e]{display:flex;align-items:center;margin:0;width:100%}.main-enterpriseSearch[data-v-d616ad69]{width:100%}.main-enterpriseSearch h3[data-v-d616ad69],.main-enterpriseSearch[data-v-d616ad69] .ant-form-item{margin:0}.main-table[data-v-f6dd6b54]{width:100%}.main-table[data-v-f6dd6b54] .ant-table{font-size:var(--tbl-font-size)}.main-table[data-v-f6dd6b54] .ant-table-cell{padding:var(--tbl-cell-padding)!important;font-size:var(--tbl-font-size)}.barChart-table[data-v-bdc1c7d2],.pieChart-table[data-v-28332879],.lineChart-table[data-v-c3a80733]{width:100%}.mian-barChart3d[data-v-
|
|
1
|
+
.main-title[data-v-1093ec93]{display:flex;align-items:center;width:100%}.main-title .line[data-v-1093ec93]{width:5px;border-radius:2px;margin-right:6px}.main-title h3[data-v-1093ec93]{margin:0}.main-text[data-v-1705860f]{display:flex;align-items:center;width:100%}.main-text .line[data-v-1705860f]{width:4px;border-radius:1px;margin-right:6px}.main-button[data-v-a265d74a]{display:flex;align-items:center;margin:0;padding:0;width:100%}.main-grid[data-v-812d703d]{width:100%}.main-grid .box[data-v-812d703d]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-title[data-v-42f0f48a]{width:100%}.main-title .file-box[data-v-42f0f48a]{display:grid;grid-template-columns:32px 1fr;grid-column-gap:10px;align-items:flex-start}.main-title .file-box .file-icon[data-v-42f0f48a]{grid-column:1 / 2;grid-row:1 / span 2;display:flex;align-items:flex-start}.main-title .file-box .file-icon.align-center[data-v-42f0f48a]{align-self:center}.main-title .file-box .name[data-v-42f0f48a]{grid-column:2 / 3;grid-row:1 / 2;margin:0;line-height:1.2;align-self:flex-start}.main-title .file-box .name.align-center[data-v-42f0f48a]{grid-row:1 / span 2;align-self:center}.main-title .file-box .subtitle[data-v-42f0f48a]{grid-column:2 / 3;grid-row:2 / 3;margin-top:4px;line-height:1.4;word-break:break-word;white-space:normal}.main-title .file-box[data-v-42f0f48a] svg path{fill:currentColor!important}.upload-comp[data-v-4363e2fe]{display:flex;flex-direction:column;align-items:flex-start;width:100%;overflow:hidden;border-radius:6px}.upload-comp .parse-type-info[data-v-4363e2fe]{margin-top:8px;display:flex;align-items:center}.upload-comp .upload-progress[data-v-4363e2fe]{display:flex;position:absolute;left:50%;top:12px;width:90%;transform:translate(-50%);z-index:1000;display:inline-flex;align-items:center;gap:12px;background:#404040f2;color:#fff;padding:10px 16px;border-radius:12px;box-shadow:0 6px 18px #0003}.upload-comp .upload-progress .spinner[data-v-4363e2fe]{width:28px;height:28px;border-radius:50%;border:3px solid rgba(255,255,255,.2);border-top-color:#4ad46a;animation:spin-4363e2fe 1s linear infinite}.upload-comp .upload-progress .progress-text-container[data-v-4363e2fe]{flex:1;display:flex;align-items:center;justify-content:space-between}.upload-comp .upload-progress .progress-text[data-v-4363e2fe]{font-size:14px;color:#fff}.upload-comp .upload-progress .cancel-btn[data-v-4363e2fe]{background:#666;color:#eee;border:none}@keyframes spin-4363e2fe{to{transform:rotate(360deg)}}.upload-comp .file-list[data-v-4363e2fe]{width:100%;margin-top:6px}.upload-comp .file-item-name[data-v-4363e2fe]{font-size:13px;color:#333}.main-picture[data-v-ff07b8c5]{display:flex;width:100%}.main-picture .picture-container[data-v-ff07b8c5]{background-color:#fff;border-radius:4px}.main-picture h3[data-v-ff07b8c5]{margin:0}.main-tag[data-v-6bc73f7b],.main-rate[data-v-20282c61]{width:100%}.main-rate[data-v-20282c61] .ant-rate-star-full,.main-rate[data-v-20282c61] .ant-rate-star-half,.main-rate[data-v-20282c61] .ant-rate-star-active{color:#ff9500}.main-divider[data-v-bd99764a]{display:flex;justify-content:center;align-items:center;width:100%}.custom-player[data-v-f85fd551]{--play-btn-color: #4a6bff;--progress-color: linear-gradient(90deg, #ff4d4d, #f9cb28);width:100%;position:relative}.custom-player audio[data-v-f85fd551]{display:none}.controls[data-v-f85fd551]{display:flex;align-items:center}.play-btn[data-v-f85fd551]{width:32px;height:32px;background:var(--play-btn-color);border-radius:50%;border:none;cursor:pointer;position:relative;margin-right:15px;transition:all .3s}.play-btn[data-v-f85fd551]:before{content:"";position:absolute;left:50%;top:50%;transform:translate(-35%,-50%);width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:12px solid white}.play-btn.paused[data-v-f85fd551]:before{width:14px;height:16px;border:none;background:linear-gradient(to right,white 0 4px,transparent 4px) left center / 4px 16px no-repeat,linear-gradient(to right,white 0 4px,transparent 4px) right center / 4px 16px no-repeat;transform:translate(-50%,-50%)}.progress-container[data-v-f85fd551]{flex:1;height:4px;background:#0000001a;border-radius:2px;cursor:pointer}.progress-bar[data-v-f85fd551]{height:100%;width:0;background:var(--progress-color);border-radius:2px;position:relative}.progress-bar[data-v-f85fd551]:after{content:"";position:absolute;right:-6px;top:50%;transform:translateY(-50%);width:12px;height:12px;background:#fff;border-radius:50%;box-shadow:0 0 4px #0000004d;opacity:0;transition:opacity .2s}.progress-container:hover .progress-bar[data-v-f85fd551]:after{opacity:1}.main-audio[data-v-3a42929f],.main-select[data-v-5707ab7d]{width:100%}.main-select h3[data-v-5707ab7d],.main-select[data-v-5707ab7d] .ant-form-item{margin:0}.main-video[data-v-ba6459c2]{width:100%}.main-video .custom-video[data-v-ba6459c2]{width:100%;outline:none;background:#000}.main-input[data-v-f4e2b8e3]{width:100%}.main-input h3[data-v-f4e2b8e3],.main-input[data-v-f4e2b8e3] .ant-form-item{margin:0}.main-button[data-v-4806336e]{display:flex;align-items:center;margin:0;width:100%}.main-enterpriseSearch[data-v-d616ad69]{width:100%}.main-enterpriseSearch h3[data-v-d616ad69],.main-enterpriseSearch[data-v-d616ad69] .ant-form-item{margin:0}.main-table[data-v-f6dd6b54]{width:100%}.main-table[data-v-f6dd6b54] .ant-table{font-size:var(--tbl-font-size)}.main-table[data-v-f6dd6b54] .ant-table-cell{padding:var(--tbl-cell-padding)!important;font-size:var(--tbl-font-size)}.barChart-table[data-v-bdc1c7d2],.pieChart-table[data-v-28332879],.lineChart-table[data-v-c3a80733]{width:100%}.mian-barChart3d[data-v-1c984e5e]{width:100%;background:#f7f7fc;border-radius:6px}.main-pieChart3d[data-v-c0e183de]{width:100%;background:#f7f7fc}.canvas[data-v-d6ec0f1f]{display:flex;justify-content:center;align-items:center;position:fixed;left:0;top:0;width:100%;height:100%;z-index:9999;background:#0009}.canvas .canvas-view[data-v-d6ec0f1f]{position:relative;width:calc(100% - 60px);height:calc(100% - 100px);border-radius:10px;background-color:#3e8be4ad;overflow:hidden}.canvas .icon[data-v-d6ec0f1f]{position:absolute;top:30px;right:10px;font-size:26px;color:#fff}.main-panorama[data-v-bf23cf13]{width:100%;border-radius:6px}.main-panorama .panorama-box[data-v-bf23cf13]{overflow:hidden;position:relative;z-index:1}.main-panorama .panorama-box .panorama-box-icon[data-v-bf23cf13]{position:absolute;right:10px;top:10px;cursor:pointer}.main-icon[data-v-4b920fa7],.main-singleColumn[data-v-1fc2bfb4]{width:100%}.main-singleColumn .box[data-v-1fc2bfb4]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-grid[data-v-20b79e7a]{width:100%}.main-grid .box[data-v-20b79e7a]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-grid[data-v-c1ba89a8]{width:100%}.main-grid .box[data-v-c1ba89a8]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-grid[data-v-c6c62c4f]{width:100%}.main-grid .box[data-v-c6c62c4f]{display:flex;flex-direction:column;width:100%;min-height:48px;border:1px solid #e9e9e9;overflow:hidden}.main-box[data-v-1202bb9d]{position:relative}.msg-main[data-v-9e0be1d2]{height:auto;border:1px solid #f1f1f1;overflow:hidden}
|
package/package.json
CHANGED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { ref, computed, resolveComponent, createElementBlock, openBlock, normalizeStyle, createCommentVNode, createVNode, createElementVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
-
import { UploadOutlined } from "@ant-design/icons-vue";
|
|
3
|
-
import { message } from "ant-design-vue";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-design-mobile.es28.js";
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "upload-progress"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = { class: "progress-text-container" };
|
|
11
|
-
const _hoisted_3 = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "file-list"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_4 = { class: "file-item-name" };
|
|
16
|
-
const _sfc_main = {
|
|
17
|
-
__name: "uploadComp",
|
|
18
|
-
props: ["record"],
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const fileList = ref([]);
|
|
22
|
-
const uploadControllers = ref(/* @__PURE__ */ new Map());
|
|
23
|
-
const currentUploadingUid = ref(null);
|
|
24
|
-
const isUploading = computed(() => !!currentUploadingUid.value);
|
|
25
|
-
const buttonColor = computed(() => {
|
|
26
|
-
return props.record.options?.style?.buttonColor;
|
|
27
|
-
});
|
|
28
|
-
const buttonSize = computed(() => {
|
|
29
|
-
return props.record.options?.style?.buttonSize;
|
|
30
|
-
});
|
|
31
|
-
const acceptTypes = computed(() => {
|
|
32
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
const formatMap = {
|
|
36
|
-
pdf: ".pdf",
|
|
37
|
-
word: ".doc,.docx",
|
|
38
|
-
excle: ".xls,.xlsx",
|
|
39
|
-
txt: ".txt",
|
|
40
|
-
ppt: ".ppt,.pptx"
|
|
41
|
-
};
|
|
42
|
-
return props.record.options.format.map((format) => formatMap[format] || `.${format}`).join(",");
|
|
43
|
-
});
|
|
44
|
-
const beforeUpload = (file) => {
|
|
45
|
-
const isValidType = checkFileType(file);
|
|
46
|
-
if (!isValidType) {
|
|
47
|
-
const allowedFormats = props.record.options?.format || [];
|
|
48
|
-
const formatNames = {
|
|
49
|
-
pdf: "PDF",
|
|
50
|
-
word: "Word",
|
|
51
|
-
excle: "Excel",
|
|
52
|
-
txt: "TXT",
|
|
53
|
-
ppt: "PPT"
|
|
54
|
-
};
|
|
55
|
-
const formatText = allowedFormats.map((f) => formatNames[f] || f.toUpperCase()).join("、");
|
|
56
|
-
if (formatText) {
|
|
57
|
-
message.error(`只支持 ${formatText} 格式的文件`);
|
|
58
|
-
} else {
|
|
59
|
-
message.error("请先配置允许的文件格式");
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
65
|
-
const checkFileType = (file) => {
|
|
66
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
const fileName = (file.name || file.fileName || "").toLowerCase();
|
|
70
|
-
if (!fileName) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
const allowedFormats = props.record.options.format;
|
|
74
|
-
const formatExtensions = {
|
|
75
|
-
pdf: [".pdf"],
|
|
76
|
-
word: [".doc", ".docx"],
|
|
77
|
-
excle: [".xls", ".xlsx"],
|
|
78
|
-
txt: [".txt"],
|
|
79
|
-
ppt: [".ppt", ".pptx"]
|
|
80
|
-
};
|
|
81
|
-
const allowedExtensions = allowedFormats.reduce((exts, format) => {
|
|
82
|
-
if (formatExtensions[format]) {
|
|
83
|
-
exts.push(...formatExtensions[format]);
|
|
84
|
-
}
|
|
85
|
-
return exts;
|
|
86
|
-
}, []);
|
|
87
|
-
if (allowedExtensions.length === 0) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
const isValid = allowedExtensions.some((ext) => fileName.endsWith(ext));
|
|
91
|
-
console.log("文件类型检查:", {
|
|
92
|
-
fileName,
|
|
93
|
-
allowedFormats,
|
|
94
|
-
allowedExtensions,
|
|
95
|
-
isValid
|
|
96
|
-
});
|
|
97
|
-
return isValid;
|
|
98
|
-
};
|
|
99
|
-
const customRequest = (options) => {
|
|
100
|
-
const { file, onSuccess, onProgress } = options;
|
|
101
|
-
({ uid: file.uid, name: file.name });
|
|
102
|
-
currentUploadingUid.value = file.uid;
|
|
103
|
-
let progress = 0;
|
|
104
|
-
const timer = setInterval(() => {
|
|
105
|
-
progress = Math.min(progress + 8 + Math.random() * 6, 99);
|
|
106
|
-
onProgress({ percent: progress });
|
|
107
|
-
}, 200);
|
|
108
|
-
const doneTimer = setTimeout(() => {
|
|
109
|
-
clearInterval(timer);
|
|
110
|
-
uploadControllers.value.delete(file.uid);
|
|
111
|
-
fileList.value.push({ uid: file.uid, name: file.name });
|
|
112
|
-
message.success("上传成功");
|
|
113
|
-
onSuccess({ url: URL.createObjectURL(file), name: file.name });
|
|
114
|
-
if (currentUploadingUid.value === file.uid) currentUploadingUid.value = null;
|
|
115
|
-
}, 2e3);
|
|
116
|
-
uploadControllers.value.set(file.uid, { timer, doneTimer });
|
|
117
|
-
};
|
|
118
|
-
const onCancelUpload = () => {
|
|
119
|
-
const uid = currentUploadingUid.value;
|
|
120
|
-
if (!uid) return;
|
|
121
|
-
const ctrl = uploadControllers.value.get(uid);
|
|
122
|
-
if (ctrl) {
|
|
123
|
-
if (ctrl.timer) clearInterval(ctrl.timer);
|
|
124
|
-
if (ctrl.doneTimer) clearTimeout(ctrl.doneTimer);
|
|
125
|
-
uploadControllers.value.delete(uid);
|
|
126
|
-
}
|
|
127
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
128
|
-
if (item) {
|
|
129
|
-
item.status = "cancelled";
|
|
130
|
-
item.percent = 0;
|
|
131
|
-
}
|
|
132
|
-
currentUploadingUid.value = null;
|
|
133
|
-
message.info("已取消上传");
|
|
134
|
-
};
|
|
135
|
-
const removeFile = (uid) => {
|
|
136
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
137
|
-
if (item && item.status === "uploading") {
|
|
138
|
-
currentUploadingUid.value = uid;
|
|
139
|
-
onCancelUpload();
|
|
140
|
-
}
|
|
141
|
-
fileList.value = fileList.value.filter((f) => f.uid !== uid);
|
|
142
|
-
};
|
|
143
|
-
return (_ctx, _cache) => {
|
|
144
|
-
const _component_a_button = resolveComponent("a-button");
|
|
145
|
-
const _component_a_upload = resolveComponent("a-upload");
|
|
146
|
-
return openBlock(), createElementBlock("div", {
|
|
147
|
-
class: "upload-comp",
|
|
148
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
149
|
-
}, [
|
|
150
|
-
isUploading.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
151
|
-
_cache[2] || (_cache[2] = createElementVNode("div", { class: "spinner" }, null, -1)),
|
|
152
|
-
createElementVNode("div", _hoisted_2, [
|
|
153
|
-
_cache[1] || (_cache[1] = createElementVNode("div", { class: "progress-text" }, "文件导入中...", -1)),
|
|
154
|
-
createVNode(_component_a_button, {
|
|
155
|
-
class: "cancel-btn",
|
|
156
|
-
onClick: withModifiers(onCancelUpload, ["stop"]),
|
|
157
|
-
size: "small"
|
|
158
|
-
}, {
|
|
159
|
-
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
160
|
-
createTextVNode("取消", -1)
|
|
161
|
-
])]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
])) : createCommentVNode("", true),
|
|
166
|
-
createVNode(_component_a_upload, {
|
|
167
|
-
accept: acceptTypes.value,
|
|
168
|
-
multiple: true,
|
|
169
|
-
"before-upload": beforeUpload,
|
|
170
|
-
"custom-request": customRequest,
|
|
171
|
-
"show-upload-list": false,
|
|
172
|
-
disabled: false
|
|
173
|
-
}, {
|
|
174
|
-
default: withCtx(() => [
|
|
175
|
-
createVNode(_component_a_button, {
|
|
176
|
-
type: "primary",
|
|
177
|
-
style: normalizeStyle({
|
|
178
|
-
backgroundColor: buttonColor.value,
|
|
179
|
-
borderColor: buttonColor.value,
|
|
180
|
-
fontSize: buttonSize.value + "px",
|
|
181
|
-
height: "auto",
|
|
182
|
-
padding: "4px 12px",
|
|
183
|
-
minHeight: "28px"
|
|
184
|
-
}),
|
|
185
|
-
icon: h(unref(UploadOutlined))
|
|
186
|
-
}, {
|
|
187
|
-
icon: withCtx(() => [
|
|
188
|
-
createVNode(unref(UploadOutlined))
|
|
189
|
-
]),
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createTextVNode(" " + toDisplayString(props.record.options?.style?.buttonText), 1)
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["style", "icon"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["accept"]),
|
|
198
|
-
fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
199
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file) => {
|
|
200
|
-
return openBlock(), createElementBlock("div", {
|
|
201
|
-
class: "file-item",
|
|
202
|
-
key: file.uid
|
|
203
|
-
}, [
|
|
204
|
-
createElementVNode("span", _hoisted_4, toDisplayString(file.name), 1),
|
|
205
|
-
createVNode(_component_a_button, {
|
|
206
|
-
type: "link",
|
|
207
|
-
danger: "",
|
|
208
|
-
size: "small",
|
|
209
|
-
onClick: withModifiers(($event) => removeFile(file.uid), ["stop"])
|
|
210
|
-
}, {
|
|
211
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
212
|
-
createTextVNode("删除", -1)
|
|
213
|
-
])]),
|
|
214
|
-
_: 1
|
|
215
|
-
}, 8, ["onClick"])
|
|
216
|
-
]);
|
|
217
|
-
}), 128))
|
|
218
|
-
])) : createCommentVNode("", true)
|
|
219
|
-
], 4);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4363e2fe"]]);
|
|
224
|
-
export {
|
|
225
|
-
Upload as default
|
|
226
|
-
};
|