st-comp 0.0.70 → 0.0.71
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/lib/ChartLayout.cjs.js +1 -1
- package/lib/ChartLayout.es.js +13 -14
- package/lib/Dialog.cjs.js +1 -1
- package/lib/Dialog.es.js +20 -21
- package/lib/HeatMap.cjs.js +1 -1
- package/lib/HeatMap.es.js +20 -21
- package/lib/LinearLegend.cjs.js +1 -1
- package/lib/LinearLegend.es.js +18 -19
- package/lib/Map.cjs.js +1 -1
- package/lib/Map.es.js +24 -25
- package/lib/Pagination.cjs.js +1 -1
- package/lib/Pagination.es.js +142 -143
- package/lib/Pie.cjs.js +2 -2
- package/lib/Pie.es.js +20 -21
- package/lib/Table.cjs.js +3 -3
- package/lib/Table.es.js +344 -345
- package/lib/TreeMap.cjs.js +2 -2
- package/lib/TreeMap.es.js +21 -22
- package/lib/VarietySearch.cjs.js +2 -2
- package/lib/VarietySearch.es.js +364 -365
- package/lib/VirtualTable.cjs.js +5 -5
- package/lib/VirtualTable.es.js +248 -249
- package/lib/bundle.es.js +6 -6
- package/package.json +1 -1
- package/packages/ChartLayout/index.ts +5 -5
- package/packages/Dialog/index.ts +5 -5
- package/packages/HeatMap/index.ts +5 -5
- package/packages/LinearLegend/index.ts +5 -5
- package/packages/Map/index.ts +5 -5
- package/packages/Pagination/index.ts +5 -5
- package/packages/Pie/index.ts +5 -5
- package/packages/Table/index.ts +5 -5
- package/packages/TreeMap/index.ts +5 -5
- package/packages/VarietySearch/index.ts +5 -5
- package/packages/VirtualTable/index.ts +5 -5
- package/vitePlugins/createExportFile.ts +5 -5
package/lib/Pie.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import * as
|
|
3
|
-
import { b as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { defineComponent as F, ref as g, computed as u, watch as B, onMounted as E, onUnmounted as b, openBlock as D, createElementBlock as A } from "vue";
|
|
2
|
+
import * as w from "echarts";
|
|
3
|
+
import { b as x } from "./bundle.umd-4967d574.js";
|
|
4
|
+
import { _ as S } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "./_commonjsHelpers-10dfc225.js";
|
|
6
|
-
const
|
|
6
|
+
const z = /* @__PURE__ */ F({
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
9
9
|
data: {
|
|
@@ -22,7 +22,7 @@ const x = /* @__PURE__ */ y({
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
setup(i) {
|
|
25
|
-
const { add:
|
|
25
|
+
const { add: m, multiply: f, divide: _, round: v } = x.stMath, h = {
|
|
26
26
|
colorList: [
|
|
27
27
|
"#FAF277",
|
|
28
28
|
"#FFC467",
|
|
@@ -58,19 +58,19 @@ const x = /* @__PURE__ */ y({
|
|
|
58
58
|
// 饼图颜色列表
|
|
59
59
|
legendColor: "#000",
|
|
60
60
|
inactiveColor: "#ccc"
|
|
61
|
-
},
|
|
61
|
+
}, C = {
|
|
62
62
|
tooltipFormatter: null
|
|
63
63
|
};
|
|
64
64
|
let a, l;
|
|
65
|
-
const o = i, s =
|
|
66
|
-
|
|
65
|
+
const o = i, s = g(), c = u(() => ({ ...h, ...o.style })), y = u(() => ({ ...C, ...o.config }));
|
|
66
|
+
B(
|
|
67
67
|
() => [o.data, o.style],
|
|
68
68
|
() => {
|
|
69
69
|
d();
|
|
70
70
|
},
|
|
71
71
|
{ deep: !0 }
|
|
72
|
-
),
|
|
73
|
-
a =
|
|
72
|
+
), E(() => {
|
|
73
|
+
a = w.init(s.value), d();
|
|
74
74
|
let r = !0;
|
|
75
75
|
l = new ResizeObserver(() => {
|
|
76
76
|
if (r) {
|
|
@@ -79,17 +79,17 @@ const x = /* @__PURE__ */ y({
|
|
|
79
79
|
}
|
|
80
80
|
a.resize();
|
|
81
81
|
}), l.observe(s.value);
|
|
82
|
-
}),
|
|
82
|
+
}), b(() => {
|
|
83
83
|
a.dispose(), l.disconnect(), l = null;
|
|
84
84
|
});
|
|
85
85
|
const d = () => {
|
|
86
|
-
const r = o.data.reduce((e, t) =>
|
|
86
|
+
const r = o.data.reduce((e, t) => m(e, t.value), 0);
|
|
87
87
|
a.setOption({
|
|
88
88
|
color: c.value.colorList,
|
|
89
89
|
tooltip: {
|
|
90
90
|
trigger: "item",
|
|
91
91
|
confine: !0,
|
|
92
|
-
formatter:
|
|
92
|
+
formatter: y.value.tooltipFormatter
|
|
93
93
|
},
|
|
94
94
|
legend: {
|
|
95
95
|
orient: "vertical",
|
|
@@ -105,7 +105,7 @@ const x = /* @__PURE__ */ y({
|
|
|
105
105
|
formatter: (e) => {
|
|
106
106
|
const t = o.data.find((n) => n.name === e);
|
|
107
107
|
return `${e}
|
|
108
|
-
${t.label || t.value}(${typeof t.percent == "number" ? t.percent :
|
|
108
|
+
${t.label || t.value}(${typeof t.percent == "number" ? t.percent : v(f(_(t.value, r), 100))}%)`;
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
series: [
|
|
@@ -143,18 +143,17 @@ ${t.label || t.value}(${typeof t.percent == "number" ? t.percent : _(m(f(t.value
|
|
|
143
143
|
]
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
|
-
return (r, e) => (
|
|
146
|
+
return (r, e) => (D(), A("div", {
|
|
147
147
|
ref_key: "chartRef",
|
|
148
148
|
ref: s,
|
|
149
149
|
class: "chart"
|
|
150
150
|
}, null, 512));
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
153
|
+
const p = /* @__PURE__ */ S(z, [["__scopeId", "data-v-964eca86"]]);
|
|
154
|
+
p.install = (i) => {
|
|
155
|
+
i.component("st-pie", p);
|
|
157
156
|
};
|
|
158
157
|
export {
|
|
159
|
-
|
|
158
|
+
p as default
|
|
160
159
|
};
|