@lingshugroup/web-plus 1.0.16 → 1.0.18
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/README.md +1 -1
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/core/echarts/index.js +1 -1
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/core/echarts/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/core/echarts/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/data/helper/sourceHelper/index.js +3 -3
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/data/helper/sourceHelper/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/data/helper/sourceHelper/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/util/model/index.js +7 -7
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/util/model/index.js.br +0 -0
- package/lib/node_modules/.pnpm/echarts@5.5.1/node_modules/echarts/lib/util/model/index.js.gz +0 -0
- package/lib/node_modules/.pnpm/zrender@5.6.0/node_modules/zrender/lib/graphic/Displayable/index.cjs +1 -1
- package/lib/node_modules/.pnpm/zrender@5.6.0/node_modules/zrender/lib/graphic/Displayable/index.js +29 -28
- package/lib/node_modules/.pnpm/zrender@5.6.0/node_modules/zrender/lib/graphic/Displayable/index.js.br +0 -0
- package/lib/node_modules/.pnpm/zrender@5.6.0/node_modules/zrender/lib/graphic/Displayable/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/chart/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js +41 -41
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/bar/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js +66 -66
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/line/index.js +76 -73
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/pie/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/pie/index.js +25 -24
- package/lib/packages/ls-components/components/chart/config/template/pie/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/pie/index.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +28 -26
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +66 -64
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +257 -201
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +6 -2
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +240 -233
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
var B = Object.defineProperty;
|
|
2
2
|
var d = (o, t) => B(o, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { numberFixed as M, formatChartAxis as $ } from "../../../../_utils/utils/index.js";
|
|
4
|
-
import { BG_COLOR_MAP as
|
|
5
|
-
const
|
|
6
|
-
const { name:
|
|
7
|
-
return ` ${
|
|
8
|
-
}, "setTooltipFormat"),
|
|
9
|
-
let { legend: t,
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
let
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
},
|
|
4
|
+
import { BG_COLOR_MAP as C, DEF_THEME as i, BAR_COLOR_MAP as w, TOOLTIP_COLOR_MAP as h, FONT_COLOR_MAP as f, DATA_ZOOM_COLOR as y, SPLIT_LINE_COLOR as k, BG_BAR_COLOR_MAP as D, LABEL_POSITION_MAP as x } from "../../base/index.js";
|
|
5
|
+
const I = /* @__PURE__ */ d((o, t, e, s, r) => {
|
|
6
|
+
const { name: a, seriesName: l, value: p, color: u } = o, n = s == 0 ? `<div class="name">${a}</div>` : "", c = t && p !== "-" && l !== "temp" ? `<span class="serise-name">${t ? l : ""}</span>` : "", m = p !== "-" && l !== "temp" ? `<span class="value">${p || "-"}</span>` : "", g = p !== "-" && l !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : r};"></div>` : "";
|
|
7
|
+
return ` ${n} <div class="content"> <div class="serise-wrap"> ${g} ${c} </div> ${m} </div> `;
|
|
8
|
+
}, "setTooltipFormat"), R = /* @__PURE__ */ d((o) => {
|
|
9
|
+
let { legend: t, legendIcon: e, tooltip: s = "shadow", theme: r = "default", tooltipFormatter: a, barColorList: l } = o;
|
|
10
|
+
const p = l || w[r || i][0];
|
|
11
|
+
return a = a || function(u) {
|
|
12
|
+
let n = `<div class="ls-bar-tooltip-wrap ${r}">`;
|
|
13
|
+
return u.forEach((c, m) => {
|
|
14
|
+
n += I(c, t, e, m, p);
|
|
15
|
+
}), n + "</div>";
|
|
16
|
+
}, s ? {
|
|
17
17
|
trigger: "axis",
|
|
18
18
|
axisPointer: {
|
|
19
|
-
type:
|
|
19
|
+
type: s,
|
|
20
20
|
z: 1,
|
|
21
21
|
label: {
|
|
22
|
-
color:
|
|
22
|
+
color: h[r || i].color
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
textStyle: {
|
|
26
|
-
color: f[r ||
|
|
26
|
+
color: f[r || i]
|
|
27
27
|
},
|
|
28
28
|
padding: 12,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
extraCssText: `box-shadow: ${
|
|
31
|
-
formatter:
|
|
29
|
+
backgroundColor: h[r || i].bgColor,
|
|
30
|
+
extraCssText: `box-shadow: ${h[r || i].shadowColor};`,
|
|
31
|
+
formatter: a
|
|
32
32
|
} : null;
|
|
33
|
-
}, "setTooltip"),
|
|
34
|
-
const { legend: t,
|
|
33
|
+
}, "setTooltip"), T = /* @__PURE__ */ d((o) => {
|
|
34
|
+
const { legend: t, legendIcon: e = "rect", theme: s } = o;
|
|
35
35
|
return {
|
|
36
36
|
type: "scroll",
|
|
37
37
|
data: t || [],
|
|
38
|
-
icon:
|
|
38
|
+
icon: e,
|
|
39
39
|
itemWidth: 12,
|
|
40
40
|
itemHeight: 10,
|
|
41
41
|
textStyle: {
|
|
42
|
-
color: f[
|
|
42
|
+
color: f[s || i],
|
|
43
43
|
fontSize: 12,
|
|
44
44
|
height: 10,
|
|
45
45
|
rich: {
|
|
@@ -49,7 +49,7 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}, "setLegend"),
|
|
52
|
+
}, "setLegend"), H = /* @__PURE__ */ d((o) => {
|
|
53
53
|
const { dataZoom: t } = o, e = {
|
|
54
54
|
left: "3%",
|
|
55
55
|
right: "3%",
|
|
@@ -58,8 +58,8 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
58
58
|
containLabel: !0
|
|
59
59
|
};
|
|
60
60
|
return t === "vertical" && delete e.right, t === "horizontal" && delete e.bottom, e;
|
|
61
|
-
}, "setGrid"),
|
|
62
|
-
const { axisData:
|
|
61
|
+
}, "setGrid"), v = /* @__PURE__ */ d((o, t, e) => {
|
|
62
|
+
const { axisData: s, seriesData: r } = o, { axis: a = "x", theme: l, dynamicAxis: p, type: u = "simple" } = t, n = {
|
|
63
63
|
type: a == e ? "category" : "value",
|
|
64
64
|
axisTick: {
|
|
65
65
|
show: !1
|
|
@@ -68,7 +68,7 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
68
68
|
show: a == e,
|
|
69
69
|
lineStyle: {
|
|
70
70
|
width: 1,
|
|
71
|
-
color: f[l ||
|
|
71
|
+
color: f[l || i]
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
axisLabel: {
|
|
@@ -77,17 +77,17 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
77
77
|
splitLine: {
|
|
78
78
|
lineStyle: {
|
|
79
79
|
type: "dashed",
|
|
80
|
-
color: k[l ||
|
|
80
|
+
color: k[l || i]
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
if (a == e && (
|
|
84
|
+
if (a == e && (n.data = s), a !== e && p && ["simple", "multiBar"].includes(u)) {
|
|
85
85
|
let c = [];
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
|
|
86
|
+
u === "simple" ? c = (r || []).map((b) => M(b)) : u === "multiBar" && (c = r.reduce((b, _) => b.concat(_.data), []));
|
|
87
|
+
const m = Math.max(...c), g = Math.min(...c), { aInterval: S, aMax: L, aMin: A } = $(m, g);
|
|
88
|
+
n.min = A, n.max = L, n.interval = S;
|
|
89
89
|
}
|
|
90
|
-
return [
|
|
90
|
+
return [n];
|
|
91
91
|
}, "setAxis"), E = /* @__PURE__ */ d((o) => {
|
|
92
92
|
const { dataZoom: t, theme: e } = o;
|
|
93
93
|
return t ? [
|
|
@@ -99,13 +99,13 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
99
99
|
showDataShadow: !0,
|
|
100
100
|
dataBackground: {
|
|
101
101
|
areaStyle: {
|
|
102
|
-
color:
|
|
102
|
+
color: y[e || i][0]
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
fillerColor:
|
|
105
|
+
fillerColor: y[e || i][1],
|
|
106
106
|
borderColor: null,
|
|
107
107
|
textStyle: {
|
|
108
|
-
color: f[e ||
|
|
108
|
+
color: f[e || i]
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
{
|
|
@@ -122,66 +122,66 @@ const R = /* @__PURE__ */ d((o, t, e, r) => {
|
|
|
122
122
|
showDataShadow: !0
|
|
123
123
|
}
|
|
124
124
|
] : null;
|
|
125
|
-
}, "setDataZoom"),
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
return e ?
|
|
125
|
+
}, "setDataZoom"), O = /* @__PURE__ */ d((o, t, e) => {
|
|
126
|
+
const s = o === "x" ? "top" : "left";
|
|
127
|
+
let r = "inside";
|
|
128
|
+
return e ? r = x[t][s] : r = x[t][`-${s}`], r;
|
|
129
129
|
}, "getPos"), F = /* @__PURE__ */ d((o, t, e) => {
|
|
130
|
-
const { type:
|
|
130
|
+
const { type: s = "simple", showBarFont: r = !0, labelPosition: a = "inside", axis: l = "x", showBackground: p, theme: u } = o, n = {
|
|
131
131
|
type: "bar",
|
|
132
132
|
name: t.name,
|
|
133
133
|
label: {
|
|
134
|
-
show:
|
|
134
|
+
show: r,
|
|
135
135
|
position: a,
|
|
136
136
|
formatter: /* @__PURE__ */ d(function(c) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const m = c.value;
|
|
138
|
+
return m !== 0 ? m : "";
|
|
139
139
|
}, "formatter")
|
|
140
140
|
},
|
|
141
141
|
showBackground: p,
|
|
142
142
|
backgroundStyle: {
|
|
143
|
-
color: D[
|
|
143
|
+
color: D[u || i]
|
|
144
144
|
},
|
|
145
145
|
data: t.data || [],
|
|
146
146
|
barCategoryGap: "30%",
|
|
147
|
-
barWidth:
|
|
147
|
+
barWidth: s === "multiBar" ? "auto" : "40%",
|
|
148
148
|
barGap: "4%"
|
|
149
149
|
};
|
|
150
|
-
return ["negative", "categoryStack", "waterfall"].includes(
|
|
151
|
-
borderColor:
|
|
150
|
+
return ["negative", "categoryStack", "waterfall"].includes(s) && (n.stack = "total", s === "negative" && ["both", "insideBoth"].includes(a) ? n.label.position = O(l, a, (t.data || []).reduce((c, m) => c + m) > 0) : s === "categoryStack" && e > 0 && (n.itemStyle = {
|
|
151
|
+
borderColor: C[u || i],
|
|
152
152
|
borderWidth: 2
|
|
153
|
-
})),
|
|
153
|
+
})), s === "waterfall" && (n.itemStyle = e == 0 ? {
|
|
154
154
|
borderColor: "rgba(0,0,0,0)",
|
|
155
155
|
color: "rgba(0,0,0,0)"
|
|
156
|
-
} : null,
|
|
156
|
+
} : null, n.emphasis = e == 0 ? {
|
|
157
157
|
itemStyle: {
|
|
158
158
|
borderColor: "rgba(0,0,0,0)",
|
|
159
159
|
color: "rgba(0,0,0,0)"
|
|
160
160
|
}
|
|
161
|
-
} : null,
|
|
162
|
-
show: e > 0 &&
|
|
161
|
+
} : null, n.label = t.label || {
|
|
162
|
+
show: e > 0 && r,
|
|
163
163
|
position: a,
|
|
164
164
|
formatter: /* @__PURE__ */ d(function(c) {
|
|
165
|
-
const
|
|
166
|
-
return
|
|
165
|
+
const m = c.value;
|
|
166
|
+
return m !== 0 ? m : "";
|
|
167
167
|
}, "formatter")
|
|
168
|
-
}, ["both", "insideBoth"].includes(a) && (
|
|
168
|
+
}, ["both", "insideBoth"].includes(a) && (n.label.position = O(l, a, e === 1))), n;
|
|
169
169
|
}, "setSeriesOption"), G = /* @__PURE__ */ d((o, t) => {
|
|
170
|
-
const { seriesData: e } = o, { type:
|
|
171
|
-
return (
|
|
170
|
+
const { seriesData: e } = o, { type: s = "simple", legend: r = [] } = t;
|
|
171
|
+
return (s == "simple" ? [{ name: r[0], data: e }] : e || []).map((a, l) => F(t, a, l));
|
|
172
172
|
}, "setSeries"), Z = /* @__PURE__ */ d((o, t) => {
|
|
173
|
-
const { theme: e, barColorList:
|
|
173
|
+
const { theme: e, barColorList: s } = t, r = {
|
|
174
174
|
textStyle: {},
|
|
175
|
-
backgroundColor:
|
|
176
|
-
color:
|
|
177
|
-
legend:
|
|
178
|
-
grid:
|
|
179
|
-
xAxis:
|
|
180
|
-
yAxis:
|
|
175
|
+
backgroundColor: C[e || i],
|
|
176
|
+
color: s || w[e || i],
|
|
177
|
+
legend: T(t),
|
|
178
|
+
grid: H(t),
|
|
179
|
+
xAxis: v(o, t, "x"),
|
|
180
|
+
yAxis: v(o, t, "y"),
|
|
181
181
|
series: G(o, t),
|
|
182
182
|
dataZoom: E(t)
|
|
183
|
-
}, a =
|
|
184
|
-
return a && (
|
|
183
|
+
}, a = R(t);
|
|
184
|
+
return a && (r.tooltip = a), r;
|
|
185
185
|
}, "setOption");
|
|
186
186
|
function W(o = {}, t = {}) {
|
|
187
187
|
return Z(o, t);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var A=Object.defineProperty;var O=(a,t)=>A(a,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("../../../../_utils/utils/index.cjs"),e=require("../../base/index.cjs"),C=O((a,t,o,n,r)=>{const{name:s,seriesName:l,value:i,color:_}=a,d=n==0?`<div class="name">${s}</div>`:"",m=t&&i!=="-"&&l!=="temp"?`<span class="serise-name">${t?l:""}</span>`:"",c=i!=="-"&&l!=="temp"?`<span class="value">${i||"-"}</span>`:"",E=i!=="-"&&l!=="temp"?`<div class="content-badge ${o}" style="background-color: ${typeof _=="string"?_:r};"></div>`:"";return` ${d} <div class="content"> <div class="serise-wrap"> ${E} ${m} </div> ${c} </div> `},"setTooltipFormat"),b=O(a=>{let{legend:t,legendIcon:o,tooltip:n="shadow",theme:r,tooltipFormatter:s,barColorList:l}=a;const i=l||e.BAR_COLOR_MAP[r||e.DEF_THEME][0];return s=s||function(_){let d=`<div class="ls-bar-tooltip-wrap ${r}">`;return _.forEach((m,c)=>{d+=C(m,t,o,c,i)}),d+"</div>"},n?{trigger:"axis",axisPointer:{type:n,z:1,label:{color:e.TOOLTIP_COLOR_MAP[r||e.DEF_THEME].color}},textStyle:{color:e.FONT_COLOR_MAP[r||e.DEF_THEME]},padding:12,backgroundColor:e.TOOLTIP_COLOR_MAP[r||e.DEF_THEME].bgColor,extraCssText:`box-shadow: ${e.TOOLTIP_COLOR_MAP[r||e.DEF_THEME].shadowColor};`,formatter:s}:null},"setTooltip"),D=O(a=>{const{legend:t,legendIcon:o="rect",theme:n}=a;return{type:"scroll",data:t||[],icon:o,itemWidth:12,itemHeight:10,textStyle:{color:e.FONT_COLOR_MAP[n||e.DEF_THEME],fontSize:12,height:10,rich:{a:{verticalAlign:"middle"}}}}},"setLegend"),F=O(a=>{const{dataZoom:t}=a,o={left:"3%",right:"3%",top:"12%",bottom:"3%",containLabel:!0};return t==="vertical"&&delete o.right,t==="horizontal"&&delete o.bottom,o},"setGrid"),x=O((a,t,o)=>{const{axisData:n,seriesData:r}=a,{axis:s="x",theme:l,lineBar:i,dynamicAxis:_,type:d}=t;let m=[{type:s==o?"category":"value",axisTick:{show:!1},axisLine:{show:s==o,lineStyle:{width:1,color:e.FONT_COLOR_MAP[l||e.DEF_THEME]}},axisLabel:{margin:18},splitLine:{lineStyle:{type:"dashed",color:e.SPLIT_LINE_COLOR[l||e.DEF_THEME]}},data:s==o?n:[]}];if(s!==o&&(i&&(m=s=="x"?[{type:"value",splitLine:{show:!1,lineStyle:{color:e.SPLIT_LINE_COLOR[l||e.DEF_THEME]}}},{type:"value",splitLine:{lineStyle:{color:e.SPLIT_LINE_COLOR[l||e.DEF_THEME],type:"dashed",width:2,dashOffset:2}}}]:[{type:"value"}]),_)){let c=[];d==="multiple"&&(!i||s=="y"&&i)&&(c=r.reduce((E,u)=>E.concat(u.data),[])),m.map((E,u)=>{var L;d==="multiple"?i&&s=="x"&&(c=(((L=r[u])==null?void 0:L.data)||[]).map(h=>M.numberFixed(h))):c=(r||[]).map(h=>M.numberFixed(h));const y=Math.max(...c),p=Math.min(...c),{aInterval:T,aMax:f,aMin:g}=M.formatChartAxis(y,p);return E.min=g,E.max=f,E.interval=T,E})}return m},"setAxis"),S=O(a=>{const{dataZoom:t,theme:o}=a;return t?[{show:!0,start:0,end:100,orient:t,showDataShadow:!0,dataBackground:{areaStyle:{color:e.DATA_ZOOM_COLOR[o||e.DEF_THEME][0]}},fillerColor:e.DATA_ZOOM_COLOR[o||e.DEF_THEME][1],borderColor:null,textStyle:{color:e.FONT_COLOR_MAP[o||e.DEF_THEME]}},{type:"inside",start:0,end:100,orient:t},{show:!1,filterMode:"empty",right:0,showDataShadow:!0}]:null},"setDataZoom"),v=O((a,t)=>{const{seriesData:o}=a,{type:n="simple",showBarFont:r=!0,labelPosition:s="inside",smooth:l=!0,areaStyle:i=void 0,showBackground:_,theme:d,name:m,lineBar:c,axis:E}=t;return n==="multiple"?(o||[]).map((u,y)=>{const p={name:u.name,type:u.type,emphasis:u.emphasis||{focus:"series"},smooth:l,areaStyle:i||{opacity:.2},label:{show:r,position:s},showBackground:_,backgroundStyle:{color:e.BG_BAR_COLOR_MAP[d||e.DEF_THEME]},itemStyle:u.itemStyle||{},data:u.data||[]};return c&&(E!=="y"&&y===1?p.yAxisIndex=y:p.yAxisIndex&&delete p.yAxisIndex),p}):[{name:m,label:{show:r,position:s},showBackground:_,backgroundStyle:{color:e.BG_BAR_COLOR_MAP[d||e.DEF_THEME]},data:o||[],smooth:l,areaStyle:i||{opacity:.2},type:"line"}]},"setSeries"),H=O((a,t)=>{const{theme:o,barColorList:n}=t,r={textStyle:{},backgroundColor:e.BG_COLOR_MAP[o||e.DEF_THEME],color:n||e.BAR_COLOR_MAP[o||e.DEF_THEME],legend:D(t),grid:F(t),xAxis:x(a,t,"x"),yAxis:x(a,t,"y"),series:v(a,t),dataZoom:S(t)},s=b(t);return s&&(r.tooltip=s),r},"setOption");function R(a={},t={}){return H(a,t)}O(R,"dealOption");exports.dealOption=R;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
var D = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
import { numberFixed as
|
|
4
|
-
import { BG_COLOR_MAP as
|
|
5
|
-
const
|
|
6
|
-
const { name:
|
|
7
|
-
return ` ${d} <div class="content"> <div class="serise-wrap"> ${
|
|
8
|
-
}, "setTooltipFormat"),
|
|
9
|
-
let { legend: t,
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
let d = `<div class="ls-bar-tooltip-wrap ${
|
|
13
|
-
return
|
|
14
|
-
d +=
|
|
2
|
+
var p = (o, t) => D(o, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { numberFixed as w, formatChartAxis as I } from "../../../../_utils/utils/index.js";
|
|
4
|
+
import { BG_COLOR_MAP as R, DEF_THEME as r, BAR_COLOR_MAP as _, TOOLTIP_COLOR_MAP as v, FONT_COLOR_MAP as g, DATA_ZOOM_COLOR as L, BG_BAR_COLOR_MAP as A, SPLIT_LINE_COLOR as O } from "../../base/index.js";
|
|
5
|
+
const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
6
|
+
const { name: a, seriesName: l, value: i, color: u } = o, d = n == 0 ? `<div class="name">${a}</div>` : "", y = t && i !== "-" && l !== "temp" ? `<span class="serise-name">${t ? l : ""}</span>` : "", c = i !== "-" && l !== "temp" ? `<span class="value">${i || "-"}</span>` : "", m = i !== "-" && l !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : s};"></div>` : "";
|
|
7
|
+
return ` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${y} </div> ${c} </div> `;
|
|
8
|
+
}, "setTooltipFormat"), H = /* @__PURE__ */ p((o) => {
|
|
9
|
+
let { legend: t, legendIcon: e, tooltip: n = "shadow", theme: s, tooltipFormatter: a, barColorList: l } = o;
|
|
10
|
+
const i = l || _[s || r][0];
|
|
11
|
+
return a = a || function(u) {
|
|
12
|
+
let d = `<div class="ls-bar-tooltip-wrap ${s}">`;
|
|
13
|
+
return u.forEach((y, c) => {
|
|
14
|
+
d += k(y, t, e, c, i);
|
|
15
15
|
}), d + "</div>";
|
|
16
|
-
},
|
|
16
|
+
}, n ? {
|
|
17
17
|
trigger: "axis",
|
|
18
18
|
axisPointer: {
|
|
19
|
-
type:
|
|
19
|
+
type: n,
|
|
20
20
|
z: 1,
|
|
21
21
|
label: {
|
|
22
|
-
color:
|
|
22
|
+
color: v[s || r].color
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
textStyle: {
|
|
26
|
-
color: g[
|
|
26
|
+
color: g[s || r]
|
|
27
27
|
},
|
|
28
28
|
padding: 12,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
extraCssText: `box-shadow: ${
|
|
31
|
-
formatter:
|
|
29
|
+
backgroundColor: v[s || r].bgColor,
|
|
30
|
+
extraCssText: `box-shadow: ${v[s || r].shadowColor};`,
|
|
31
|
+
formatter: a
|
|
32
32
|
} : null;
|
|
33
|
-
}, "setTooltip"), T = /* @__PURE__ */
|
|
34
|
-
const { legend: t,
|
|
33
|
+
}, "setTooltip"), T = /* @__PURE__ */ p((o) => {
|
|
34
|
+
const { legend: t, legendIcon: e = "rect", theme: n } = o;
|
|
35
35
|
return {
|
|
36
36
|
type: "scroll",
|
|
37
37
|
data: t || [],
|
|
38
|
-
icon:
|
|
38
|
+
icon: e,
|
|
39
39
|
itemWidth: 12,
|
|
40
40
|
itemHeight: 10,
|
|
41
41
|
textStyle: {
|
|
42
|
-
color: g[
|
|
42
|
+
color: g[n || r],
|
|
43
43
|
fontSize: 12,
|
|
44
44
|
height: 10,
|
|
45
45
|
rich: {
|
|
@@ -49,7 +49,7 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}, "setLegend"), F = /* @__PURE__ */
|
|
52
|
+
}, "setLegend"), F = /* @__PURE__ */ p((o) => {
|
|
53
53
|
const { dataZoom: t } = o, e = {
|
|
54
54
|
left: "3%",
|
|
55
55
|
right: "3%",
|
|
@@ -58,9 +58,9 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
58
58
|
containLabel: !0
|
|
59
59
|
};
|
|
60
60
|
return t === "vertical" && delete e.right, t === "horizontal" && delete e.bottom, e;
|
|
61
|
-
}, "setGrid"), C = /* @__PURE__ */
|
|
62
|
-
const { axisData:
|
|
63
|
-
let
|
|
61
|
+
}, "setGrid"), C = /* @__PURE__ */ p((o, t, e) => {
|
|
62
|
+
const { axisData: n, seriesData: s } = o, { axis: a = "x", theme: l, lineBar: i, dynamicAxis: u, type: d } = t;
|
|
63
|
+
let y = [
|
|
64
64
|
{
|
|
65
65
|
type: a == e ? "category" : "value",
|
|
66
66
|
axisTick: {
|
|
@@ -70,7 +70,7 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
70
70
|
show: a == e,
|
|
71
71
|
lineStyle: {
|
|
72
72
|
width: 1,
|
|
73
|
-
color: g[l ||
|
|
73
|
+
color: g[l || r]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
axisLabel: {
|
|
@@ -79,19 +79,19 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
79
79
|
splitLine: {
|
|
80
80
|
lineStyle: {
|
|
81
81
|
type: "dashed",
|
|
82
|
-
color: O[l ||
|
|
82
|
+
color: O[l || r]
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
data: a == e ?
|
|
85
|
+
data: a == e ? n : []
|
|
86
86
|
}
|
|
87
87
|
];
|
|
88
|
-
if (a !== e && (
|
|
88
|
+
if (a !== e && (i && (y = a == "x" ? [
|
|
89
89
|
{
|
|
90
90
|
type: "value",
|
|
91
91
|
splitLine: {
|
|
92
92
|
show: !1,
|
|
93
93
|
lineStyle: {
|
|
94
|
-
color: O[l ||
|
|
94
|
+
color: O[l || r]
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -99,7 +99,7 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
99
99
|
type: "value",
|
|
100
100
|
splitLine: {
|
|
101
101
|
lineStyle: {
|
|
102
|
-
color: O[l ||
|
|
102
|
+
color: O[l || r],
|
|
103
103
|
type: "dashed",
|
|
104
104
|
width: 2,
|
|
105
105
|
dashOffset: 2
|
|
@@ -110,17 +110,17 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
110
110
|
{
|
|
111
111
|
type: "value"
|
|
112
112
|
}
|
|
113
|
-
]),
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
const f = Math.max(...
|
|
119
|
-
return
|
|
113
|
+
]), u)) {
|
|
114
|
+
let c = [];
|
|
115
|
+
d === "multiple" && (!i || a == "y" && i) && (c = s.reduce((m, h) => m.concat(h.data), [])), y.map((m, h) => {
|
|
116
|
+
var S;
|
|
117
|
+
d === "multiple" ? i && a == "x" && (c = (((S = s[h]) == null ? void 0 : S.data) || []).map((b) => w(b))) : c = (s || []).map((b) => w(b));
|
|
118
|
+
const f = Math.max(...c), x = Math.min(...c), { aInterval: M, aMax: $, aMin: B } = I(f, x);
|
|
119
|
+
return m.min = B, m.max = $, m.interval = M, m;
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
return
|
|
123
|
-
}, "setAxis"), E = /* @__PURE__ */
|
|
122
|
+
return y;
|
|
123
|
+
}, "setAxis"), E = /* @__PURE__ */ p((o) => {
|
|
124
124
|
const { dataZoom: t, theme: e } = o;
|
|
125
125
|
return t ? [
|
|
126
126
|
{
|
|
@@ -131,13 +131,13 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
131
131
|
showDataShadow: !0,
|
|
132
132
|
dataBackground: {
|
|
133
133
|
areaStyle: {
|
|
134
|
-
color:
|
|
134
|
+
color: L[e || r][0]
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
-
fillerColor:
|
|
137
|
+
fillerColor: L[e || r][1],
|
|
138
138
|
borderColor: null,
|
|
139
139
|
textStyle: {
|
|
140
|
-
color: g[e ||
|
|
140
|
+
color: g[e || r]
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
143
|
{
|
|
@@ -153,20 +153,20 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
153
153
|
showDataShadow: !0
|
|
154
154
|
}
|
|
155
155
|
] : null;
|
|
156
|
-
}, "setDataZoom"), Z = /* @__PURE__ */
|
|
156
|
+
}, "setDataZoom"), Z = /* @__PURE__ */ p((o, t) => {
|
|
157
157
|
const { seriesData: e } = o, {
|
|
158
|
-
type:
|
|
159
|
-
showBarFont:
|
|
158
|
+
type: n = "simple",
|
|
159
|
+
showBarFont: s = !0,
|
|
160
160
|
labelPosition: a = "inside",
|
|
161
161
|
smooth: l = !0,
|
|
162
|
-
areaStyle:
|
|
163
|
-
showBackground:
|
|
164
|
-
theme:
|
|
165
|
-
name:
|
|
166
|
-
lineBar:
|
|
167
|
-
axis:
|
|
162
|
+
areaStyle: i = void 0,
|
|
163
|
+
showBackground: u,
|
|
164
|
+
theme: d,
|
|
165
|
+
name: y,
|
|
166
|
+
lineBar: c,
|
|
167
|
+
axis: m
|
|
168
168
|
} = t;
|
|
169
|
-
return
|
|
169
|
+
return n === "multiple" ? (e || []).map((h, f) => {
|
|
170
170
|
const x = {
|
|
171
171
|
name: h.name,
|
|
172
172
|
type: h.type,
|
|
@@ -174,54 +174,57 @@ const H = /* @__PURE__ */ c((o, t, e, i) => {
|
|
|
174
174
|
focus: "series"
|
|
175
175
|
},
|
|
176
176
|
smooth: l,
|
|
177
|
-
areaStyle:
|
|
177
|
+
areaStyle: i || {
|
|
178
|
+
opacity: 0.2
|
|
179
|
+
},
|
|
178
180
|
label: {
|
|
179
|
-
show:
|
|
181
|
+
show: s,
|
|
180
182
|
position: a
|
|
181
183
|
},
|
|
182
|
-
showBackground:
|
|
184
|
+
showBackground: u,
|
|
183
185
|
backgroundStyle: {
|
|
184
|
-
color: A[
|
|
186
|
+
color: A[d || r]
|
|
185
187
|
},
|
|
188
|
+
itemStyle: h.itemStyle || {},
|
|
186
189
|
data: h.data || []
|
|
187
190
|
};
|
|
188
|
-
return
|
|
191
|
+
return c && (m !== "y" && f === 1 ? x.yAxisIndex = f : x.yAxisIndex && delete x.yAxisIndex), x;
|
|
189
192
|
}) : [
|
|
190
193
|
{
|
|
191
|
-
name:
|
|
194
|
+
name: y,
|
|
192
195
|
label: {
|
|
193
|
-
show:
|
|
196
|
+
show: s,
|
|
194
197
|
position: a
|
|
195
198
|
},
|
|
196
|
-
showBackground:
|
|
199
|
+
showBackground: u,
|
|
197
200
|
backgroundStyle: {
|
|
198
|
-
color: A[
|
|
201
|
+
color: A[d || r]
|
|
199
202
|
},
|
|
200
203
|
data: e || [],
|
|
201
204
|
smooth: l,
|
|
202
205
|
// 设置填充透明度
|
|
203
|
-
areaStyle:
|
|
206
|
+
areaStyle: i || { opacity: 0.2 },
|
|
204
207
|
type: "line"
|
|
205
208
|
}
|
|
206
209
|
];
|
|
207
|
-
}, "setSeries"), z = /* @__PURE__ */
|
|
208
|
-
const { theme: e, barColorList:
|
|
210
|
+
}, "setSeries"), z = /* @__PURE__ */ p((o, t) => {
|
|
211
|
+
const { theme: e, barColorList: n } = t, s = {
|
|
209
212
|
textStyle: {},
|
|
210
|
-
backgroundColor:
|
|
211
|
-
color:
|
|
213
|
+
backgroundColor: R[e || r],
|
|
214
|
+
color: n || _[e || r],
|
|
212
215
|
legend: T(t),
|
|
213
216
|
grid: F(t),
|
|
214
217
|
xAxis: C(o, t, "x"),
|
|
215
218
|
yAxis: C(o, t, "y"),
|
|
216
219
|
series: Z(o, t),
|
|
217
220
|
dataZoom: E(t)
|
|
218
|
-
}, a =
|
|
219
|
-
return a && (
|
|
221
|
+
}, a = H(t);
|
|
222
|
+
return a && (s.tooltip = a), s;
|
|
220
223
|
}, "setOption");
|
|
221
224
|
function W(o = {}, t = {}) {
|
|
222
225
|
return z(o, t);
|
|
223
226
|
}
|
|
224
|
-
|
|
227
|
+
p(W, "dealOption");
|
|
225
228
|
export {
|
|
226
229
|
W as dealOption
|
|
227
230
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var s=(t,e)=>A(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../base/index.cjs"),D=s(({showTooltip:t=!0,tooltipTrigger:e="item",tooltipFormatter:o})=>({show:t,trigger:e,formatter:o}),"setTooltip"),z=s(({legendType:t="plain",legendShow:e=!0,legendOrient:o="horizontal",legendLeft:u="center",legendRight:d="auto",legendTop:g="auto",legendBottom:p="auto",legendTextColor:h="#2C2C2C"})=>({type:t,show:e,orient:o,left:u,right:d,top:g,bottom:p,icon:
|
|
1
|
+
"use strict";var A=Object.defineProperty;var s=(t,e)=>A(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../base/index.cjs"),D=s(({showTooltip:t=!0,tooltipTrigger:e="item",tooltipFormatter:o})=>({show:t,trigger:e,formatter:o}),"setTooltip"),z=s(({legendType:t="plain",legendShow:e=!0,legendOrient:o="horizontal",legendLeft:u="center",legendRight:d="auto",legendTop:g="auto",legendBottom:p="auto",legendTextColor:h="#2C2C2C",legendIcon:F="rect"})=>({type:t,show:e,orient:o,left:u,right:d,top:g,bottom:p,icon:F,itemGap:20,itemWidth:14,itemHeight:10,textStyle:{color:h,fontSize:14}}),"setLegend"),B=s(({seriesData:t=[],innerData:e=[]},{color:o=[],radius:u=[0,"60%"],roseType:d=!1,percentPrecision:g=2,lineShow:p=!0,lineColor:h="rgba(0, 0, 0, 0.2)",length:F=40,length2:S=30,labelShow:m=!0,labelColor:b="#2C2C2C",labelShowPercent:O=!0,labelShowItem:C=!0,labelFormatter:T="",innerRadius:_=[0,"30%"],innerLabelColor:y="#ffffff",selectedMode:L=""})=>{let f=[];t&&t.length&&t.forEach((l,r)=>{const{value:n="",name:a="",color:i=""}=l||{};f.push({value:n,name:a,itemStyle:{[i&&"color"]:i},label:{rich:{b:{width:14,height:10,backgroundColor:i||o[r],verticalAlign:"middle"}}}})});let E=null;if(e&&e.length){let l=[];e.forEach(r=>{const{value:n="",name:a="",color:i=""}=r||{};l.push({value:n,name:a,itemStyle:{[i&&"color"]:i}})}),E={type:"pie",radius:_,label:{color:y,fontSize:12,position:"inner"},labelLine:{show:!1},data:l}}return[{type:"pie",data:f,selectedMode:L,radius:u,roseType:d,percentPrecision:g,label:{show:m,color:b,fontSize:14,lineHeight:20,formatter:T||(l=>{const{name:r,percent:n,value:a}=l||{};return`${C?"{b|}":""} ${r}:${O?n+"%":a}`})},labelLine:{show:p,length:F,length2:S,lineStyle:{color:h}}},...[E]]},"setSeries"),P=s((t,{color:e=["#2285FF","#FF7D00","#00CDDC","#FB466C","#FFC917","#8CEAFF","#A16FFD","#FD8BFF"],theme:o=c.DEF_THEME,showTooltip:u,tooltipTrigger:d,tooltipFormatter:g,legendType:p,legendShow:h,legendOrient:F,legendLeft:S,legendRight:m,legendTop:b,legendBottom:O,legendTextColor:C,radius:T,roseType:_,percentPrecision:y,lineShow:L,lineColor:f,length:E,length2:w,labelShow:l,labelColor:r,labelShowPercent:n,labelShowItem:a,labelFormatter:i,innerRadius:H,innerLabelColor:v}={})=>{r=C=c.FONT_COLOR_MAP[o||c.DEF_THEME],f=c.SPLIT_LINE_COLOR[o||c.DEF_THEME];const M={tooltip:D({showTooltip:u,tooltipTrigger:d,tooltipFormatter:g}),legend:z({legendType:p,legendShow:h,legendOrient:F,legendLeft:S,legendRight:m,legendTop:b,legendBottom:O,legendTextColor:C}),series:B(t,{color:e,radius:T,roseType:_,percentPrecision:y,lineShow:L,lineColor:f,length:E,length2:w,labelShow:l,labelColor:r,labelShowPercent:n,labelShowItem:a,labelFormatter:i,innerRadius:H,innerLabelColor:v})};return M.color=e,M.backgroundColor=c.BG_COLOR_MAP[o||c.DEF_THEME],M},"setOption"),R=s((t,e)=>P(t,e),"dealOption");exports.dealOption=R;
|