sun-card-design 1.1.37 → 1.1.38

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 (152) hide show
  1. package/package.json +1 -1
  2. package/dist/mobile/sun-card-design-mobile.es61.js +0 -98
  3. package/dist/mobile/sun-card-design-mobile.es62.js +0 -98
  4. package/dist/public/sun-card-designer.css +0 -1
  5. package/dist/sun-card-designer.es.js +0 -25
  6. package/dist/sun-card-designer.es10.js +0 -167
  7. package/dist/sun-card-designer.es11.js +0 -197
  8. package/dist/sun-card-designer.es12.js +0 -203
  9. package/dist/sun-card-designer.es13.js +0 -130
  10. package/dist/sun-card-designer.es14.js +0 -120
  11. package/dist/sun-card-designer.es151.js +0 -4
  12. package/dist/sun-card-designer.es152.js +0 -4
  13. package/dist/sun-card-designer.es153.js +0 -4
  14. package/dist/sun-card-designer.es154.js +0 -4
  15. package/dist/sun-card-designer.es155.js +0 -82
  16. package/dist/sun-card-designer.es156.js +0 -91
  17. package/dist/sun-card-designer.es157.js +0 -92
  18. package/dist/sun-card-designer.es158.js +0 -191
  19. package/dist/sun-card-designer.es159.js +0 -86
  20. package/dist/sun-card-designer.es16.js +0 -10
  21. package/dist/sun-card-designer.es160.js +0 -238
  22. package/dist/sun-card-designer.es161.js +0 -113
  23. package/dist/sun-card-designer.es162.js +0 -49
  24. package/dist/sun-card-designer.es163.js +0 -43
  25. package/dist/sun-card-designer.es164.js +0 -39
  26. package/dist/sun-card-designer.es165.js +0 -46
  27. package/dist/sun-card-designer.es166.js +0 -58
  28. package/dist/sun-card-designer.es167.js +0 -56
  29. package/dist/sun-card-designer.es168.js +0 -58
  30. package/dist/sun-card-designer.es169.js +0 -73
  31. package/dist/sun-card-designer.es17.js +0 -333
  32. package/dist/sun-card-designer.es170.js +0 -59
  33. package/dist/sun-card-designer.es171.js +0 -69
  34. package/dist/sun-card-designer.es172.js +0 -182
  35. package/dist/sun-card-designer.es173.js +0 -176
  36. package/dist/sun-card-designer.es174.js +0 -184
  37. package/dist/sun-card-designer.es175.js +0 -409
  38. package/dist/sun-card-designer.es176.js +0 -365
  39. package/dist/sun-card-designer.es177.js +0 -70
  40. package/dist/sun-card-designer.es178.js +0 -68
  41. package/dist/sun-card-designer.es179.js +0 -184
  42. package/dist/sun-card-designer.es18.js +0 -68
  43. package/dist/sun-card-designer.es180.js +0 -193
  44. package/dist/sun-card-designer.es181.js +0 -193
  45. package/dist/sun-card-designer.es182.js +0 -193
  46. package/dist/sun-card-designer.es184.js +0 -228
  47. package/dist/sun-card-designer.es185.js +0 -71
  48. package/dist/sun-card-designer.es19.js +0 -611
  49. package/dist/sun-card-designer.es196.js +0 -4
  50. package/dist/sun-card-designer.es20.js +0 -225
  51. package/dist/sun-card-designer.es201.js +0 -125
  52. package/dist/sun-card-designer.es21.js +0 -69
  53. package/dist/sun-card-designer.es22.js +0 -719
  54. package/dist/sun-card-designer.es220.js +0 -63
  55. package/dist/sun-card-designer.es221.js +0 -80
  56. package/dist/sun-card-designer.es222.js +0 -82
  57. package/dist/sun-card-designer.es223.js +0 -94
  58. package/dist/sun-card-designer.es224.js +0 -87
  59. package/dist/sun-card-designer.es225.js +0 -226
  60. package/dist/sun-card-designer.es226.js +0 -105
  61. package/dist/sun-card-designer.es227.js +0 -45
  62. package/dist/sun-card-designer.es228.js +0 -31
  63. package/dist/sun-card-designer.es229.js +0 -29
  64. package/dist/sun-card-designer.es23.js +0 -211
  65. package/dist/sun-card-designer.es230.js +0 -32
  66. package/dist/sun-card-designer.es231.js +0 -46
  67. package/dist/sun-card-designer.es232.js +0 -42
  68. package/dist/sun-card-designer.es233.js +0 -44
  69. package/dist/sun-card-designer.es234.js +0 -61
  70. package/dist/sun-card-designer.es235.js +0 -46
  71. package/dist/sun-card-designer.es236.js +0 -54
  72. package/dist/sun-card-designer.es237.js +0 -130
  73. package/dist/sun-card-designer.es238.js +0 -127
  74. package/dist/sun-card-designer.es239.js +0 -132
  75. package/dist/sun-card-designer.es24.js +0 -265
  76. package/dist/sun-card-designer.es240.js +0 -375
  77. package/dist/sun-card-designer.es241.js +0 -348
  78. package/dist/sun-card-designer.es242.js +0 -69
  79. package/dist/sun-card-designer.es243.js +0 -65
  80. package/dist/sun-card-designer.es244.js +0 -87
  81. package/dist/sun-card-designer.es245.js +0 -98
  82. package/dist/sun-card-designer.es246.js +0 -98
  83. package/dist/sun-card-designer.es247.js +0 -98
  84. package/dist/sun-card-designer.es25.js +0 -857
  85. package/dist/sun-card-designer.es26.js +0 -768
  86. package/dist/sun-card-designer.es260.js +0 -125
  87. package/dist/sun-card-designer.es27.js +0 -264
  88. package/dist/sun-card-designer.es273.js +0 -192
  89. package/dist/sun-card-designer.es28.js +0 -809
  90. package/dist/sun-card-designer.es29.js +0 -220
  91. package/dist/sun-card-designer.es3.js +0 -506
  92. package/dist/sun-card-designer.es30.js +0 -809
  93. package/dist/sun-card-designer.es31.js +0 -220
  94. package/dist/sun-card-designer.es32.js +0 -820
  95. package/dist/sun-card-designer.es33.js +0 -225
  96. package/dist/sun-card-designer.es34.js +0 -69
  97. package/dist/sun-card-designer.es35.js +0 -375
  98. package/dist/sun-card-designer.es36.js +0 -186
  99. package/dist/sun-card-designer.es37.js +0 -119
  100. package/dist/sun-card-designer.es38.js +0 -354
  101. package/dist/sun-card-designer.es39.js +0 -127
  102. package/dist/sun-card-designer.es4.js +0 -365
  103. package/dist/sun-card-designer.es40.js +0 -100
  104. package/dist/sun-card-designer.es41.js +0 -214
  105. package/dist/sun-card-designer.es42.js +0 -119
  106. package/dist/sun-card-designer.es43.js +0 -250
  107. package/dist/sun-card-designer.es44.js +0 -118
  108. package/dist/sun-card-designer.es45.js +0 -64
  109. package/dist/sun-card-designer.es46.js +0 -223
  110. package/dist/sun-card-designer.es47.js +0 -196
  111. package/dist/sun-card-designer.es48.js +0 -77
  112. package/dist/sun-card-designer.es49.js +0 -85
  113. package/dist/sun-card-designer.es5.js +0 -317
  114. package/dist/sun-card-designer.es50.js +0 -85
  115. package/dist/sun-card-designer.es51.js +0 -64
  116. package/dist/sun-card-designer.es52.js +0 -283
  117. package/dist/sun-card-designer.es53.js +0 -64
  118. package/dist/sun-card-designer.es54.js +0 -142
  119. package/dist/sun-card-designer.es55.js +0 -52
  120. package/dist/sun-card-designer.es56.js +0 -85
  121. package/dist/sun-card-designer.es57.js +0 -258
  122. package/dist/sun-card-designer.es58.js +0 -226
  123. package/dist/sun-card-designer.es59.js +0 -169
  124. package/dist/sun-card-designer.es6.js +0 -190
  125. package/dist/sun-card-designer.es60.js +0 -280
  126. package/dist/sun-card-designer.es61.js +0 -168
  127. package/dist/sun-card-designer.es62.js +0 -219
  128. package/dist/sun-card-designer.es63.js +0 -168
  129. package/dist/sun-card-designer.es64.js +0 -275
  130. package/dist/sun-card-designer.es65.js +0 -760
  131. package/dist/sun-card-designer.es66.js +0 -272
  132. package/dist/sun-card-designer.es67.js +0 -559
  133. package/dist/sun-card-designer.es68.js +0 -124
  134. package/dist/sun-card-designer.es69.js +0 -528
  135. package/dist/sun-card-designer.es7.js +0 -65
  136. package/dist/sun-card-designer.es70.js +0 -185
  137. package/dist/sun-card-designer.es71.js +0 -107
  138. package/dist/sun-card-designer.es72.js +0 -153
  139. package/dist/sun-card-designer.es73.js +0 -315
  140. package/dist/sun-card-designer.es74.js +0 -114
  141. package/dist/sun-card-designer.es76.js +0 -4211
  142. package/dist/sun-card-designer.es79.js +0 -4
  143. package/dist/sun-card-designer.es8.js +0 -171
  144. package/dist/sun-card-designer.es80.js +0 -4
  145. package/dist/sun-card-designer.es81.js +0 -4
  146. package/dist/sun-card-designer.es84.js +0 -228
  147. package/dist/sun-card-designer.es87.js +0 -52
  148. package/dist/sun-card-designer.es88.js +0 -52
  149. package/dist/sun-card-designer.es9.js +0 -207
  150. package/dist/sun-card-designer.es91.js +0 -344
  151. package/dist/sun-card-designer.es92.js +0 -199
  152. package/dist/sun-card-designer.es95.js +0 -180
@@ -1,185 +0,0 @@
1
- import { computed, ref, reactive, watch, onMounted, onBeforeUnmount, resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, Fragment, renderList, withModifiers, createCommentVNode, normalizeStyle, toDisplayString } from "vue";
2
- import { ColorNameMap, ColorList } from "./sun-card-designer.es76.js";
3
- import { Vue3JsonEditor } from "vue3-json-editor";
4
- import { DownOutlined } from "@ant-design/icons-vue";
5
- /* empty css */
6
- import _export_sfc from "./sun-card-designer.es16.js";
7
- const _hoisted_1 = { class: "pie3d-base-pes" };
8
- const _hoisted_2 = ["onClick"];
9
- const _hoisted_3 = { class: "label" };
10
- const _hoisted_4 = { class: "arrow" };
11
- const _hoisted_5 = {
12
- key: 0,
13
- class: "color-picker"
14
- };
15
- const _hoisted_6 = { class: "color-grid" };
16
- const _hoisted_7 = ["onClick"];
17
- const _sfc_main = {
18
- __name: "pieChart3DBasePes",
19
- props: { record: { type: Object, required: true } },
20
- setup(__props) {
21
- const props = __props;
22
- const record = props.record;
23
- const seriesRef = computed({
24
- get() {
25
- return record.options?.seriesConfig && record.options.seriesConfig[0] || { data: [], radius: "0%", colorsMap: {} };
26
- },
27
- set(val) {
28
- if (!Array.isArray(record.options.seriesConfig)) record.options.seriesConfig = [{}];
29
- record.options.seriesConfig[0] = { ...record.options.seriesConfig[0], ...val };
30
- }
31
- });
32
- const jsonData = ref(Array.isArray(seriesRef.value.data) ? seriesRef.value.data : []);
33
- const colorsMap = reactive({ ...seriesRef.value.colorsMap || {} });
34
- const colorList = ColorList;
35
- const openPicker = ref("");
36
- const nameList = computed(() => Array.isArray(jsonData.value) ? jsonData.value.map((i) => i?.name).filter(Boolean) : []);
37
- watch(jsonData, (val) => {
38
- if (Array.isArray(val)) {
39
- const cleaned = val.map((it, idx) => ({ value: Number(it?.value) || 0, name: it?.name ?? `项${idx + 1}` }));
40
- seriesRef.value = { data: cleaned, colorsMap: { ...colorsMap } };
41
- }
42
- }, { deep: true });
43
- watch(colorsMap, () => {
44
- seriesRef.value = { data: Array.isArray(jsonData.value) ? jsonData.value : [], colorsMap: { ...colorsMap } };
45
- }, { deep: true });
46
- const toggleColorPicker = (name) => {
47
- openPicker.value = openPicker.value === name ? "" : name;
48
- };
49
- const pickNameColor = (name, c) => {
50
- colorsMap[name] = c;
51
- openPicker.value = "";
52
- };
53
- const colorNameFor = (name) => ColorNameMap[colorsMap[name]] || "自定义";
54
- function handleOutside(e) {
55
- if (!(e.target.closest && e.target.closest(".color-select"))) openPicker.value = "";
56
- }
57
- onMounted(() => {
58
- window.addEventListener("click", handleOutside);
59
- });
60
- onBeforeUnmount(() => {
61
- window.removeEventListener("click", handleOutside);
62
- });
63
- const innerPercent = computed({
64
- get() {
65
- const r = seriesRef.value.radius;
66
- const inner = Array.isArray(r) ? r[0] ?? "0%" : r ?? "0%";
67
- return typeof inner === "string" ? inner : `${inner}%`;
68
- },
69
- set(val) {
70
- const v = typeof val === "string" ? val : `${val}`;
71
- seriesRef.value = { radius: v };
72
- }
73
- });
74
- const onxAxisChange = (params) => {
75
- jsonData.value = params;
76
- };
77
- return (_ctx, _cache) => {
78
- const _component_a_divider = resolveComponent("a-divider");
79
- const _component_a_segmented = resolveComponent("a-segmented");
80
- const _component_a_form_item = resolveComponent("a-form-item");
81
- const _component_a_input = resolveComponent("a-input");
82
- const _component_a_col = resolveComponent("a-col");
83
- const _component_a_row = resolveComponent("a-row");
84
- const _component_a_form = resolveComponent("a-form");
85
- return openBlock(), createElementBlock("div", _hoisted_1, [
86
- createVNode(_component_a_divider, { style: { "margin-top": "0" } }),
87
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "title" }, "基础", -1)),
88
- createVNode(_component_a_form, { layout: "vertical" }, {
89
- default: withCtx(() => [
90
- createVNode(_component_a_row, { gutter: [16, 16] }, {
91
- default: withCtx(() => [
92
- createVNode(_component_a_col, { span: 24 }, {
93
- default: withCtx(() => [
94
- createVNode(_component_a_segmented, {
95
- block: "",
96
- value: unref(record).options.mode,
97
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => unref(record).options.mode = $event),
98
- options: [{ label: "静态", value: "static" }, { label: "动态", value: "dynamic" }],
99
- style: { "margin": "10px 0" }
100
- }, null, 8, ["value"]),
101
- createVNode(_component_a_form_item, { label: "系列数据(JSON)" }, {
102
- default: withCtx(() => [
103
- createVNode(unref(Vue3JsonEditor), {
104
- modelValue: jsonData.value,
105
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => jsonData.value = $event),
106
- mode: "text",
107
- "show-copy": false,
108
- "show-btns": false,
109
- expandedOnStart: true,
110
- style: { "border": "1px solid #e0e0ff", "border-radius": "6px" },
111
- onJsonChange: onxAxisChange
112
- }, null, 8, ["modelValue"])
113
- ]),
114
- _: 1
115
- }),
116
- createVNode(_component_a_form_item, { label: "内圈空心(%)" }, {
117
- default: withCtx(() => [
118
- createVNode(_component_a_input, {
119
- value: innerPercent.value,
120
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => innerPercent.value = $event),
121
- placeholder: "例如:0% ~ 90%"
122
- }, null, 8, ["value"])
123
- ]),
124
- _: 1
125
- })
126
- ]),
127
- _: 1
128
- }),
129
- createVNode(_component_a_col, { span: 24 }, {
130
- default: withCtx(() => [
131
- createVNode(_component_a_form_item, { label: "颜色(按名称)" }, {
132
- default: withCtx(() => [
133
- (openBlock(true), createElementBlock(Fragment, null, renderList(nameList.value, (name) => {
134
- return openBlock(), createElementBlock("div", {
135
- key: name,
136
- class: "series-row"
137
- }, [
138
- createElementVNode("div", {
139
- class: "color-select",
140
- style: { "width": "100%" },
141
- onClick: withModifiers(($event) => toggleColorPicker(name), ["stop"])
142
- }, [
143
- createElementVNode("span", {
144
- class: "swatch",
145
- style: normalizeStyle({ backgroundColor: colorsMap[name] || "#2b7fff" })
146
- }, null, 4),
147
- createElementVNode("span", _hoisted_3, toDisplayString(name) + ":" + toDisplayString(colorNameFor(name)), 1),
148
- createElementVNode("span", _hoisted_4, [
149
- createVNode(unref(DownOutlined))
150
- ]),
151
- openPicker.value === name ? (openBlock(), createElementBlock("div", _hoisted_5, [
152
- createElementVNode("div", _hoisted_6, [
153
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorList), (c) => {
154
- return openBlock(), createElementBlock("span", {
155
- class: "chip",
156
- key: c,
157
- style: normalizeStyle({ backgroundColor: c }),
158
- onClick: withModifiers(($event) => pickNameColor(name, c), ["stop"])
159
- }, null, 12, _hoisted_7);
160
- }), 128))
161
- ])
162
- ])) : createCommentVNode("", true)
163
- ], 8, _hoisted_2)
164
- ]);
165
- }), 128))
166
- ]),
167
- _: 1
168
- })
169
- ]),
170
- _: 1
171
- })
172
- ]),
173
- _: 1
174
- })
175
- ]),
176
- _: 1
177
- })
178
- ]);
179
- };
180
- }
181
- };
182
- const PieChart3DBasePes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-97a41f23"]]);
183
- export {
184
- PieChart3DBasePes as default
185
- };
@@ -1,107 +0,0 @@
1
- import { resolveComponent, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref } from "vue";
2
- /* empty css */
3
- import _export_sfc from "./sun-card-designer.es16.js";
4
- const _hoisted_1 = { class: "pie3d-style-pes" };
5
- const _hoisted_2 = { class: "slider-row" };
6
- const _hoisted_3 = { class: "slider-row" };
7
- const _sfc_main = {
8
- __name: "pieChart3DStylePes",
9
- props: { record: { type: Object, required: true } },
10
- setup(__props) {
11
- const props = __props;
12
- const record = props.record;
13
- return (_ctx, _cache) => {
14
- const _component_a_divider = resolveComponent("a-divider");
15
- const _component_a_input = resolveComponent("a-input");
16
- const _component_a_form_item = resolveComponent("a-form-item");
17
- const _component_a_slider = resolveComponent("a-slider");
18
- const _component_a_input_number = resolveComponent("a-input-number");
19
- const _component_a_col = resolveComponent("a-col");
20
- const _component_a_row = resolveComponent("a-row");
21
- const _component_a_form = resolveComponent("a-form");
22
- return openBlock(), createElementBlock("div", _hoisted_1, [
23
- createVNode(_component_a_divider, { style: { "margin-top": "0" } }),
24
- _cache[6] || (_cache[6] = createElementVNode("div", { class: "title" }, "样式", -1)),
25
- createVNode(_component_a_form, { layout: "vertical" }, {
26
- default: withCtx(() => [
27
- createVNode(_component_a_row, { gutter: [16, 16] }, {
28
- default: withCtx(() => [
29
- createVNode(_component_a_col, { span: 24 }, {
30
- default: withCtx(() => [
31
- createVNode(_component_a_form_item, { label: "宽度" }, {
32
- default: withCtx(() => [
33
- createVNode(_component_a_input, {
34
- value: unref(record).options.style.width,
35
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => unref(record).options.style.width = $event),
36
- placeholder: "例如:100% 或 300px"
37
- }, null, 8, ["value"])
38
- ]),
39
- _: 1
40
- }),
41
- createVNode(_component_a_form_item, { label: "高度" }, {
42
- default: withCtx(() => [
43
- createVNode(_component_a_input, {
44
- value: unref(record).options.style.height,
45
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(record).options.style.height = $event),
46
- placeholder: "例如:100% 或 260px"
47
- }, null, 8, ["value"])
48
- ]),
49
- _: 1
50
- }),
51
- createVNode(_component_a_form_item, { label: "上下边距" }, {
52
- default: withCtx(() => [
53
- createElementVNode("div", _hoisted_2, [
54
- createVNode(_component_a_slider, {
55
- min: 0,
56
- max: 10,
57
- value: unref(record).options.style.tbPadding,
58
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => unref(record).options.style.tbPadding = $event),
59
- style: { "flex": "1", "margin-right": "12px" }
60
- }, null, 8, ["value"]),
61
- createVNode(_component_a_input_number, {
62
- min: 0,
63
- max: 10,
64
- value: unref(record).options.style.tbPadding,
65
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => unref(record).options.style.tbPadding = $event)
66
- }, null, 8, ["value"])
67
- ])
68
- ]),
69
- _: 1
70
- }),
71
- createVNode(_component_a_form_item, { label: "左右边距" }, {
72
- default: withCtx(() => [
73
- createElementVNode("div", _hoisted_3, [
74
- createVNode(_component_a_slider, {
75
- min: 0,
76
- max: 10,
77
- value: unref(record).options.style.lrPadding,
78
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => unref(record).options.style.lrPadding = $event),
79
- style: { "flex": "1", "margin-right": "12px" }
80
- }, null, 8, ["value"]),
81
- createVNode(_component_a_input_number, {
82
- min: 0,
83
- max: 10,
84
- value: unref(record).options.style.lrPadding,
85
- "onUpdate:value": _cache[5] || (_cache[5] = ($event) => unref(record).options.style.lrPadding = $event)
86
- }, null, 8, ["value"])
87
- ])
88
- ]),
89
- _: 1
90
- })
91
- ]),
92
- _: 1
93
- })
94
- ]),
95
- _: 1
96
- })
97
- ]),
98
- _: 1
99
- })
100
- ]);
101
- };
102
- }
103
- };
104
- const PieChart3DStylePes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-292fea90"]]);
105
- export {
106
- PieChart3DStylePes as default
107
- };
@@ -1,153 +0,0 @@
1
- import { ref, computed, onMounted, nextTick, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createBlock, unref } from "vue";
2
- import { Vue3JsonEditor } from "vue3-json-editor";
3
- import { useCardManageStore } from "./sun-card-designer.es13.js";
4
- /* empty css */
5
- import _export_sfc from "./sun-card-designer.es16.js";
6
- const _hoisted_1 = { class: "bar3d-base-pes" };
7
- const _sfc_main = {
8
- __name: "barChart3DBasePes",
9
- props: ["record"],
10
- setup(__props) {
11
- const props = __props;
12
- const cardManageStore = useCardManageStore();
13
- const xAxisDataProxy = ref([]);
14
- const seriesDataProxy = ref([]);
15
- const xAxisDynamicValue = ref(null);
16
- const seriesDynamicValue = ref(null);
17
- const showEditors = ref(true);
18
- const modeOptions = ref([
19
- { value: "static", label: "静态" },
20
- { value: "dynamic", label: "动态" }
21
- ]);
22
- const arrayVariableOptions = computed(() => {
23
- return (cardManageStore.variableList || []).filter((e) => e.type === "Array").map((e) => ({ label: e.name, value: e.name }));
24
- });
25
- const ensureOptionArrays = () => {
26
- props.record.options = props.record.options || {};
27
- if (!Array.isArray(props.record.options.xAxisConfig)) props.record.options.xAxisConfig = [{}];
28
- if (!Array.isArray(props.record.options.seriesConfig)) props.record.options.seriesConfig = [{ data: [] }];
29
- };
30
- const onxAxisChange = (params) => {
31
- xAxisDataProxy.value = params;
32
- };
33
- const onSeriesChange = (params) => {
34
- seriesDataProxy.value = params;
35
- };
36
- onMounted(async () => {
37
- ensureOptionArrays();
38
- showEditors.value = false;
39
- await nextTick();
40
- showEditors.value = true;
41
- if ((props.record.options.mode || "static") === "static") {
42
- xAxisDataProxy.value = JSON.parse(JSON.stringify(props.record.options.xAxisConfig?.[0]?.data || []));
43
- seriesDataProxy.value = JSON.parse(JSON.stringify(props.record.options.seriesConfig?.[0]?.data || []));
44
- xAxisDynamicValue.value = null;
45
- seriesDynamicValue.value = null;
46
- } else {
47
- xAxisDataProxy.value = "";
48
- seriesDataProxy.value = "";
49
- xAxisDynamicValue.value = JSON.parse(JSON.stringify(props.record.options.xAxisConfig?.[0]?.data || null));
50
- seriesDynamicValue.value = JSON.parse(JSON.stringify(props.record.options.seriesConfig?.[0]?.data || null));
51
- }
52
- });
53
- watch(() => xAxisDataProxy.value, (val) => {
54
- if (val !== "") {
55
- ensureOptionArrays();
56
- props.record.options.xAxisConfig[0].data = JSON.parse(JSON.stringify(val));
57
- }
58
- }, { deep: true });
59
- watch(() => seriesDataProxy.value, (val) => {
60
- if (val !== "") {
61
- ensureOptionArrays();
62
- props.record.options.seriesConfig[0].data = JSON.parse(JSON.stringify(val));
63
- }
64
- }, { deep: true });
65
- const applyXAxisDynamic = (val) => {
66
- ensureOptionArrays();
67
- props.record.options.xAxisConfig[0].data = JSON.parse(JSON.stringify(val));
68
- };
69
- const applySeriesDynamic = (val) => {
70
- ensureOptionArrays();
71
- props.record.options.seriesConfig[0].data = JSON.parse(JSON.stringify(val));
72
- };
73
- return (_ctx, _cache) => {
74
- const _component_a_segmented = resolveComponent("a-segmented");
75
- const _component_a_select = resolveComponent("a-select");
76
- const _component_a_form_item = resolveComponent("a-form-item");
77
- const _component_a_col = resolveComponent("a-col");
78
- const _component_a_row = resolveComponent("a-row");
79
- const _component_a_form = resolveComponent("a-form");
80
- return openBlock(), createElementBlock("div", _hoisted_1, [
81
- _cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "数据", -1)),
82
- createVNode(_component_a_form, { layout: "vertical" }, {
83
- default: withCtx(() => [
84
- createVNode(_component_a_row, { gutter: [16, 16] }, {
85
- default: withCtx(() => [
86
- createVNode(_component_a_col, { span: 24 }, {
87
- default: withCtx(() => [
88
- createVNode(_component_a_segmented, {
89
- block: "",
90
- value: props.record.options.mode,
91
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.mode = $event),
92
- options: modeOptions.value,
93
- style: { "margin-bottom": "10px" }
94
- }, null, 8, ["value", "options"]),
95
- createVNode(_component_a_form_item, { label: "X 轴数据" }, {
96
- default: withCtx(() => [
97
- showEditors.value && (props.record.options.mode || "static") === "static" ? (openBlock(), createBlock(unref(Vue3JsonEditor), {
98
- key: 0,
99
- mode: "text",
100
- "show-btns": false,
101
- expandedOnStart: true,
102
- modelValue: xAxisDataProxy.value,
103
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => xAxisDataProxy.value = $event),
104
- onJsonChange: onxAxisChange
105
- }, null, 8, ["modelValue"])) : (openBlock(), createBlock(_component_a_select, {
106
- key: 1,
107
- value: xAxisDynamicValue.value,
108
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => xAxisDynamicValue.value = $event),
109
- options: arrayVariableOptions.value,
110
- placeholder: "选择变量",
111
- onChange: applyXAxisDynamic
112
- }, null, 8, ["value", "options"]))
113
- ]),
114
- _: 1
115
- }),
116
- createVNode(_component_a_form_item, { label: "系列数据" }, {
117
- default: withCtx(() => [
118
- showEditors.value && (props.record.options.mode || "static") === "static" ? (openBlock(), createBlock(unref(Vue3JsonEditor), {
119
- key: 0,
120
- mode: "text",
121
- "show-btns": false,
122
- expandedOnStart: false,
123
- modelValue: seriesDataProxy.value,
124
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => seriesDataProxy.value = $event),
125
- onJsonChange: onSeriesChange
126
- }, null, 8, ["modelValue"])) : (openBlock(), createBlock(_component_a_select, {
127
- key: 1,
128
- value: seriesDynamicValue.value,
129
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => seriesDynamicValue.value = $event),
130
- options: arrayVariableOptions.value,
131
- placeholder: "选择数组变量",
132
- onChange: applySeriesDynamic
133
- }, null, 8, ["value", "options"]))
134
- ]),
135
- _: 1
136
- })
137
- ]),
138
- _: 1
139
- })
140
- ]),
141
- _: 1
142
- })
143
- ]),
144
- _: 1
145
- })
146
- ]);
147
- };
148
- }
149
- };
150
- const BarChart3DBasePes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9bf8113a"]]);
151
- export {
152
- BarChart3DBasePes as default
153
- };