st-comp 0.0.72 → 0.0.73
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +14 -12
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +15 -13
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +15 -13
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +21 -19
- package/es/Map.cjs +1 -1
- package/es/Map.js +25 -23
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +192 -190
- package/es/Pie.cjs +2 -2
- package/es/Pie.js +21 -19
- package/es/Table.cjs +3 -3
- package/es/Table.js +344 -342
- package/es/TreeMap.cjs +2 -2
- package/es/TreeMap.js +23 -21
- package/es/VarietySearch.cjs +2 -2
- package/es/VarietySearch.js +365 -363
- package/es/VirtualTable.cjs +3 -3
- package/es/VirtualTable.js +288 -286
- package/lib/bundle.js +3827 -3805
- package/lib/bundle.umd.cjs +28 -28
- package/package.json +1 -1
- package/packages/ChartLayout/index.ts +2 -0
- package/packages/Dialog/index.ts +2 -0
- package/packages/HeatMap/index.ts +2 -0
- package/packages/LinearLegend/index.ts +2 -0
- package/packages/Map/index.ts +2 -0
- package/packages/Pagination/index.ts +2 -0
- package/packages/Pie/index.ts +2 -0
- package/packages/Table/index.ts +2 -0
- package/packages/TreeMap/index.ts +2 -0
- package/packages/VarietySearch/index.ts +2 -0
- package/packages/VirtualTable/index.ts +2 -0
- package/vitePlugins/createExportFile.ts +2 -0
package/es/Pie.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),
|
|
2
|
-
${t.label||t.value}(${typeof t.percent=="number"?t.percent:
|
|
1
|
+
"use strict";const r=require("vue"),C=require("echarts"),b=require("./bundle.umd-c5698c50.cjs"),F=require("./_plugin-vue_export-helper-f246444f.cjs");require("./_commonjsHelpers-87b0abe8.cjs");function B(o){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(a,l,i.get?i:{enumerable:!0,get:()=>o[l]})}}return a.default=o,Object.freeze(a)}const D=B(C),E=r.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},config:{type:Object,default:()=>({})},style:{type:Object,default:()=>[]}},setup(o){const{add:a,multiply:l,divide:i,round:v}=b.bundle_umdExports.stMath,g={colorList:["#FAF277","#FFC467","#FFA872","#FB962E","#FF772C","#FF577C","#F679D7","#9B4A9B","#9169D7","#9192D0","#655AC7","#4084DE","#0074DA","#0098DF","#00BBE9","#00D2DE","#73E2E6","#00CBB1","#00B488","#48D09A","#93D984","#C9EC7C","#D4E300","#E2BA2B","#A18300","#BC6F3F","#A84E12","#7C462E","#713532","#962B23"],legendColor:"#000",inactiveColor:"#ccc"},y={tooltipFormatter:null};let s,u;const n=o,p=r.ref(),m=r.computed(()=>({...g,...n.style})),h=r.computed(()=>({...y,...n.config}));r.watch(()=>[n.data,n.style],()=>{f()},{deep:!0}),r.onMounted(()=>{s=D.init(p.value),f();let c=!0;u=new ResizeObserver(()=>{if(c){c=null;return}s.resize()}),u.observe(p.value)}),r.onUnmounted(()=>{s.dispose(),u.disconnect(),u=null});const f=()=>{const c=n.data.reduce((e,t)=>a(e,t.value),0);s.setOption({color:m.value.colorList,tooltip:{trigger:"item",confine:!0,formatter:h.value.tooltipFormatter},legend:{orient:"vertical",right:0,bottom:0,itemWidth:28,itemHeight:18,textStyle:{fontSize:12,color:m.value.legendColor},inactiveColor:m.value.inactiveColor,formatter:e=>{const t=n.data.find(d=>d.name===e);return`${e}
|
|
2
|
+
${t.label||t.value}(${typeof t.percent=="number"?t.percent:v(l(i(t.value,c),100))}%)`}},series:[{type:"pie",width:"150%",height:"150%",center:[`${100/3}%`,`${100/3}%`],radius:"50%",data:n.data.map(e=>({...e,itemStyle:{color:e.color}})),label:{show:!0,position:"inside",formatter:e=>{var d;const t=((d=e==null?void 0:e.data)==null?void 0:d.label)||e.value;return t===0?"":t},fontSize:14,color:"#000"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]})};return(c,e)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chartRef",ref:p,class:"chart"},null,512))}});const _=F._export_sfc(E,[["__scopeId","data-v-964eca86"]]),x={install(o){o.component("st-pie",_)},componentName:"st-pie",component:_};module.exports=x;
|
package/es/Pie.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 x from "echarts";
|
|
3
|
+
import { b as w } 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 S = /* @__PURE__ */ y({
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
setup(i) {
|
|
25
|
-
const { add:
|
|
25
|
+
const { add: m, multiply: f, divide: _, round: v } = w.stMath, h = {
|
|
26
26
|
colorList: [
|
|
27
27
|
"#FAF277",
|
|
28
28
|
"#FFC467",
|
|
@@ -58,19 +58,19 @@ const S = /* @__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 = x.init(s.value), d();
|
|
74
74
|
let r = !0;
|
|
75
75
|
l = new ResizeObserver(() => {
|
|
76
76
|
if (r) {
|
|
@@ -79,17 +79,17 @@ const S = /* @__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 S = /* @__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,17 +143,19 @@ ${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
|
|
153
|
+
const p = /* @__PURE__ */ S(z, [["__scopeId", "data-v-964eca86"]]), j = {
|
|
154
154
|
install(i) {
|
|
155
|
-
i.component("st-pie",
|
|
156
|
-
}
|
|
155
|
+
i.component("st-pie", p);
|
|
156
|
+
},
|
|
157
|
+
componentName: "st-pie",
|
|
158
|
+
component: p
|
|
157
159
|
};
|
|
158
160
|
export {
|
|
159
161
|
j as default
|