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,13 +1,24 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, Fragment, renderList, createBlock, createElementVNode } from "vue";
1
+ import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, Fragment, renderList, createBlock, normalizeStyle, 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
- const _hoisted_1 = ["onClick"];
5
+ const _hoisted_1 = { class: "main-grid" };
6
+ const _hoisted_2 = ["onClick"];
6
7
  const _sfc_main = {
7
8
  __name: "gridComp",
8
9
  props: ["record", "recordData", "columnsIndex"],
9
10
  emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
10
11
  setup(__props, { emit: __emit }) {
12
+ useCssVars((_ctx) => ({
13
+ "v006886e2": mainBackground.value,
14
+ "v6ee75b91": boxBackground.value,
15
+ "v74cc240f": boxBorder.value,
16
+ "v91dc14fe": boxBorderRadius.value,
17
+ "v1eb2eee4": boxPadding.value,
18
+ "v709306a8": boxJustifyContent.value,
19
+ "v77428154": boxMinHeight.value,
20
+ "dd37adfa": boxShadow.value
21
+ }));
11
22
  const props = __props;
12
23
  const emit = __emit;
13
24
  const getIndex = (index) => {
@@ -26,22 +37,40 @@ const _sfc_main = {
26
37
  if (!record.options.clickEvent) return;
27
38
  emit("clickColumnsEvent", record);
28
39
  };
29
- const getBackground = () => {
40
+ function isGradientColor(color) {
41
+ return /^(linear|radial)-gradient\(.*\)$/.test(color);
42
+ }
43
+ const mainBackground = computed(() => {
44
+ if (!props.recordData?.config?.background) {
45
+ return "transparent";
46
+ }
30
47
  if (isGradientColor(props.recordData.config.background)) {
31
48
  return "none";
32
49
  }
33
50
  return props.recordData.config.background;
34
- };
35
- function isGradientColor(color) {
36
- return /^(linear|radial)-gradient\(.*\)$/.test(color);
37
- }
51
+ });
52
+ const boxBackground = computed(() => props.record.options.style.background);
53
+ const boxBorder = computed(() => {
54
+ const borderColor = props.record.options.style?.borderColor;
55
+ if (borderColor === "none") return "none";
56
+ return `1px solid ${borderColor || "transparent"}`;
57
+ });
58
+ const boxBorderRadius = computed(() => `${props.record.options.style.borderRadius}px`);
59
+ const boxPadding = computed(() => {
60
+ const tb = props.record.options.style.tbPadding;
61
+ const lr = props.record.options.style.lrPadding;
62
+ return `${tb}px ${lr}px`;
63
+ });
64
+ const boxJustifyContent = computed(() => props.record.options.style?.alignItems || "start");
65
+ const boxMinHeight = computed(() => {
66
+ const minH = props.record.options.style?.minHeight;
67
+ return minH ? `${minH}px` : "48px";
68
+ });
69
+ const boxShadow = computed(() => props.record.options.style?.boxShadow || null);
38
70
  return (_ctx, _cache) => {
39
71
  const _component_a_col = resolveComponent("a-col");
40
72
  const _component_a_row = resolveComponent("a-row");
41
- return openBlock(), createElementBlock("div", {
42
- class: "main-grid",
43
- style: normalizeStyle({ background: getBackground() })
44
- }, [
73
+ return openBlock(), createElementBlock("div", _hoisted_1, [
45
74
  createVNode(_component_a_row, {
46
75
  gutter: [props.record.options.style.lrGutter, props.record.options.style.tbGutter]
47
76
  }, {
@@ -56,15 +85,6 @@ const _sfc_main = {
56
85
  default: withCtx(() => [
57
86
  createElementVNode("div", {
58
87
  class: "box",
59
- style: normalizeStyle({
60
- background: props.record.options.style.background,
61
- border: props.record.options.style?.borderColor === "none" ? "none" : "1px solid " + (props.record.options.style?.borderColor || "transparent"),
62
- borderRadius: props.record.options.style.borderRadius + "px",
63
- padding: props.record.options.style.tbPadding + "px " + props.record.options.style.lrPadding + "px",
64
- justifyContent: props.record.options.style?.alignItems || "start",
65
- minHeight: props.record.options.style?.minHeight + "px" || "48px",
66
- boxShadow: props.record.options.style?.boxShadow || null
67
- }),
68
88
  onClick: ($event) => onClickColumns(item)
69
89
  }, [
70
90
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.list, (element, index2) => {
@@ -76,7 +96,7 @@ const _sfc_main = {
76
96
  onFileUpdateEvent: onUpdate
77
97
  }, null, 8, ["record", "columnsIndex"]);
78
98
  }), 128))
79
- ], 12, _hoisted_1)
99
+ ], 8, _hoisted_2)
80
100
  ]),
81
101
  _: 2
82
102
  }, 1032, ["flex", "span", "style"]);
@@ -84,11 +104,11 @@ const _sfc_main = {
84
104
  ]),
85
105
  _: 1
86
106
  }, 8, ["gutter"])
87
- ], 4);
107
+ ]);
88
108
  };
89
109
  }
90
110
  };
91
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-812d703d"]]);
111
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5e173df1"]]);
92
112
  export {
93
113
  Grid as default
94
114
  };
@@ -1,20 +1,26 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, unref } from "vue";
1
+ import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, 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-input" };
5
6
  const _sfc_main = {
6
7
  __name: "inputComp",
7
8
  props: ["record"],
8
9
  setup(__props) {
10
+ useCssVars((_ctx) => ({
11
+ "v0cbc7152": mainPadding.value
12
+ }));
9
13
  const props = __props;
14
+ const mainPadding = computed(() => {
15
+ const tb = props.record.options?.style?.tbPadding ?? 0;
16
+ const lr = props.record.options?.style?.lrPadding ?? 0;
17
+ return `${tb}px ${lr}px`;
18
+ });
10
19
  return (_ctx, _cache) => {
11
20
  const _component_a_input = resolveComponent("a-input");
12
21
  const _component_a_form_item = resolveComponent("a-form-item");
13
22
  const _component_a_form = resolveComponent("a-form");
14
- return openBlock(), createElementBlock("div", {
15
- class: "main-input",
16
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
17
- }, [
23
+ return openBlock(), createElementBlock("div", _hoisted_1, [
18
24
  createVNode(_component_a_form, {
19
25
  layout: props.record.options.flex
20
26
  }, {
@@ -34,11 +40,11 @@ const _sfc_main = {
34
40
  ]),
35
41
  _: 1
36
42
  }, 8, ["layout"])
37
- ], 4);
43
+ ]);
38
44
  };
39
45
  }
40
46
  };
41
- const Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f4e2b8e3"]]);
47
+ const Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5a467bf8"]]);
42
48
  export {
43
49
  Input as default
44
50
  };
@@ -1,20 +1,26 @@
1
- import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, unref } from "vue";
1
+ import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, 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-select" };
5
6
  const _sfc_main = {
6
7
  __name: "selectComp",
7
8
  props: ["record"],
8
9
  setup(__props) {
10
+ useCssVars((_ctx) => ({
11
+ "v238a1ca9": mainPadding.value
12
+ }));
9
13
  const props = __props;
14
+ const mainPadding = computed(() => {
15
+ const tb = props.record.options?.style?.tbPadding ?? 0;
16
+ const lr = props.record.options?.style?.lrPadding ?? 0;
17
+ return `${tb}px ${lr}px`;
18
+ });
10
19
  return (_ctx, _cache) => {
11
20
  const _component_a_select = resolveComponent("a-select");
12
21
  const _component_a_form_item = resolveComponent("a-form-item");
13
22
  const _component_a_form = resolveComponent("a-form");
14
- return openBlock(), createElementBlock("div", {
15
- class: "main-select",
16
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
17
- }, [
23
+ return openBlock(), createElementBlock("div", _hoisted_1, [
18
24
  createVNode(_component_a_form, {
19
25
  layout: props.record.options.flex
20
26
  }, {
@@ -27,7 +33,7 @@ const _sfc_main = {
27
33
  value: props.record.options.defaultValue,
28
34
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.defaultValue = $event),
29
35
  placeholder: props.record.options.placeholder,
30
- style: { "width": "100%" },
36
+ class: "select-full-width",
31
37
  options: props.record.options.optionsMode === "fixed" ? props.record.options.optionsFixed : props.record.options.optionsAuto
32
38
  }, null, 8, ["value", "placeholder", "options"])
33
39
  ]),
@@ -36,11 +42,11 @@ const _sfc_main = {
36
42
  ]),
37
43
  _: 1
38
44
  }, 8, ["layout"])
39
- ], 4);
45
+ ]);
40
46
  };
41
47
  }
42
48
  };
43
- const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5707ab7d"]]);
49
+ const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-571dd7f7"]]);
44
50
  export {
45
51
  Select as default
46
52
  };
@@ -1,21 +1,27 @@
1
- import { ref, resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, unref } from "vue";
1
+ import { useCssVars, computed, ref, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, 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-enterpriseSearch" };
5
6
  const _sfc_main = {
6
7
  __name: "enterpriseSearch",
7
8
  props: ["record"],
8
9
  setup(__props) {
10
+ useCssVars((_ctx) => ({
11
+ "v0fe1127a": mainPadding.value
12
+ }));
9
13
  const props = __props;
10
14
  const value = ref(props.record.options?.defaultValue || null);
15
+ const mainPadding = computed(() => {
16
+ const tb = props.record.options?.style?.tbPadding ?? 0;
17
+ const lr = props.record.options?.style?.lrPadding ?? 0;
18
+ return `${tb}px ${lr}px`;
19
+ });
11
20
  return (_ctx, _cache) => {
12
21
  const _component_a_select = resolveComponent("a-select");
13
22
  const _component_a_form_item = resolveComponent("a-form-item");
14
23
  const _component_a_form = resolveComponent("a-form");
15
- return openBlock(), createElementBlock("div", {
16
- class: "main-enterpriseSearch",
17
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
18
- }, [
24
+ return openBlock(), createElementBlock("div", _hoisted_1, [
19
25
  createVNode(_component_a_form, {
20
26
  layout: props.record.options.flex
21
27
  }, {
@@ -28,7 +34,7 @@ const _sfc_main = {
28
34
  value: value.value,
29
35
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => value.value = $event),
30
36
  options: [],
31
- style: { "width": "100%" },
37
+ class: "select-full-width",
32
38
  placeholder: props.record.options.placeholder
33
39
  }, null, 8, ["value", "placeholder"])
34
40
  ]),
@@ -37,11 +43,11 @@ const _sfc_main = {
37
43
  ]),
38
44
  _: 1
39
45
  }, 8, ["layout"])
40
- ], 4);
46
+ ]);
41
47
  };
42
48
  }
43
49
  };
44
- const EnterpriseSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c4da076f"]]);
50
+ const EnterpriseSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c8667f37"]]);
45
51
  export {
46
52
  EnterpriseSearch as default
47
53
  };
@@ -1,11 +1,28 @@
1
- import { computed, resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode } from "vue";
1
+ import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode } from "vue";
2
2
  /* empty css */
3
3
  import _export_sfc from "./sun-card-design-pc.es28.js";
4
+ const _hoisted_1 = { class: "main-table" };
4
5
  const _sfc_main = {
5
6
  __name: "tableComp",
6
7
  props: ["record"],
7
8
  setup(__props) {
9
+ useCssVars((_ctx) => ({
10
+ "v541db8cf": mainPadding.value,
11
+ "v4a954456": tableFontSize.value,
12
+ "v0db5956c": tableCellPadding.value
13
+ }));
8
14
  const props = __props;
15
+ const mainPadding = computed(() => {
16
+ const tb = props.record.options?.style?.tbPadding ?? 0;
17
+ const lr = props.record.options?.style?.lrPadding ?? 0;
18
+ return `${tb}px ${lr}px`;
19
+ });
20
+ const tableFontSize = computed(() => {
21
+ return (props.record.options.style.fontSize || 14) + "px";
22
+ });
23
+ const tableCellPadding = computed(() => {
24
+ return (props.record.options.style.padding || 6) + "px";
25
+ });
9
26
  const parseJsonSafe = (str) => {
10
27
  try {
11
28
  return JSON.parse(str);
@@ -29,14 +46,7 @@ const _sfc_main = {
29
46
  });
30
47
  return (_ctx, _cache) => {
31
48
  const _component_a_table = resolveComponent("a-table");
32
- return openBlock(), createElementBlock("div", {
33
- class: "main-table",
34
- style: normalizeStyle({
35
- "--tbl-font-size": (props.record.options.style.fontSize || 14) + "px",
36
- "--tbl-cell-padding": (props.record.options.style.padding || 6) + "px",
37
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
38
- })
39
- }, [
49
+ return openBlock(), createElementBlock("div", _hoisted_1, [
40
50
  createVNode(_component_a_table, {
41
51
  columns: props.record.options.columns,
42
52
  "data-source": dataSource.value,
@@ -44,11 +54,11 @@ const _sfc_main = {
44
54
  size: "small",
45
55
  pagination: false
46
56
  }, null, 8, ["columns", "data-source", "bordered"])
47
- ], 4);
57
+ ]);
48
58
  };
49
59
  }
50
60
  };
51
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f6dd6b54"]]);
61
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-287563f8"]]);
52
62
  export {
53
63
  Table as default
54
64
  };
@@ -1,13 +1,26 @@
1
- import { ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, createElementVNode } from "vue";
2
2
  import { previewData } from "./sun-card-design-pc.es26.js";
3
3
  import * as echarts from "echarts";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
+ const _hoisted_1 = { class: "barChart-table" };
6
7
  const _sfc_main = {
7
8
  __name: "barChartComp",
8
9
  props: ["record"],
9
10
  setup(__props) {
11
+ useCssVars((_ctx) => ({
12
+ "v184d84ff": mainPadding.value,
13
+ "v7ed1027e": chartWidth.value,
14
+ "v38895f8c": chartHeight.value
15
+ }));
10
16
  const props = __props;
17
+ const mainPadding = computed(() => {
18
+ const tb = props.record.options?.style?.tbPadding ?? 0;
19
+ const lr = props.record.options?.style?.lrPadding ?? 0;
20
+ return `${tb}px ${lr}px`;
21
+ });
22
+ const chartWidth = computed(() => props.record.options.style.width || "100%");
23
+ const chartHeight = computed(() => props.record.options.style.height || "300px");
11
24
  const chartDom = ref(null);
12
25
  const myChart = ref(null);
13
26
  onMounted(async () => {
@@ -108,23 +121,17 @@ const _sfc_main = {
108
121
  initRender();
109
122
  };
110
123
  return (_ctx, _cache) => {
111
- return openBlock(), createElementBlock("div", {
112
- class: "barChart-table",
113
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
114
- }, [
124
+ return openBlock(), createElementBlock("div", _hoisted_1, [
115
125
  createElementVNode("div", {
116
126
  ref_key: "chartDom",
117
127
  ref: chartDom,
118
- style: normalizeStyle({
119
- width: props.record.options.style.width,
120
- height: props.record.options.style.height
121
- })
122
- }, null, 4)
123
- ], 4);
128
+ class: "chart-container"
129
+ }, null, 512)
130
+ ]);
124
131
  };
125
132
  }
126
133
  };
127
- const BarChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bdc1c7d2"]]);
134
+ const BarChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5e839353"]]);
128
135
  export {
129
136
  BarChart as default
130
137
  };
@@ -1,4 +1,4 @@
1
- import { ref, computed, onMounted, onUnmounted, createElementBlock, openBlock, normalizeStyle } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, onUnmounted, createElementBlock, openBlock } from "vue";
2
2
  import * as THREE from "three";
3
3
  import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
4
4
  import { CSS2DRenderer, CSS2DObject } from "three/examples/jsm/renderers/CSS2DRenderer.js";
@@ -9,6 +9,11 @@ const _sfc_main = {
9
9
  __name: "barChart3dComp",
10
10
  props: ["record"],
11
11
  setup(__props) {
12
+ useCssVars((_ctx) => ({
13
+ "a570858a": chartWidth.value,
14
+ "v3c3e1f5c": chartHeight.value,
15
+ "v7cb5d476": mainPadding.value
16
+ }));
12
17
  const props = __props;
13
18
  const containerRef = ref(null);
14
19
  let renderer = null;
@@ -29,6 +34,13 @@ const _sfc_main = {
29
34
  height: style.height || "260px"
30
35
  };
31
36
  });
37
+ const mainPadding = computed(() => {
38
+ const tb = props.record.options?.style?.tbPadding ?? 0;
39
+ const lr = props.record.options?.style?.lrPadding ?? 0;
40
+ return `${tb}px ${lr}px`;
41
+ });
42
+ const chartWidth = computed(() => chartStyle.value.width);
43
+ const chartHeight = computed(() => chartStyle.value.height);
32
44
  function getChartConfig() {
33
45
  const options = props.record?.options || {};
34
46
  const xAxis = options.xAxisConfig[0];
@@ -360,17 +372,12 @@ const _sfc_main = {
360
372
  return openBlock(), createElementBlock("div", {
361
373
  class: "mian-barChart3d",
362
374
  ref_key: "containerRef",
363
- ref: containerRef,
364
- style: normalizeStyle({
365
- width: chartStyle.value.width,
366
- height: chartStyle.value.height,
367
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
368
- })
369
- }, null, 4);
375
+ ref: containerRef
376
+ }, null, 512);
370
377
  };
371
378
  }
372
379
  };
373
- const BarChart3D = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b648570"]]);
380
+ const BarChart3D = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-248d2e73"]]);
374
381
  export {
375
382
  BarChart3D as default
376
383
  };
@@ -1,13 +1,26 @@
1
- import { ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, createElementVNode } from "vue";
2
2
  import { previewData } from "./sun-card-design-pc.es26.js";
3
3
  import * as echarts from "echarts";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
+ const _hoisted_1 = { class: "pieChart-table" };
6
7
  const _sfc_main = {
7
8
  __name: "pieChartComp",
8
9
  props: ["record"],
9
10
  setup(__props) {
11
+ useCssVars((_ctx) => ({
12
+ "v25b54c2e": mainPadding.value,
13
+ "v645c6497": chartWidth.value,
14
+ "v0d613476": chartHeight.value
15
+ }));
10
16
  const props = __props;
17
+ const mainPadding = computed(() => {
18
+ const tb = props.record.options?.style?.tbPadding ?? 0;
19
+ const lr = props.record.options?.style?.lrPadding ?? 0;
20
+ return `${tb}px ${lr}px`;
21
+ });
22
+ const chartWidth = computed(() => props.record.options.style.width || "100%");
23
+ const chartHeight = computed(() => props.record.options.style.height || "300px");
11
24
  const chartDom = ref(null);
12
25
  const myChart = ref(null);
13
26
  onMounted(async () => {
@@ -105,23 +118,17 @@ const _sfc_main = {
105
118
  initRender();
106
119
  };
107
120
  return (_ctx, _cache) => {
108
- return openBlock(), createElementBlock("div", {
109
- class: "pieChart-table",
110
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
111
- }, [
121
+ return openBlock(), createElementBlock("div", _hoisted_1, [
112
122
  createElementVNode("div", {
113
123
  ref_key: "chartDom",
114
124
  ref: chartDom,
115
- style: normalizeStyle({
116
- width: props.record.options.style.width,
117
- height: props.record.options.style.height
118
- })
119
- }, null, 4)
120
- ], 4);
125
+ class: "chart-container"
126
+ }, null, 512)
127
+ ]);
121
128
  };
122
129
  }
123
130
  };
124
- const PieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-28332879"]]);
131
+ const PieChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1b08cbef"]]);
125
132
  export {
126
133
  PieChart as default
127
134
  };
@@ -1,4 +1,4 @@
1
- import { ref, computed, onMounted, onUnmounted, createElementBlock, openBlock, normalizeStyle } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, onUnmounted, createElementBlock, openBlock } from "vue";
2
2
  import * as THREE from "three";
3
3
  import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
4
4
  import { CSS2DRenderer, CSS2DObject } from "three/examples/jsm/renderers/CSS2DRenderer.js";
@@ -9,6 +9,11 @@ const _sfc_main = {
9
9
  __name: "pieChart3dComp",
10
10
  props: ["record"],
11
11
  setup(__props) {
12
+ useCssVars((_ctx) => ({
13
+ "v32d4b67a": chartWidth.value,
14
+ "v5b600c6c": chartHeight.value,
15
+ "v9bd7c186": mainPadding.value
16
+ }));
12
17
  const props = __props;
13
18
  const containerRef = ref(null);
14
19
  let renderer = null;
@@ -27,6 +32,13 @@ const _sfc_main = {
27
32
  height: style.height || "260px"
28
33
  };
29
34
  });
35
+ const mainPadding = computed(() => {
36
+ const tb = props.record.options?.style?.tbPadding ?? 0;
37
+ const lr = props.record.options?.style?.lrPadding ?? 0;
38
+ return `${tb}px ${lr}px`;
39
+ });
40
+ const chartWidth = computed(() => chartStyle.value.width);
41
+ const chartHeight = computed(() => chartStyle.value.height);
30
42
  function getPieConfig() {
31
43
  const options = props.record?.options || {};
32
44
  const series = Array.isArray(options?.seriesConfig) && options.seriesConfig[0] ? options.seriesConfig[0] : {
@@ -333,17 +345,12 @@ const _sfc_main = {
333
345
  return openBlock(), createElementBlock("div", {
334
346
  class: "main-pieChart3d",
335
347
  ref_key: "containerRef",
336
- ref: containerRef,
337
- style: normalizeStyle({
338
- width: chartStyle.value.width,
339
- height: chartStyle.value.height,
340
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
341
- })
342
- }, null, 4);
348
+ ref: containerRef
349
+ }, null, 512);
343
350
  };
344
351
  }
345
352
  };
346
- const PieChart3D = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b39e3b32"]]);
353
+ const PieChart3D = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-98ee1777"]]);
347
354
  export {
348
355
  PieChart3D as default
349
356
  };
@@ -1,13 +1,26 @@
1
- import { ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
1
+ import { useCssVars, computed, ref, onMounted, nextTick, onBeforeUnmount, createElementBlock, openBlock, createElementVNode } from "vue";
2
2
  import { previewData } from "./sun-card-design-pc.es26.js";
3
3
  import * as echarts from "echarts";
4
4
  /* empty css */
5
5
  import _export_sfc from "./sun-card-design-pc.es28.js";
6
+ const _hoisted_1 = { class: "lineChart-table" };
6
7
  const _sfc_main = {
7
8
  __name: "lineChartComp",
8
9
  props: ["record"],
9
10
  setup(__props) {
11
+ useCssVars((_ctx) => ({
12
+ "v39471581": mainPadding.value,
13
+ "v45c8d5ff": chartWidth.value,
14
+ "v5982f00e": chartHeight.value
15
+ }));
10
16
  const props = __props;
17
+ const mainPadding = computed(() => {
18
+ const tb = props.record.options?.style?.tbPadding ?? 0;
19
+ const lr = props.record.options?.style?.lrPadding ?? 0;
20
+ return `${tb}px ${lr}px`;
21
+ });
22
+ const chartWidth = computed(() => props.record.options.style.width || "100%");
23
+ const chartHeight = computed(() => props.record.options.style.height || "300px");
11
24
  const chartDom = ref(null);
12
25
  const myChart = ref(null);
13
26
  onMounted(async () => {
@@ -110,23 +123,17 @@ const _sfc_main = {
110
123
  initRender();
111
124
  };
112
125
  return (_ctx, _cache) => {
113
- return openBlock(), createElementBlock("div", {
114
- class: "lineChart-table",
115
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
116
- }, [
126
+ return openBlock(), createElementBlock("div", _hoisted_1, [
117
127
  createElementVNode("div", {
118
128
  ref_key: "chartDom",
119
129
  ref: chartDom,
120
- style: normalizeStyle({
121
- width: props.record.options.style.width,
122
- height: props.record.options.style.height
123
- })
124
- }, null, 4)
125
- ], 4);
130
+ class: "chart-container"
131
+ }, null, 512)
132
+ ]);
126
133
  };
127
134
  }
128
135
  };
129
- const LineChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c3a80733"]]);
136
+ const LineChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f91a3af6"]]);
130
137
  export {
131
138
  LineChart as default
132
139
  };