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/ChartLayout.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-4865d432.cjs");const
|
|
1
|
+
"use strict";require("./base-4865d432.cjs");const r=require("./el-empty-608948d9.cjs"),t=require("vue"),o=require("./_plugin-vue_export-helper-f246444f.cjs");const u={__name:"index",props:{data:{type:Array,default:()=>[]},spacing:{type:Number,default:()=>2},row:{type:Number,default:()=>3},col:{type:Number,default:()=>3},emptyText:{type:String,default:()=>"暂无数据"}},setup(e){return(n,d)=>{const l=r.ElEmpty;return e.data&&e.data.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:"chartLayout",style:t.normalizeStyle({width:`calc(100% + ${e.spacing}px)`,height:`calc(100% + ${e.spacing}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data.slice(0,e.col*e.row),(a,i)=>(t.openBlock(),t.createElementBlock("div",{key:a.key,class:"chartLayout-item",style:t.normalizeStyle({margin:`0 ${e.spacing}px ${e.spacing}px 0`,width:`calc(100% / ${e.row} - ${e.spacing}px)`,height:`calc(100% / ${e.col} - ${e.spacing}px)`})},[t.renderSlot(n.$slots,"default",{data:a,index:i},void 0,!0)],4))),128))],4)):(t.openBlock(),t.createBlock(l,{key:1,description:e.emptyText,style:{height:"80%"}},null,8,["description"]))}}},c=o._export_sfc(u,[["__scopeId","data-v-578f611c"]]);c.install=e=>{e.component("st-chartLayout",c)};module.exports=c;
|
package/lib/ChartLayout.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./base-a240bf62.js";
|
|
2
|
-
import { E as
|
|
3
|
-
import { openBlock as e, createElementBlock as a, normalizeStyle as n, Fragment as
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
2
|
+
import { E as o } from "./el-empty-282e5e93.js";
|
|
3
|
+
import { openBlock as e, createElementBlock as a, normalizeStyle as n, Fragment as u, renderList as y, renderSlot as s, createBlock as m } from "vue";
|
|
4
|
+
import { _ as f } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
|
+
const g = {
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
data: {
|
|
@@ -31,8 +31,8 @@ const f = {
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
setup(t) {
|
|
34
|
-
return (
|
|
35
|
-
const
|
|
34
|
+
return (i, h) => {
|
|
35
|
+
const d = o;
|
|
36
36
|
return t.data && t.data.length ? (e(), a("div", {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "chartLayout",
|
|
@@ -41,7 +41,7 @@ const f = {
|
|
|
41
41
|
height: `calc(100% + ${t.spacing}px)`
|
|
42
42
|
})
|
|
43
43
|
}, [
|
|
44
|
-
(e(!0), a(
|
|
44
|
+
(e(!0), a(u, null, y(t.data.slice(0, t.col * t.row), (c, r) => (e(), a("div", {
|
|
45
45
|
key: c.key,
|
|
46
46
|
class: "chartLayout-item",
|
|
47
47
|
style: n({
|
|
@@ -50,23 +50,22 @@ const f = {
|
|
|
50
50
|
height: `calc(100% / ${t.col} - ${t.spacing}px)`
|
|
51
51
|
})
|
|
52
52
|
}, [
|
|
53
|
-
|
|
53
|
+
s(i.$slots, "default", {
|
|
54
54
|
data: c,
|
|
55
55
|
index: r
|
|
56
56
|
}, void 0, !0)
|
|
57
57
|
], 4))), 128))
|
|
58
|
-
], 4)) : (e(),
|
|
58
|
+
], 4)) : (e(), m(d, {
|
|
59
59
|
key: 1,
|
|
60
60
|
description: t.emptyText,
|
|
61
61
|
style: { height: "80%" }
|
|
62
62
|
}, null, 8, ["description"]));
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
65
|
+
}, l = /* @__PURE__ */ f(g, [["__scopeId", "data-v-578f611c"]]);
|
|
66
|
+
l.install = (t) => {
|
|
67
|
+
t.component("st-chartLayout", l);
|
|
69
68
|
};
|
|
70
69
|
export {
|
|
71
|
-
|
|
70
|
+
l as default
|
|
72
71
|
};
|
package/lib/Dialog.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-4865d432.cjs");const
|
|
1
|
+
"use strict";require("./base-4865d432.cjs");const s=require("./zh-cn-d4df7172.cjs"),V=require("./el-overlay-7fceb816.cjs"),C=require("./el-button-c24606d0.cjs"),e=require("vue");require("./config-provider-cf4edc1e.cjs");require("./focus-trap-2a734f35.cjs");require("./index-48a9f60d.cjs");require("./vnode-abafec9e.cjs");require("./scroll-bb8039ba.cjs");require("./index-eea0bcb3.cjs");const _=e.createElementVNode("span",null,"This is a message",-1),q={class:"dialog-footer"},i=e.defineComponent({__name:"index",props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:()=>""},style:{type:String,default:()=>""}},emits:["update:modelValue"],setup(o,{emit:d}){const a=d,c=o,l=e.computed({get(){return c.modelValue},set(n){a("update:modelValue",n)}}),m=n=>{a("update:modelValue",!1)};return(n,t)=>{const u=C.ElButton,p=V.ElDialog,f=s.ElConfigProvider;return e.openBlock(),e.createBlock(f,{locale:e.unref(s.zhCn)},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:l.value,"onUpdate:modelValue":t[2]||(t[2]=r=>l.value=r),title:o.title,width:"30%","before-close":m,style:e.normalizeStyle(o.style)},{footer:e.withCtx(()=>[e.createElementVNode("span",q,[e.createVNode(u,{onClick:t[0]||(t[0]=r=>l.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("Cancel")]),_:1}),e.createVNode(u,{type:"primary",onClick:t[1]||(t[1]=r=>l.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(" Confirm ")]),_:1})])]),default:e.withCtx(()=>[_]),_:1},8,["modelValue","title","style"])]),_:1},8,["locale"])}}});i.install=o=>{o.component("st-dialog",i)};module.exports=i;
|
package/lib/Dialog.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./base-a240bf62.js";
|
|
2
|
-
import { z as g, E as
|
|
3
|
-
import { E as
|
|
4
|
-
import { E as
|
|
5
|
-
import { defineComponent as
|
|
2
|
+
import { z as g, E as y } from "./zh-cn-92978806.js";
|
|
3
|
+
import { E as v } from "./el-overlay-9b7bdd18.js";
|
|
4
|
+
import { E as C } from "./el-button-fa6a5742.js";
|
|
5
|
+
import { defineComponent as E, computed as x, openBlock as k, createBlock as B, unref as b, withCtx as o, createVNode as i, normalizeStyle as z, createElementVNode as u, createTextVNode as m } from "vue";
|
|
6
6
|
import "./config-provider-3db4dac6.js";
|
|
7
7
|
import "./focus-trap-6922b96b.js";
|
|
8
8
|
import "./index-1508a06b.js";
|
|
9
9
|
import "./vnode-a9714179.js";
|
|
10
10
|
import "./scroll-cfdae01b.js";
|
|
11
11
|
import "./index-657047bb.js";
|
|
12
|
-
const
|
|
12
|
+
const N = /* @__PURE__ */ u("span", null, "This is a message", -1), S = { class: "dialog-footer" }, d = /* @__PURE__ */ E({
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
15
15
|
modelValue: {
|
|
@@ -26,31 +26,31 @@ const b = /* @__PURE__ */ d("span", null, "This is a message", -1), z = { class:
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:modelValue"],
|
|
29
|
-
setup(t, { emit:
|
|
30
|
-
const r =
|
|
29
|
+
setup(t, { emit: p }) {
|
|
30
|
+
const r = p, f = t, l = x({
|
|
31
31
|
get() {
|
|
32
|
-
return
|
|
32
|
+
return f.modelValue;
|
|
33
33
|
},
|
|
34
34
|
set(n) {
|
|
35
35
|
r("update:modelValue", n);
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), c = (n) => {
|
|
38
38
|
r("update:modelValue", !1);
|
|
39
39
|
};
|
|
40
40
|
return (n, e) => {
|
|
41
|
-
const s =
|
|
42
|
-
return
|
|
41
|
+
const s = C, _ = v, V = y;
|
|
42
|
+
return k(), B(V, { locale: b(g) }, {
|
|
43
43
|
default: o(() => [
|
|
44
|
-
i(
|
|
44
|
+
i(_, {
|
|
45
45
|
modelValue: l.value,
|
|
46
46
|
"onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
|
|
47
47
|
title: t.title,
|
|
48
48
|
width: "30%",
|
|
49
|
-
"before-close":
|
|
50
|
-
style:
|
|
49
|
+
"before-close": c,
|
|
50
|
+
style: z(t.style)
|
|
51
51
|
}, {
|
|
52
52
|
footer: o(() => [
|
|
53
|
-
|
|
53
|
+
u("span", S, [
|
|
54
54
|
i(s, {
|
|
55
55
|
onClick: e[0] || (e[0] = (a) => l.value = !1)
|
|
56
56
|
}, {
|
|
@@ -71,7 +71,7 @@ const b = /* @__PURE__ */ d("span", null, "This is a message", -1), z = { class:
|
|
|
71
71
|
])
|
|
72
72
|
]),
|
|
73
73
|
default: o(() => [
|
|
74
|
-
|
|
74
|
+
N
|
|
75
75
|
]),
|
|
76
76
|
_: 1
|
|
77
77
|
}, 8, ["modelValue", "title", "style"])
|
|
@@ -80,11 +80,10 @@ const b = /* @__PURE__ */ d("span", null, "This is a message", -1), z = { class:
|
|
|
80
80
|
}, 8, ["locale"]);
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
83
|
+
});
|
|
84
|
+
d.install = (t) => {
|
|
85
|
+
t.component("st-dialog", d);
|
|
87
86
|
};
|
|
88
87
|
export {
|
|
89
|
-
|
|
88
|
+
d as default
|
|
90
89
|
};
|
package/lib/HeatMap.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),
|
|
1
|
+
"use strict";const a=require("vue"),v=require("echarts"),y=require("./_plugin-vue_export-helper-f246444f.cjs");function h(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(c,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return c.default=e,Object.freeze(c)}const x=h(v),b=a.defineComponent({__name:"index",props:{data:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})}},setup(e,{expose:c}){const n={tooltipFormatter:null,dataZoom:null,grid:{left:"60px",bottom:"20px",right:"0",top:0}};let o,l;const r=e,u=a.ref(),s=a.computed(()=>({...n,...r.config}));a.watch(()=>[r.data],()=>{i()},{deep:!0}),a.onMounted(()=>{o=x.init(u.value),i();let t=!0;l=new ResizeObserver(()=>{if(t){t=null;return}o.resize()}),l.observe(u.value)}),a.onUnmounted(()=>{o.dispose(),l.disconnect(),l=null});const i=()=>{o.setOption({tooltip:{confine:!0,formatter:s.value.tooltipFormatter?t=>s.value.tooltipFormatter(t,r.data):null},grid:s.value.grid,xAxis:{type:"category",data:r.data.date},yAxis:{type:"category",inverse:!0,data:r.data.data.map(t=>t.name)},visualMap:{type:"piecewise",show:!1,inRange:[]},dataZoom:s.value.dataZoom,series:[{name:"热力图",type:"heatmap",info:r.data,data:r.data.data.reduce((t,f,_)=>[...t,...f.data.reduce((m,d,g)=>d===null?m:[...m,{value:[g,_,d.value],itemStyle:{color:d.color}}],[])],[]),label:{show:!1}}]})};return c({reset:()=>{i()}}),(t,f)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"chartRef",ref:u,class:"chart"},null,512))}});const p=y._export_sfc(b,[["__scopeId","data-v-4c74604d"]]);p.install=e=>{e.component("st-heatMap",p)};module.exports=p;
|
package/lib/HeatMap.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import * as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as v, ref as g, computed as y, watch as h, onMounted as x, onUnmounted as b, openBlock as w, createElementBlock as R } from "vue";
|
|
2
|
+
import * as F from "echarts";
|
|
3
|
+
import { _ as M } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const O = /* @__PURE__ */ v({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
data: {
|
|
@@ -14,8 +14,8 @@ const F = /* @__PURE__ */ _({
|
|
|
14
14
|
default: () => ({})
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
setup(n, { expose:
|
|
18
|
-
const
|
|
17
|
+
setup(n, { expose: u }) {
|
|
18
|
+
const f = {
|
|
19
19
|
tooltipFormatter: null,
|
|
20
20
|
dataZoom: null,
|
|
21
21
|
grid: {
|
|
@@ -26,15 +26,15 @@ const F = /* @__PURE__ */ _({
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
let a, o;
|
|
29
|
-
const t = n, l =
|
|
30
|
-
|
|
29
|
+
const t = n, l = g(), r = y(() => ({ ...f, ...t.config }));
|
|
30
|
+
h(
|
|
31
31
|
() => [t.data],
|
|
32
32
|
() => {
|
|
33
33
|
s();
|
|
34
34
|
},
|
|
35
35
|
{ deep: !0 }
|
|
36
|
-
),
|
|
37
|
-
a =
|
|
36
|
+
), x(() => {
|
|
37
|
+
a = F.init(l.value), s();
|
|
38
38
|
let e = !0;
|
|
39
39
|
o = new ResizeObserver(() => {
|
|
40
40
|
if (e) {
|
|
@@ -43,7 +43,7 @@ const F = /* @__PURE__ */ _({
|
|
|
43
43
|
}
|
|
44
44
|
a.resize();
|
|
45
45
|
}), o.observe(l.value);
|
|
46
|
-
}),
|
|
46
|
+
}), b(() => {
|
|
47
47
|
a.dispose(), o.disconnect(), o = null;
|
|
48
48
|
});
|
|
49
49
|
const s = () => {
|
|
@@ -75,12 +75,12 @@ const F = /* @__PURE__ */ _({
|
|
|
75
75
|
name: "热力图",
|
|
76
76
|
type: "heatmap",
|
|
77
77
|
info: t.data,
|
|
78
|
-
data: t.data.data.reduce((e, d,
|
|
78
|
+
data: t.data.data.reduce((e, d, m) => [
|
|
79
79
|
...e,
|
|
80
|
-
...d.data.reduce((i, c,
|
|
80
|
+
...d.data.reduce((i, c, _) => c === null ? i : [
|
|
81
81
|
...i,
|
|
82
82
|
{
|
|
83
|
-
value: [
|
|
83
|
+
value: [_, m, c.value],
|
|
84
84
|
itemStyle: {
|
|
85
85
|
color: c.color
|
|
86
86
|
}
|
|
@@ -96,23 +96,22 @@ const F = /* @__PURE__ */ _({
|
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
};
|
|
99
|
-
return
|
|
99
|
+
return u({
|
|
100
100
|
reset: () => {
|
|
101
101
|
s();
|
|
102
102
|
}
|
|
103
103
|
// 重置
|
|
104
|
-
}), (e, d) => (
|
|
104
|
+
}), (e, d) => (w(), R("div", {
|
|
105
105
|
ref_key: "chartRef",
|
|
106
106
|
ref: l,
|
|
107
107
|
class: "chart"
|
|
108
108
|
}, null, 512));
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
111
|
+
const p = /* @__PURE__ */ M(O, [["__scopeId", "data-v-4c74604d"]]);
|
|
112
|
+
p.install = (n) => {
|
|
113
|
+
n.component("st-heatMap", p);
|
|
115
114
|
};
|
|
116
115
|
export {
|
|
117
|
-
|
|
116
|
+
p as default
|
|
118
117
|
};
|
package/lib/LinearLegend.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),g=require("./_plugin-vue_export-helper-f246444f.cjs"),p={class:"linearLegend"},_={key:0,class:"linearLegend-unit"},h={class:"linearLegend-content"},v={class:"linearLegend-content-box"},f={class:"linearLegend-content-number"},k=e.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]},unit:{type:String,default:()=>null}},setup(c,{expose:d}){const r=c,s=e.computed(()=>r.data.reduce((t,n,o)=>o===r.data.length-1?t:n.type==="="?(t[t.length-1].width=2,t):n.range.length===1?[...t,{value:n.range[0],width:1}]:[...t,{value:n.range[1],width:1}],[]));return d({numberToColor:t=>{let n=1;r.unit==="亿"?n=1e8:r.unit==="万"&&(n=1e4);for(let o=0;o<r.data.length;o++){const{type:a,color:u,range:l}=r.data[o];if(a==="="&&t===l[0]*n||a===">"&&t>l[0]*n||a===">="&&t>=l[0]*n||a==="<"&&t<l[0]*n||a==="<="&&t<=l[0]*n||a==="()"&&t>l[0]*n&&t<l[1]*n||a==="(]"&&t>l[0]*n&&t<=l[1]*n||a==="[]"&&t>=l[0]*n&&t<=l[1]*n||a==="[)"&&t>=l[0]*n&&t<l[1]*n)return u}}}),(t,n)=>(e.openBlock(),e.createElementBlock("div",p,[c.unit?(e.openBlock(),e.createElementBlock("div",_,"(单位:"+e.toDisplayString(c.unit)+")",1)):e.createCommentVNode("",!0),e.createElementVNode("div",h,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.data,o=>(e.openBlock(),e.createElementBlock("div",{class:"linearLegend-content-box-item",style:e.normalizeStyle({background:o.color})},null,4))),256))]),e.createElementVNode("div",f,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,o=>(e.openBlock(),e.createElementBlock("div",{class:"linearLegend-content-number-item",style:e.normalizeStyle({width:`${o.width*36}px`})},e.toDisplayString(o.value),5))),256))])])]))}});const i=g._export_sfc(k,[["__scopeId","data-v-88fd5500"]]);i.install=c=>{c.component("st-linearLegend",i)};module.exports=i;
|
package/lib/LinearLegend.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, computed as L, openBlock as d, createElementBlock as r, toDisplayString as c, createCommentVNode as x, createElementVNode as s, Fragment as u, renderList as _, normalizeStyle as g } from "vue";
|
|
2
|
+
import { _ as m } from "./_plugin-vue_export-helper-dad06003.js";
|
|
3
|
+
const w = { class: "linearLegend" }, k = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "linearLegend-unit"
|
|
6
|
-
}, S = { class: "linearLegend-content" },
|
|
6
|
+
}, S = { class: "linearLegend-content" }, C = { class: "linearLegend-content-box" }, B = { class: "linearLegend-content-number" }, D = /* @__PURE__ */ y({
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
9
9
|
data: {
|
|
@@ -17,23 +17,23 @@ const m = { class: "linearLegend" }, w = {
|
|
|
17
17
|
}
|
|
18
18
|
// 单位
|
|
19
19
|
},
|
|
20
|
-
setup(o, { expose:
|
|
21
|
-
const i = o,
|
|
22
|
-
return
|
|
20
|
+
setup(o, { expose: f }) {
|
|
21
|
+
const i = o, h = L(() => i.data.reduce((e, t, a) => a === i.data.length - 1 ? e : t.type === "=" ? (e[e.length - 1].width = 2, e) : t.range.length === 1 ? [...e, { value: t.range[0], width: 1 }] : [...e, { value: t.range[1], width: 1 }], []));
|
|
22
|
+
return f({
|
|
23
23
|
numberToColor: (e) => {
|
|
24
24
|
let t = 1;
|
|
25
25
|
i.unit === "亿" ? t = 1e8 : i.unit === "万" && (t = 1e4);
|
|
26
26
|
for (let a = 0; a < i.data.length; a++) {
|
|
27
|
-
const { type: l, color:
|
|
27
|
+
const { type: l, color: v, range: n } = i.data[a];
|
|
28
28
|
if (l === "=" && e === n[0] * t || l === ">" && e > n[0] * t || l === ">=" && e >= n[0] * t || l === "<" && e < n[0] * t || l === "<=" && e <= n[0] * t || l === "()" && e > n[0] * t && e < n[1] * t || l === "(]" && e > n[0] * t && e <= n[1] * t || l === "[]" && e >= n[0] * t && e <= n[1] * t || l === "[)" && e >= n[0] * t && e < n[1] * t)
|
|
29
|
-
return
|
|
29
|
+
return v;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
// 数值转颜色
|
|
33
|
-
}), (e, t) => (d(), r("div",
|
|
34
|
-
o.unit ? (d(), r("div",
|
|
33
|
+
}), (e, t) => (d(), r("div", w, [
|
|
34
|
+
o.unit ? (d(), r("div", k, "(单位:" + c(o.unit) + ")", 1)) : x("", !0),
|
|
35
35
|
s("div", S, [
|
|
36
|
-
s("div",
|
|
36
|
+
s("div", C, [
|
|
37
37
|
(d(!0), r(u, null, _(o.data, (a) => (d(), r("div", {
|
|
38
38
|
class: "linearLegend-content-box-item",
|
|
39
39
|
style: g({
|
|
@@ -41,8 +41,8 @@ const m = { class: "linearLegend" }, w = {
|
|
|
41
41
|
})
|
|
42
42
|
}, null, 4))), 256))
|
|
43
43
|
]),
|
|
44
|
-
s("div",
|
|
45
|
-
(d(!0), r(u, null, _(
|
|
44
|
+
s("div", B, [
|
|
45
|
+
(d(!0), r(u, null, _(h.value, (a) => (d(), r("div", {
|
|
46
46
|
class: "linearLegend-content-number-item",
|
|
47
47
|
style: g({
|
|
48
48
|
width: `${a.width * 36}px`
|
|
@@ -53,11 +53,10 @@ const m = { class: "linearLegend" }, w = {
|
|
|
53
53
|
]));
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
56
|
+
const p = /* @__PURE__ */ m(D, [["__scopeId", "data-v-88fd5500"]]);
|
|
57
|
+
p.install = (o) => {
|
|
58
|
+
o.component("st-linearLegend", p);
|
|
60
59
|
};
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
p as default
|
|
63
62
|
};
|