sun-card-design 1.2.2 → 1.2.3

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.
Files changed (61) hide show
  1. package/dist/mobile/sun-card-design-mobile.es10.js +13 -7
  2. package/dist/mobile/sun-card-design-mobile.es11.js +19 -12
  3. package/dist/mobile/sun-card-design-mobile.es12.js +11 -9
  4. package/dist/mobile/sun-card-design-mobile.es13.js +28 -22
  5. package/dist/mobile/sun-card-design-mobile.es14.js +13 -7
  6. package/dist/mobile/sun-card-design-mobile.es15.js +43 -23
  7. package/dist/mobile/sun-card-design-mobile.es16.js +13 -7
  8. package/dist/mobile/sun-card-design-mobile.es17.js +14 -8
  9. package/dist/mobile/sun-card-design-mobile.es18.js +14 -8
  10. package/dist/mobile/sun-card-design-mobile.es19.js +21 -11
  11. package/dist/mobile/sun-card-design-mobile.es20.js +19 -12
  12. package/dist/mobile/sun-card-design-mobile.es21.js +16 -9
  13. package/dist/mobile/sun-card-design-mobile.es22.js +19 -12
  14. package/dist/mobile/sun-card-design-mobile.es23.js +16 -9
  15. package/dist/mobile/sun-card-design-mobile.es24.js +19 -12
  16. package/dist/mobile/sun-card-design-mobile.es3.js +41 -28
  17. package/dist/mobile/sun-card-design-mobile.es37.js +19 -18
  18. package/dist/mobile/sun-card-design-mobile.es4.js +54 -32
  19. package/dist/mobile/sun-card-design-mobile.es5.js +27 -18
  20. package/dist/mobile/sun-card-design-mobile.es55.js +26 -29
  21. package/dist/mobile/sun-card-design-mobile.es56.js +21 -20
  22. package/dist/mobile/sun-card-design-mobile.es57.js +44 -25
  23. package/dist/mobile/sun-card-design-mobile.es58.js +43 -23
  24. package/dist/mobile/sun-card-design-mobile.es59.js +38 -21
  25. package/dist/mobile/sun-card-design-mobile.es6.js +32 -18
  26. package/dist/mobile/sun-card-design-mobile.es60.js +38 -21
  27. package/dist/mobile/sun-card-design-mobile.es7.js +41 -35
  28. package/dist/mobile/sun-card-design-mobile.es8.js +28 -22
  29. package/dist/mobile/sun-card-design-mobile.es9.js +21 -12
  30. package/dist/pc/sun-card-design-pc.es10.js +13 -7
  31. package/dist/pc/sun-card-design-pc.es11.js +19 -12
  32. package/dist/pc/sun-card-design-pc.es12.js +11 -9
  33. package/dist/pc/sun-card-design-pc.es13.js +28 -22
  34. package/dist/pc/sun-card-design-pc.es14.js +13 -7
  35. package/dist/pc/sun-card-design-pc.es15.js +43 -23
  36. package/dist/pc/sun-card-design-pc.es16.js +13 -7
  37. package/dist/pc/sun-card-design-pc.es17.js +14 -8
  38. package/dist/pc/sun-card-design-pc.es18.js +14 -8
  39. package/dist/pc/sun-card-design-pc.es19.js +21 -11
  40. package/dist/pc/sun-card-design-pc.es20.js +19 -12
  41. package/dist/pc/sun-card-design-pc.es21.js +16 -9
  42. package/dist/pc/sun-card-design-pc.es22.js +19 -12
  43. package/dist/pc/sun-card-design-pc.es23.js +16 -9
  44. package/dist/pc/sun-card-design-pc.es24.js +19 -12
  45. package/dist/pc/sun-card-design-pc.es3.js +41 -28
  46. package/dist/pc/sun-card-design-pc.es37.js +19 -18
  47. package/dist/pc/sun-card-design-pc.es4.js +54 -32
  48. package/dist/pc/sun-card-design-pc.es5.js +27 -18
  49. package/dist/pc/sun-card-design-pc.es55.js +26 -29
  50. package/dist/pc/sun-card-design-pc.es56.js +21 -20
  51. package/dist/pc/sun-card-design-pc.es57.js +44 -25
  52. package/dist/pc/sun-card-design-pc.es58.js +43 -23
  53. package/dist/pc/sun-card-design-pc.es59.js +38 -21
  54. package/dist/pc/sun-card-design-pc.es6.js +32 -18
  55. package/dist/pc/sun-card-design-pc.es60.js +38 -21
  56. package/dist/pc/sun-card-design-pc.es7.js +41 -35
  57. package/dist/pc/sun-card-design-pc.es8.js +28 -22
  58. package/dist/pc/sun-card-design-pc.es9.js +21 -12
  59. package/dist/public/sun-card-design.css +1 -1
  60. package/package.json +1 -1
  61. package/dist/mobile/sun-card-design-mobile.es61.js +0 -162
@@ -1,11 +1,28 @@
1
- import { createElementBlock, openBlock, normalizeStyle, createCommentVNode, createElementVNode, toDisplayString, unref } from "vue";
1
+ import { useCssVars, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, toDisplayString, unref } from "vue";
2
2
  import { renderTextByVariables } from "./sun-card-design-pc.es26.js";
3
3
  /* empty css */
4
4
  import _export_sfc from "./sun-card-design-pc.es28.js";
5
+ const _hoisted_1 = { class: "main-title" };
6
+ const _hoisted_2 = {
7
+ key: 0,
8
+ class: "line"
9
+ };
10
+ const _hoisted_3 = { class: "title-text" };
5
11
  const _sfc_main = {
6
12
  __name: "titleComp",
7
13
  props: ["record", "columnsIndex"],
8
14
  setup(__props) {
15
+ useCssVars((_ctx) => ({
16
+ "c2791288": mainPadding.value,
17
+ "v4447debe": mainJustifyContent.value,
18
+ "b78e19c4": lineBackground.value,
19
+ "v23ce99d6": lineWidth.value,
20
+ "v3c35a717": lineHeight.value,
21
+ "v43484464": lineBorderRadius.value,
22
+ "v8adc6dc4": lineMarginRight.value,
23
+ "v6ef5dde8": titleFontSize.value,
24
+ "v2097d672": titleColor.value
25
+ }));
9
26
  const props = __props;
10
27
  const formatPx = (value, fallback) => {
11
28
  const fallbackValue = typeof fallback === "number" ? `${fallback}px` : fallback;
@@ -27,37 +44,33 @@ const _sfc_main = {
27
44
  };
28
45
  return obj[props.record.options.style.textAlign];
29
46
  };
47
+ const mainPadding = computed(() => {
48
+ const tb = props.record.options?.style?.tbPadding ?? 0;
49
+ const lr = props.record.options?.style?.lrPadding ?? 0;
50
+ return `${tb}px ${lr}px`;
51
+ });
52
+ const mainJustifyContent = computed(() => getAlign());
53
+ const lineBackground = computed(() => props.record.options.hasLineStyle?.background || "transparent");
54
+ const lineWidth = computed(() => formatPx(props.record.options.hasLineStyle?.width, 5));
55
+ const lineHeight = computed(
56
+ () => formatPx(
57
+ props.record.options.hasLineStyle?.height,
58
+ props.record.options.style.fontSize ?? 16
59
+ )
60
+ );
61
+ const lineBorderRadius = computed(() => formatPx(props.record.options.hasLineStyle?.borderRadius, 1));
62
+ const lineMarginRight = computed(() => formatPx(props.record.options.hasLineStyle?.marginRight, 6));
63
+ const titleFontSize = computed(() => `${props.record.options.style.fontSize}px`);
64
+ const titleColor = computed(() => props.record.options.style.color);
30
65
  return (_ctx, _cache) => {
31
- return openBlock(), createElementBlock("div", {
32
- class: "main-title",
33
- style: normalizeStyle({ justifyContent: getAlign(), padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
34
- }, [
35
- props.record.options.hasLine ? (openBlock(), createElementBlock("div", {
36
- key: 0,
37
- class: "line",
38
- style: normalizeStyle({
39
- background: props.record.options.hasLineStyle.background,
40
- width: formatPx(props.record.options.hasLineStyle?.width, 5),
41
- height: formatPx(
42
- props.record.options.hasLineStyle?.height,
43
- props.record.options.style.fontSize ?? 16
44
- ),
45
- borderRadius: formatPx(props.record.options.hasLineStyle?.borderRadius, 1),
46
- marginRight: formatPx(props.record.options.hasLineStyle?.marginRight, 6)
47
- })
48
- }, null, 4)) : createCommentVNode("", true),
49
- createElementVNode("div", {
50
- style: normalizeStyle({
51
- fontWeight: "500",
52
- fontSize: props.record.options.style.fontSize + "px",
53
- color: props.record.options.style.color
54
- })
55
- }, toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue, props.columnsIndex)), 5)
56
- ], 4);
66
+ return openBlock(), createElementBlock("div", _hoisted_1, [
67
+ props.record.options.hasLine ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true),
68
+ createElementVNode("div", _hoisted_3, toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue, props.columnsIndex)), 1)
69
+ ]);
57
70
  };
58
71
  }
59
72
  };
60
- const Title = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1093ec93"]]);
73
+ const Title = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1857c02b"]]);
61
74
  export {
62
75
  Title as default
63
76
  };
@@ -1,17 +1,22 @@
1
- import { computed, ref, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, createElementVNode, normalizeClass } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, onBeforeUnmount, createElementBlock, openBlock, createElementVNode, normalizeClass } from "vue";
2
2
  /* empty css */
3
3
  import _export_sfc from "./sun-card-design-pc.es28.js";
4
- const _hoisted_1 = ["src"];
5
- const _hoisted_2 = { class: "controls" };
4
+ const _hoisted_1 = { class: "custom-player" };
5
+ const _hoisted_2 = ["src"];
6
+ const _hoisted_3 = { class: "controls" };
6
7
  const _sfc_main = {
7
8
  __name: "audio",
8
9
  props: ["src", "playBtnColor", "progressColor"],
9
10
  setup(__props) {
10
- const props = __props;
11
- const rootStyle = computed(() => ({
12
- "--play-btn-color": props.playBtnColor || "#4a6bff",
13
- "--progress-color": props.progressColor || "#409eff"
11
+ useCssVars((_ctx) => ({
12
+ "v5a9e689c": playBtnColorValue.value,
13
+ "v6bf7e675": progressColorValue.value,
14
+ "v317312bf": progressWidth.value
14
15
  }));
16
+ const props = __props;
17
+ const playBtnColorValue = computed(() => props.playBtnColor || "#4a6bff");
18
+ const progressColorValue = computed(() => props.progressColor || "#409eff");
19
+ const progressWidth = computed(() => progressPercent.value + "%");
15
20
  const audioRef = ref();
16
21
  const playBtnRef = ref(null);
17
22
  const progressContainerRef = ref(null);
@@ -84,16 +89,13 @@ const _sfc_main = {
84
89
  audio.removeEventListener("loadedmetadata", updateProgress);
85
90
  });
86
91
  return (_ctx, _cache) => {
87
- return openBlock(), createElementBlock("div", {
88
- class: "custom-player",
89
- style: normalizeStyle(rootStyle.value)
90
- }, [
92
+ return openBlock(), createElementBlock("div", _hoisted_1, [
91
93
  createElementVNode("audio", {
92
94
  ref_key: "audioRef",
93
95
  ref: audioRef,
94
96
  src: props.src
95
- }, null, 8, _hoisted_1),
96
- createElementVNode("div", _hoisted_2, [
97
+ }, null, 8, _hoisted_2),
98
+ createElementVNode("div", _hoisted_3, [
97
99
  createElementVNode("button", {
98
100
  class: normalizeClass(["play-btn", { paused: isPlaying.value }]),
99
101
  ref_key: "playBtnRef",
@@ -110,16 +112,15 @@ const _sfc_main = {
110
112
  createElementVNode("div", {
111
113
  class: "progress-bar",
112
114
  ref_key: "progressBarRef",
113
- ref: progressBarRef,
114
- style: normalizeStyle({ width: progressPercent.value + "%" })
115
- }, null, 4)
115
+ ref: progressBarRef
116
+ }, null, 512)
116
117
  ], 544)
117
118
  ])
118
- ], 4);
119
+ ]);
119
120
  };
120
121
  }
121
122
  };
122
- const Audio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f85fd551"]]);
123
+ const Audio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bcdfd85b"]]);
123
124
  export {
124
125
  Audio as default
125
126
  };
@@ -1,16 +1,35 @@
1
- import { createElementBlock, openBlock, normalizeStyle, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, unref } from "vue";
1
+ import { useCssVars, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, unref } from "vue";
2
2
  import { renderTextByVariables } from "./sun-card-design-pc.es26.js";
3
3
  /* empty css */
4
4
  import _export_sfc from "./sun-card-design-pc.es28.js";
5
- const _hoisted_1 = {
5
+ const _hoisted_1 = { class: "main-text" };
6
+ const _hoisted_2 = {
6
7
  key: 0,
7
- style: { "font-weight": "600" }
8
+ class: "line"
9
+ };
10
+ const _hoisted_3 = {
11
+ key: 0,
12
+ class: "text-title"
8
13
  };
9
14
  const _sfc_main = {
10
15
  __name: "textComp",
11
16
  props: ["record", "columnsIndex"],
12
17
  emits: ["clickEvent"],
13
18
  setup(__props, { emit: __emit }) {
19
+ useCssVars((_ctx) => ({
20
+ "v2ef23bcf": mainPadding.value,
21
+ "v7cd0636a": mainJustifyContent.value,
22
+ "v350187a9": lineWidth.value,
23
+ "f3e766ca": lineBorderRadius.value,
24
+ "v5ce1ccb1": lineMarginRight.value,
25
+ "v56e0b12b": lineBackground.value,
26
+ "v516073a4": lineHeight.value,
27
+ "v61204fad": textColor.value,
28
+ "v2b41b734": textFontSize.value,
29
+ "v6102b74f": textAlign.value,
30
+ "v5da192b4": textDecoration.value,
31
+ "v65d64cbc": textIndent.value
32
+ }));
14
33
  const props = __props;
15
34
  const emit = __emit;
16
35
  const formatPx = (value, fallback) => {
@@ -38,43 +57,46 @@ const _sfc_main = {
38
57
  emit("clickEvent", props.record);
39
58
  }
40
59
  };
60
+ const mainPadding = computed(() => {
61
+ const tb = props.record.options?.style?.tbPadding ?? 0;
62
+ const lr = props.record.options?.style?.lrPadding ?? 0;
63
+ return `${tb}px ${lr}px`;
64
+ });
65
+ const mainJustifyContent = computed(() => getAlign());
66
+ const lineBackground = computed(() => props.record.options.hasLineStyle.background);
67
+ const lineWidth = computed(() => formatPx(props.record.options.hasLineStyle?.width, 4));
68
+ const lineHeight = computed(
69
+ () => formatPx(
70
+ props.record.options.hasLineStyle?.height,
71
+ props.record.options.style.fontSize + "px" || "14px"
72
+ )
73
+ );
74
+ const lineBorderRadius = computed(
75
+ () => formatPx(props.record.options.hasLineStyle?.borderRadius, 2)
76
+ );
77
+ const lineMarginRight = computed(
78
+ () => formatPx(props.record.options.hasLineStyle?.marginRight, 6)
79
+ );
80
+ const textColor = computed(() => props.record.options.style.color);
81
+ const textFontSize = computed(() => props.record.options.style.fontSize + "px");
82
+ const textAlign = computed(() => props.record.options.style.textAlign);
83
+ const textDecoration = computed(() => props.record.options.style.textDecoration);
84
+ const textIndent = computed(() => props.record.options.style.textIndent + "em");
41
85
  return (_ctx, _cache) => {
42
- return openBlock(), createElementBlock("div", {
43
- class: "main-text",
44
- style: normalizeStyle({ justifyContent: getAlign(), padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
45
- }, [
46
- props.record.options.hasLine ? (openBlock(), createElementBlock("div", {
47
- key: 0,
48
- class: "line",
49
- style: normalizeStyle({
50
- background: props.record.options.hasLineStyle.background,
51
- width: formatPx(props.record.options.hasLineStyle?.width, 4),
52
- height: formatPx(
53
- props.record.options.hasLineStyle?.height,
54
- props.record.options.style.fontSize + "px" || "14px"
55
- ),
56
- borderRadius: formatPx(props.record.options.hasLineStyle?.borderRadius, 2),
57
- marginRight: formatPx(props.record.options.hasLineStyle?.marginRight, 6)
58
- })
59
- }, null, 4)) : createCommentVNode("", true),
86
+ return openBlock(), createElementBlock("div", _hoisted_1, [
87
+ props.record.options.hasLine ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true),
60
88
  createElementVNode("div", {
61
- style: normalizeStyle({
62
- color: props.record.options.style.color,
63
- fontSize: props.record.options.style.fontSize + "px",
64
- textAlign: props.record.options.style.textAlign,
65
- textDecoration: props.record.options.style.textDecoration,
66
- textIndent: props.record.options.style.textIndent + "em"
67
- }),
89
+ class: "text-content",
68
90
  onClick
69
91
  }, [
70
- props.record.options.hasTitle ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(props.record.options.titleValue), 1)) : createCommentVNode("", true),
92
+ props.record.options.hasTitle ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(props.record.options.titleValue), 1)) : createCommentVNode("", true),
71
93
  createTextVNode(" " + toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue, props.columnsIndex)), 1)
72
- ], 4)
73
- ], 4);
94
+ ])
95
+ ]);
74
96
  };
75
97
  }
76
98
  };
77
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1705860f"]]);
99
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aca7c48b"]]);
78
100
  export {
79
101
  Text as default
80
102
  };
@@ -1,13 +1,23 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, createSlots, withCtx, createTextVNode, toDisplayString, unref, createBlock, resolveDynamicComponent } from "vue";
1
+ import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode, createSlots, withCtx, createTextVNode, toDisplayString, unref, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { renderTextByVariables } from "./sun-card-design-pc.es26.js";
3
3
  import { EditOutlined, DeleteOutlined, CloseOutlined, CheckOutlined, ClearOutlined, DownloadOutlined, SearchOutlined } from "@ant-design/icons-vue";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
+ const _hoisted_1 = { class: "main-button" };
6
7
  const _sfc_main = {
7
8
  __name: "buttonComp",
8
9
  props: ["record", "columnsIndex"],
9
10
  emits: ["clickEvent"],
10
11
  setup(__props, { emit: __emit }) {
12
+ useCssVars((_ctx) => ({
13
+ "v11775a22": mainPadding.value,
14
+ "df9919aa": mainJustifyContent.value,
15
+ "d3ce6c7e": btnBackground.value,
16
+ "v655eeaf0": btnColor.value,
17
+ "v50bed09e": btnBorderRadius.value,
18
+ "v6675e953": btnWidth.value,
19
+ "v6587dde9": btnFloat.value
20
+ }));
11
21
  const props = __props;
12
22
  const iconMap = {
13
23
  SearchOutlined,
@@ -38,25 +48,24 @@ const _sfc_main = {
38
48
  const onClick = () => {
39
49
  emit("clickEvent", props.record);
40
50
  };
51
+ const mainPadding = computed(() => {
52
+ const tb = props.record.options?.style?.tbPadding ?? 0;
53
+ const lr = props.record.options?.style?.lrPadding ?? 0;
54
+ return `${tb}px ${lr}px`;
55
+ });
56
+ const mainJustifyContent = computed(() => getAlign());
57
+ const btnBackground = computed(() => props.record.options.style.background);
58
+ const btnColor = computed(() => props.record.options.style.color);
59
+ const btnBorderRadius = computed(() => props.record.options.style.borderRadius + "px");
60
+ const btnWidth = computed(() => getWidth());
61
+ const btnFloat = computed(() => props.record.options.style.align);
41
62
  return (_ctx, _cache) => {
42
63
  const _component_a_button = resolveComponent("a-button");
43
- return openBlock(), createElementBlock("div", {
44
- class: "main-button",
45
- style: normalizeStyle({
46
- justifyContent: getAlign(),
47
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
48
- })
49
- }, [
64
+ return openBlock(), createElementBlock("div", _hoisted_1, [
50
65
  createVNode(_component_a_button, {
66
+ class: "btn",
51
67
  type: "primary",
52
68
  size: props.record.options.style.size,
53
- style: normalizeStyle({
54
- background: props.record.options.style.background,
55
- color: props.record.options.style.color,
56
- borderRadius: props.record.options.style.borderRadius + "px",
57
- width: getWidth(),
58
- float: props.record.options.style.align
59
- }),
60
69
  onClick
61
70
  }, createSlots({
62
71
  default: withCtx(() => [
@@ -71,12 +80,12 @@ const _sfc_main = {
71
80
  ]),
72
81
  key: "0"
73
82
  } : void 0
74
- ]), 1032, ["size", "style"])
75
- ], 4);
83
+ ]), 1032, ["size"])
84
+ ]);
76
85
  };
77
86
  }
78
87
  };
79
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a265d74a"]]);
88
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-600d0258"]]);
80
89
  export {
81
90
  Button as default
82
91
  };
@@ -1,32 +1,39 @@
1
- import { ref, computed, resolveComponent, createElementBlock, openBlock, normalizeStyle, createCommentVNode, createVNode, createElementVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
1
+ import { useCssVars, computed, ref, resolveComponent, createElementBlock, openBlock, createCommentVNode, createVNode, createElementVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
2
2
  import { UploadOutlined } from "@ant-design/icons-vue";
3
3
  import { message } from "ant-design-vue";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
- const _hoisted_1 = {
6
+ const _hoisted_1 = { class: "upload-comp" };
7
+ const _hoisted_2 = {
7
8
  key: 0,
8
9
  class: "upload-progress"
9
10
  };
10
- const _hoisted_2 = { class: "progress-text-container" };
11
- const _hoisted_3 = {
11
+ const _hoisted_3 = { class: "progress-text-container" };
12
+ const _hoisted_4 = {
12
13
  key: 1,
13
14
  class: "file-list"
14
15
  };
15
- const _hoisted_4 = { class: "file-item-name" };
16
+ const _hoisted_5 = { class: "file-item-name" };
16
17
  const _sfc_main = {
17
18
  __name: "uploadComp",
18
19
  props: ["record"],
19
20
  setup(__props) {
21
+ useCssVars((_ctx) => ({
22
+ "v29b9f64c": mainPadding.value,
23
+ "v34ef9fda": buttonColor.value,
24
+ "v964bed5e": buttonSize.value
25
+ }));
20
26
  const props = __props;
21
27
  const fileList = ref([]);
22
28
  const uploadControllers = ref(/* @__PURE__ */ new Map());
23
29
  const currentUploadingUid = ref(null);
24
30
  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;
31
+ const buttonColor = computed(() => props.record.options?.style?.buttonColor);
32
+ const buttonSize = computed(() => props.record.options?.style?.buttonSize);
33
+ const mainPadding = computed(() => {
34
+ const tb = props.record.options?.style?.tbPadding ?? 0;
35
+ const lr = props.record.options?.style?.lrPadding ?? 0;
36
+ return `${tb}px ${lr}px`;
30
37
  });
31
38
  const acceptTypes = computed(() => {
32
39
  if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
@@ -143,13 +150,10 @@ const _sfc_main = {
143
150
  return (_ctx, _cache) => {
144
151
  const _component_a_button = resolveComponent("a-button");
145
152
  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, [
153
+ return openBlock(), createElementBlock("div", _hoisted_1, [
154
+ isUploading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
151
155
  _cache[2] || (_cache[2] = createElementVNode("div", { class: "spinner" }, null, -1)),
152
- createElementVNode("div", _hoisted_2, [
156
+ createElementVNode("div", _hoisted_3, [
153
157
  _cache[1] || (_cache[1] = createElementVNode("div", { class: "progress-text" }, "文件导入中...", -1)),
154
158
  createVNode(_component_a_button, {
155
159
  class: "cancel-btn",
@@ -173,15 +177,8 @@ const _sfc_main = {
173
177
  }, {
174
178
  default: withCtx(() => [
175
179
  createVNode(_component_a_button, {
180
+ class: "upload-btn",
176
181
  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
182
  icon: h(unref(UploadOutlined))
186
183
  }, {
187
184
  icon: withCtx(() => [
@@ -191,17 +188,17 @@ const _sfc_main = {
191
188
  createTextVNode(" " + toDisplayString(props.record.options?.style?.buttonText), 1)
192
189
  ]),
193
190
  _: 1
194
- }, 8, ["style", "icon"])
191
+ }, 8, ["icon"])
195
192
  ]),
196
193
  _: 1
197
194
  }, 8, ["accept"]),
198
- fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
195
+ fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4, [
199
196
  (openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file) => {
200
197
  return openBlock(), createElementBlock("div", {
201
198
  class: "file-item",
202
199
  key: file.uid
203
200
  }, [
204
- createElementVNode("span", _hoisted_4, toDisplayString(file.name), 1),
201
+ createElementVNode("span", _hoisted_5, toDisplayString(file.name), 1),
205
202
  createVNode(_component_a_button, {
206
203
  type: "link",
207
204
  danger: "",
@@ -216,11 +213,11 @@ const _sfc_main = {
216
213
  ]);
217
214
  }), 128))
218
215
  ])) : createCommentVNode("", true)
219
- ], 4);
216
+ ]);
220
217
  };
221
218
  }
222
219
  };
223
- const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4363e2fe"]]);
220
+ const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-94c9d418"]]);
224
221
  export {
225
222
  Upload as default
226
223
  };
@@ -1,13 +1,19 @@
1
- import { markRaw, defineComponent, h, computed, createElementBlock, openBlock, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
1
+ import { useCssVars, computed, markRaw, defineComponent, h, createElementBlock, openBlock, createElementVNode, createBlock, resolveDynamicComponent } from "vue";
2
2
  import * as Icons from "@ant-design/icons-vue";
3
3
  import { customIcon } from "./sun-card-design-pc.es65.js";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
+ const _hoisted_1 = { class: "main-icon" };
6
7
  const _sfc_main = {
7
8
  __name: "sunIconComp",
8
9
  props: ["record"],
9
10
  emits: ["clickEvent"],
10
11
  setup(__props, { emit: __emit }) {
12
+ useCssVars((_ctx) => ({
13
+ "v6be6b256": mainPadding.value,
14
+ "v721317b0": iconColor.value,
15
+ "v3508a8a4": iconJustifyContent.value
16
+ }));
11
17
  const props = __props;
12
18
  const emit = __emit;
13
19
  const customIconComponents = Object.entries(customIcon || {}).reduce((acc, [key, svg]) => {
@@ -27,38 +33,33 @@ const _sfc_main = {
27
33
  const name = props?.record?.options?.style?.iconName || "CheckCircleOutlined";
28
34
  return iconMap[name] || Icons["CheckCircleOutlined"];
29
35
  });
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
- };
36
+ const mainPadding = computed(() => {
37
+ const tb = props.record.options?.style?.tbPadding ?? 0;
38
+ const lr = props.record.options?.style?.lrPadding ?? 0;
39
+ return `${tb}px ${lr}px`;
40
40
  });
41
+ const iconColor = computed(() => props?.record?.options?.style?.color || "#000000");
42
+ const iconJustifyContent = computed(
43
+ () => props?.record?.options?.style?.justifyContent || "flex-start"
44
+ );
41
45
  function onClick() {
42
46
  if (props.record.options.clickEvent) {
43
47
  emit("clickEvent", props.record);
44
48
  }
45
49
  }
46
50
  return (_ctx, _cache) => {
47
- return openBlock(), createElementBlock("div", {
48
- class: "main-icon",
49
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
50
- }, [
51
+ return openBlock(), createElementBlock("div", _hoisted_1, [
51
52
  createElementVNode("span", {
52
- style: normalizeStyle(iconStyle.value),
53
+ class: "icon-wrapper",
53
54
  onClick
54
55
  }, [
55
- (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value), { style: { "height": "18px", "width": "18px" } }))
56
- ], 4)
57
- ], 4);
56
+ (openBlock(), createBlock(resolveDynamicComponent(iconComponent.value), { class: "icon-inner" }))
57
+ ])
58
+ ]);
58
59
  };
59
60
  }
60
61
  };
61
- const SunIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4b920fa7"]]);
62
+ const SunIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-44bda71e"]]);
62
63
  export {
63
64
  SunIcon as default
64
65
  };