@lingshugroup/web-plus 1.0.23 → 1.0.25
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/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
- package/lib/packages/ls-components/components/chart/config/base/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/base/index.js +7 -8
- package/lib/packages/ls-components/components/chart/config/base/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/base/index.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 +79 -79
- 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 +90 -90
- 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/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 +97 -95
- 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 +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +7 -7
- 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 +4 -0
- 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/live/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/live/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/live/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/live/Index.vue/index2.js +56 -51
- package/lib/packages/ls-components/components/live/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/live/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-c59c6ed3"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c59c6ed3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var t=(o,C)=>b(o,"name",{value:C,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={default:{fontColor:"#5E5E5E",bgColor:"#FFFFFF",splitLineColor:"#DCDCDC",barColor:["#1890FF","#2FC25B","#FACC14","#13C2C2","#F04864","#8543E0"],dataZoomColor:["rgba(221, 54, 54, 1)","rgba(11, 109, 238, .5)"],barBgColor:"rgba(231, 232, 235, 0.6)",toolTip:{color:"#FFFFFF",bgColor:"#FFFFFF",shadowColor:"0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);"}},dark:{fontColor:"#FFFFFF",bgColor:"#000000",splitLineColor:"#5E5E5E",barColor:["#1890FF","#2FC25B","#FACC14","#13C2C2","#F04864","#8543E0"],dataZoomColor:["rgba(221, 54, 54, 1)","rgba(11, 109, 238, .5)"],barBgColor:"rgba(255, 255, 255, 0.2)",toolTip:{color:"#5E5E5E",bgColor:"#5E5E5E",shadowColor:"0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);"}}};exports.DEF_THEME="";const
|
|
1
|
+
"use strict";var b=Object.defineProperty;var t=(o,C)=>b(o,"name",{value:C,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={default:{fontColor:"#5E5E5E",bgColor:"#FFFFFF",splitLineColor:"#DCDCDC",barColor:["#1890FF","#2FC25B","#FACC14","#13C2C2","#F04864","#8543E0"],dataZoomColor:["rgba(221, 54, 54, 1)","rgba(11, 109, 238, .5)"],barBgColor:"rgba(231, 232, 235, 0.6)",toolTip:{color:"#FFFFFF",bgColor:"#FFFFFF",shadowColor:"0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);"}},dark:{fontColor:"#FFFFFF",bgColor:"#000000",splitLineColor:"#5E5E5E",barColor:["#1890FF","#2FC25B","#FACC14","#13C2C2","#F04864","#8543E0"],dataZoomColor:["rgba(221, 54, 54, 1)","rgba(11, 109, 238, .5)"],barBgColor:"rgba(255, 255, 255, 0.2)",toolTip:{color:"#5E5E5E",bgColor:"#5E5E5E",shadowColor:"0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);"}}};exports.DEF_THEME="";const l={},F={},O={},_={},i={},a={},L=t(()=>{Object.keys(r).forEach((o,C)=>{C===0&&(exports.DEF_THEME=o),l[o]=r[o].fontColor,F[o]=r[o].splitLineColor,O[o]=r[o].bgColor,_[o]=r[o].barColor,r[o].dataZoomColor,i[o]=r[o].barBgColor,a[o]=r[o].toolTip})},"setThemeColor"),p={both:{top:"top","-top":"bottom",left:"right","-left":"left"},insideBoth:{insideTop:"insideTop","-insideTop":"insideBottom",insideLeft:"insideRight","-insideLeft":"insideLeft"}};L();exports.BAR_COLOR_MAP=_;exports.BG_BAR_COLOR_MAP=i;exports.BG_COLOR_MAP=O;exports.FONT_COLOR_MAP=l;exports.LABEL_POSITION_MAP=p;exports.SPLIT_LINE_COLOR=F;exports.TOOLTIP_COLOR_MAP=a;
|
|
@@ -29,11 +29,11 @@ const r = {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
let F = "";
|
|
32
|
-
const a = {}, i = {}, p = {}, b = {}, s = {}, n = {}, g =
|
|
32
|
+
const a = {}, i = {}, p = {}, b = {}, s = {}, n = {}, g = /* @__PURE__ */ C(() => {
|
|
33
33
|
Object.keys(r).forEach((o, t) => {
|
|
34
|
-
t === 0 && (F = o), a[o] = r[o].fontColor, i[o] = r[o].splitLineColor, p[o] = r[o].bgColor, b[o] = r[o].barColor,
|
|
34
|
+
t === 0 && (F = o), a[o] = r[o].fontColor, i[o] = r[o].splitLineColor, p[o] = r[o].bgColor, b[o] = r[o].barColor, r[o].dataZoomColor, s[o] = r[o].barBgColor, n[o] = r[o].toolTip;
|
|
35
35
|
});
|
|
36
|
-
}, "setThemeColor"),
|
|
36
|
+
}, "setThemeColor"), O = {
|
|
37
37
|
both: {
|
|
38
38
|
top: "top",
|
|
39
39
|
"-top": "bottom",
|
|
@@ -47,15 +47,14 @@ const a = {}, i = {}, p = {}, b = {}, s = {}, n = {}, g = {}, E = /* @__PURE__ *
|
|
|
47
47
|
"-insideLeft": "insideLeft"
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
g();
|
|
51
51
|
export {
|
|
52
52
|
b as BAR_COLOR_MAP,
|
|
53
|
-
|
|
53
|
+
s as BG_BAR_COLOR_MAP,
|
|
54
54
|
p as BG_COLOR_MAP,
|
|
55
|
-
s as DATA_ZOOM_COLOR,
|
|
56
55
|
F as DEF_THEME,
|
|
57
56
|
a as FONT_COLOR_MAP,
|
|
58
|
-
|
|
57
|
+
O as LABEL_POSITION_MAP,
|
|
59
58
|
i as SPLIT_LINE_COLOR,
|
|
60
|
-
|
|
59
|
+
n as TOOLTIP_COLOR_MAP
|
|
61
60
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var C=Object.defineProperty;var d=(
|
|
1
|
+
"use strict";var C=Object.defineProperty;var d=(r,t)=>C(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../../../_utils/utils/index.cjs"),o=require("../../base/index.cjs"),L=d((r,t,e,s,a)=>{const{name:n,seriesName:l,value:O,color:m}=r,i=s==0?`<div class="name">${n}</div>`:"",c=t&&O!=="-"&&l!=="temp"?`<span class="serise-name">${t?l:""}</span>`:"",u=O!=="-"&&l!=="temp"?`<span class="value">${O||"-"}</span>`:"",p=O!=="-"&&l!=="temp"?`<div class="content-badge ${e}" style="background-color: ${typeof m=="string"?m:a};"></div>`:"";return` ${i} <div class="content"> <div class="serise-wrap"> ${p} ${c} </div> ${u} </div> `},"setTooltipFormat"),T=d(r=>{let{legend:t,legendIcon:e,tooltip:s="shadow",theme:a="default",tooltipFormatter:n,barColorList:l}=r;const O=l||o.BAR_COLOR_MAP[a||o.DEF_THEME][0];return n=n||function(m){let i=`<div class="ls-bar-tooltip-wrap ${a}">`;return m.forEach((c,u)=>{i+=L(c,t,e,u,O)}),i+"</div>"},s?{trigger:"axis",axisPointer:{type:s,z:1,label:{color:o.TOOLTIP_COLOR_MAP[a||o.DEF_THEME].color}},textStyle:{color:o.FONT_COLOR_MAP[a||o.DEF_THEME]},padding:12,backgroundColor:o.TOOLTIP_COLOR_MAP[a||o.DEF_THEME].bgColor,extraCssText:`box-shadow: ${o.TOOLTIP_COLOR_MAP[a||o.DEF_THEME].shadowColor};`,formatter:n}:null},"setTooltip"),A=d(r=>{const{legend:t,legendIcon:e="rect",theme:s}=r;return{type:"scroll",data:t||[],icon:e,itemWidth:12,itemHeight:10,textStyle:{color:o.FONT_COLOR_MAP[s||o.DEF_THEME],fontSize:12,height:10,rich:{a:{verticalAlign:"middle"}}}}},"setLegend"),v=d(r=>{const{dataZoom:t}=r,e={left:"3%",right:"3%",top:"12%",bottom:"3%",containLabel:!0};return t==="vertical"&&delete e.right,t==="horizontal"&&delete e.bottom,e},"setGrid"),b=d((r,t,e)=>{const{axisData:s,seriesData:a}=r,{axis:n="x",theme:l,dynamicAxis:O,type:m="simple"}=t,i={type:n==e?"category":"value",axisTick:{show:!1},axisLine:{show:n==e,lineStyle:{width:1,color:o.FONT_COLOR_MAP[l||o.DEF_THEME]}},axisLabel:{margin:18},splitLine:{lineStyle:{type:"dashed",color:o.SPLIT_LINE_COLOR[l||o.DEF_THEME]}}};if(n==e&&(i.data=s),n!==e&&O&&["simple","multiBar"].includes(m)){let c=[];m==="simple"?c=(a||[]).map(_=>E.numberFixed(_)):m==="multiBar"&&(c=a.reduce((_,y)=>_.concat(y.data),[]));const u=Math.max(...c),p=Math.min(...c),{aInterval:f,aMax:h,aMin:M}=E.formatChartAxis(u,p);i.min=M,i.max=h,i.interval=f}return[i]},"setAxis"),x=d(r=>{const{dataZoom:t,dataZoomColorOut:e,dataZoomColorIn:s,theme:a}=r;return t?[{show:!0,start:0,end:100,orient:t,showDataShadow:!0,dataBackground:{areaStyle:{color:s||"#d2dbee"}},fillerColor:e||"rgba(207, 223, 243, 0.25)",textStyle:{color:o.FONT_COLOR_MAP[a||o.DEF_THEME]}},{type:"inside",start:0,end:100,orient:t},{show:!1,yAxisIndex:0,filterMode:"empty",right:0,showDataShadow:!0}]:null},"setDataZoom"),g=d((r,t,e)=>{const s=r==="x"?"top":"left";let a="inside";return e?a=o.LABEL_POSITION_MAP[t][s]:a=o.LABEL_POSITION_MAP[t][`-${s}`],a},"getPos"),S=d((r,t,e)=>{const{type:s="simple",showBarFont:a=!0,labelPosition:n="inside",axis:l="x",showBackground:O,theme:m}=r,i={type:"bar",name:t.name,label:{show:a,position:n,formatter:d(function(c){const u=c.value;return u!==0?u:""},"formatter")},showBackground:O,backgroundStyle:{color:o.BG_BAR_COLOR_MAP[m||o.DEF_THEME]},data:t.data||[],barCategoryGap:"30%",barWidth:s==="multiBar"?"auto":"40%",barGap:"4%"};return["negative","categoryStack","waterfall"].includes(s)&&(i.stack="total",s==="negative"&&["both","insideBoth"].includes(n)?i.label.position=g(l,n,(t.data||[]).reduce((c,u)=>c+u)>0):s==="categoryStack"&&e>0&&(i.itemStyle={borderColor:o.BG_COLOR_MAP[m||o.DEF_THEME],borderWidth:2})),s==="waterfall"&&(i.itemStyle=e==0?{borderColor:"rgba(0,0,0,0)",color:"rgba(0,0,0,0)"}:null,i.emphasis=e==0?{itemStyle:{borderColor:"rgba(0,0,0,0)",color:"rgba(0,0,0,0)"}}:null,i.label=t.label||{show:e>0&&a,position:n,formatter:d(function(c){const u=c.value;return u!==0?u:""},"formatter")},["both","insideBoth"].includes(n)&&(i.label.position=g(l,n,e===1))),i},"setSeriesOption"),F=d((r,t)=>{const{seriesData:e}=r,{type:s="simple",legend:a=[]}=t;return(s=="simple"?[{name:a[0],data:e}]:e||[]).map((n,l)=>S(t,n,l))},"setSeries"),w=d((r,t)=>{const{theme:e,barColorList:s}=t,a={textStyle:{},backgroundColor:o.BG_COLOR_MAP[e||o.DEF_THEME],color:s||o.BAR_COLOR_MAP[e||o.DEF_THEME],legend:A(t),grid:v(t),xAxis:b(r,t,"x"),yAxis:b(r,t,"y"),series:F(r,t),dataZoom:x(t)},n=T(t);return n&&(a.tooltip=n),a},"setOption");function D(r={},t={}){return w(r,t)}d(D,"dealOption");exports.dealOption=D;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { numberFixed as
|
|
4
|
-
import { BG_COLOR_MAP as C, DEF_THEME as
|
|
5
|
-
const
|
|
6
|
-
const { name: s, seriesName: i, value: p, color: u } =
|
|
7
|
-
return ` ${n} <div class="content"> <div class="serise-wrap"> ${
|
|
8
|
-
}, "setTooltipFormat"),
|
|
9
|
-
let { legend: t, legendIcon: o, tooltip: a = "shadow", theme:
|
|
10
|
-
const p = i ||
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var c = (e, t) => _(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { numberFixed as B, formatChartAxis as M } from "../../../../_utils/utils/index.js";
|
|
4
|
+
import { BG_COLOR_MAP as C, DEF_THEME as m, BAR_COLOR_MAP as O, TOOLTIP_COLOR_MAP as h, FONT_COLOR_MAP as g, SPLIT_LINE_COLOR as $, BG_BAR_COLOR_MAP as k, LABEL_POSITION_MAP as y } from "../../base/index.js";
|
|
5
|
+
const I = /* @__PURE__ */ c((e, t, o, a, r) => {
|
|
6
|
+
const { name: s, seriesName: i, value: p, color: u } = e, n = a == 0 ? `<div class="name">${s}</div>` : "", l = t && p !== "-" && i !== "temp" ? `<span class="serise-name">${t ? i : ""}</span>` : "", d = p !== "-" && i !== "temp" ? `<span class="value">${p || "-"}</span>` : "", b = p !== "-" && i !== "temp" ? `<div class="content-badge ${o}" style="background-color: ${typeof u == "string" ? u : r};"></div>` : "";
|
|
7
|
+
return ` ${n} <div class="content"> <div class="serise-wrap"> ${b} ${l} </div> ${d} </div> `;
|
|
8
|
+
}, "setTooltipFormat"), D = /* @__PURE__ */ c((e) => {
|
|
9
|
+
let { legend: t, legendIcon: o, tooltip: a = "shadow", theme: r = "default", tooltipFormatter: s, barColorList: i } = e;
|
|
10
|
+
const p = i || O[r || m][0];
|
|
11
11
|
return s = s || function(u) {
|
|
12
|
-
let n = `<div class="ls-bar-tooltip-wrap ${
|
|
13
|
-
return u.forEach((
|
|
14
|
-
n +=
|
|
12
|
+
let n = `<div class="ls-bar-tooltip-wrap ${r}">`;
|
|
13
|
+
return u.forEach((l, d) => {
|
|
14
|
+
n += I(l, t, o, d, p);
|
|
15
15
|
}), n + "</div>";
|
|
16
16
|
}, a ? {
|
|
17
17
|
trigger: "axis",
|
|
@@ -19,19 +19,19 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
19
19
|
type: a,
|
|
20
20
|
z: 1,
|
|
21
21
|
label: {
|
|
22
|
-
color: h[
|
|
22
|
+
color: h[r || m].color
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
textStyle: {
|
|
26
|
-
color:
|
|
26
|
+
color: g[r || m]
|
|
27
27
|
},
|
|
28
28
|
padding: 12,
|
|
29
|
-
backgroundColor: h[
|
|
30
|
-
extraCssText: `box-shadow: ${h[
|
|
29
|
+
backgroundColor: h[r || m].bgColor,
|
|
30
|
+
extraCssText: `box-shadow: ${h[r || m].shadowColor};`,
|
|
31
31
|
formatter: s
|
|
32
32
|
} : null;
|
|
33
|
-
}, "setTooltip"),
|
|
34
|
-
const { legend: t, legendIcon: o = "rect", theme: a } =
|
|
33
|
+
}, "setTooltip"), R = /* @__PURE__ */ c((e) => {
|
|
34
|
+
const { legend: t, legendIcon: o = "rect", theme: a } = e;
|
|
35
35
|
return {
|
|
36
36
|
type: "scroll",
|
|
37
37
|
data: t || [],
|
|
@@ -39,7 +39,7 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
39
39
|
itemWidth: 12,
|
|
40
40
|
itemHeight: 10,
|
|
41
41
|
textStyle: {
|
|
42
|
-
color:
|
|
42
|
+
color: g[a || m],
|
|
43
43
|
fontSize: 12,
|
|
44
44
|
height: 10,
|
|
45
45
|
rich: {
|
|
@@ -49,8 +49,8 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}, "setLegend"),
|
|
53
|
-
const { dataZoom: t } =
|
|
52
|
+
}, "setLegend"), H = /* @__PURE__ */ c((e) => {
|
|
53
|
+
const { dataZoom: t } = e, o = {
|
|
54
54
|
left: "3%",
|
|
55
55
|
right: "3%",
|
|
56
56
|
top: "12%",
|
|
@@ -58,8 +58,8 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
58
58
|
containLabel: !0
|
|
59
59
|
};
|
|
60
60
|
return t === "vertical" && delete o.right, t === "horizontal" && delete o.bottom, o;
|
|
61
|
-
}, "setGrid"),
|
|
62
|
-
const { axisData: a, seriesData:
|
|
61
|
+
}, "setGrid"), x = /* @__PURE__ */ c((e, t, o) => {
|
|
62
|
+
const { axisData: a, seriesData: r } = e, { axis: s = "x", theme: i, dynamicAxis: p, type: u = "simple" } = t, n = {
|
|
63
63
|
type: s == o ? "category" : "value",
|
|
64
64
|
axisTick: {
|
|
65
65
|
show: !1
|
|
@@ -68,7 +68,7 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
68
68
|
show: s == o,
|
|
69
69
|
lineStyle: {
|
|
70
70
|
width: 1,
|
|
71
|
-
color:
|
|
71
|
+
color: g[i || m]
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
axisLabel: {
|
|
@@ -77,19 +77,19 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
77
77
|
splitLine: {
|
|
78
78
|
lineStyle: {
|
|
79
79
|
type: "dashed",
|
|
80
|
-
color:
|
|
80
|
+
color: $[i || m]
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
if (s == o && (n.data = a), s !== o && p && ["simple", "multiBar"].includes(u)) {
|
|
85
|
-
let
|
|
86
|
-
u === "simple" ?
|
|
87
|
-
const
|
|
88
|
-
n.min =
|
|
85
|
+
let l = [];
|
|
86
|
+
u === "simple" ? l = (r || []).map((f) => B(f)) : u === "multiBar" && (l = r.reduce((f, A) => f.concat(A.data), []));
|
|
87
|
+
const d = Math.max(...l), b = Math.min(...l), { aInterval: w, aMax: S, aMin: L } = M(d, b);
|
|
88
|
+
n.min = L, n.max = S, n.interval = w;
|
|
89
89
|
}
|
|
90
90
|
return [n];
|
|
91
|
-
}, "setAxis"),
|
|
92
|
-
const { dataZoom: t, dataZoomColorOut: o, dataZoomColorIn: a, theme:
|
|
91
|
+
}, "setAxis"), T = /* @__PURE__ */ c((e) => {
|
|
92
|
+
const { dataZoom: t, dataZoomColorOut: o, dataZoomColorIn: a, theme: r } = e;
|
|
93
93
|
return t ? [
|
|
94
94
|
{
|
|
95
95
|
show: !0,
|
|
@@ -98,20 +98,20 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
98
98
|
orient: t,
|
|
99
99
|
showDataShadow: !0,
|
|
100
100
|
dataBackground: {
|
|
101
|
-
lineStyle: {
|
|
102
|
-
|
|
103
|
-
},
|
|
101
|
+
// lineStyle: {
|
|
102
|
+
// color: 'transparent'
|
|
103
|
+
// },
|
|
104
104
|
areaStyle: {
|
|
105
|
-
color: a ||
|
|
105
|
+
color: a || "#d2dbee"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
fillerColor: o ||
|
|
109
|
-
moveHandleStyle: {
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
borderColor: null,
|
|
108
|
+
fillerColor: o || "rgba(207, 223, 243, 0.25)",
|
|
109
|
+
// moveHandleStyle: {
|
|
110
|
+
// opacity: 0
|
|
111
|
+
// },
|
|
112
|
+
// borderColor: null,
|
|
113
113
|
textStyle: {
|
|
114
|
-
color:
|
|
114
|
+
color: g[r || m]
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
{
|
|
@@ -128,33 +128,33 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
128
128
|
showDataShadow: !0
|
|
129
129
|
}
|
|
130
130
|
] : null;
|
|
131
|
-
}, "setDataZoom"),
|
|
132
|
-
const a =
|
|
133
|
-
let
|
|
134
|
-
return o ?
|
|
135
|
-
}, "getPos"), E = /* @__PURE__ */
|
|
136
|
-
const { type: a = "simple", showBarFont:
|
|
131
|
+
}, "setDataZoom"), v = /* @__PURE__ */ c((e, t, o) => {
|
|
132
|
+
const a = e === "x" ? "top" : "left";
|
|
133
|
+
let r = "inside";
|
|
134
|
+
return o ? r = y[t][a] : r = y[t][`-${a}`], r;
|
|
135
|
+
}, "getPos"), E = /* @__PURE__ */ c((e, t, o) => {
|
|
136
|
+
const { type: a = "simple", showBarFont: r = !0, labelPosition: s = "inside", axis: i = "x", showBackground: p, theme: u } = e, n = {
|
|
137
137
|
type: "bar",
|
|
138
138
|
name: t.name,
|
|
139
139
|
label: {
|
|
140
|
-
show:
|
|
140
|
+
show: r,
|
|
141
141
|
position: s,
|
|
142
|
-
formatter: /* @__PURE__ */
|
|
143
|
-
const
|
|
144
|
-
return
|
|
142
|
+
formatter: /* @__PURE__ */ c(function(l) {
|
|
143
|
+
const d = l.value;
|
|
144
|
+
return d !== 0 ? d : "";
|
|
145
145
|
}, "formatter")
|
|
146
146
|
},
|
|
147
147
|
showBackground: p,
|
|
148
148
|
backgroundStyle: {
|
|
149
|
-
color:
|
|
149
|
+
color: k[u || m]
|
|
150
150
|
},
|
|
151
151
|
data: t.data || [],
|
|
152
152
|
barCategoryGap: "30%",
|
|
153
153
|
barWidth: a === "multiBar" ? "auto" : "40%",
|
|
154
154
|
barGap: "4%"
|
|
155
155
|
};
|
|
156
|
-
return ["negative", "categoryStack", "waterfall"].includes(a) && (n.stack = "total", a === "negative" && ["both", "insideBoth"].includes(s) ? n.label.position =
|
|
157
|
-
borderColor: C[u ||
|
|
156
|
+
return ["negative", "categoryStack", "waterfall"].includes(a) && (n.stack = "total", a === "negative" && ["both", "insideBoth"].includes(s) ? n.label.position = v(i, s, (t.data || []).reduce((l, d) => l + d) > 0) : a === "categoryStack" && o > 0 && (n.itemStyle = {
|
|
157
|
+
borderColor: C[u || m],
|
|
158
158
|
borderWidth: 2
|
|
159
159
|
})), a === "waterfall" && (n.itemStyle = o == 0 ? {
|
|
160
160
|
borderColor: "rgba(0,0,0,0)",
|
|
@@ -165,34 +165,34 @@ const D = /* @__PURE__ */ d((r, t, o, a, e) => {
|
|
|
165
165
|
color: "rgba(0,0,0,0)"
|
|
166
166
|
}
|
|
167
167
|
} : null, n.label = t.label || {
|
|
168
|
-
show: o > 0 &&
|
|
168
|
+
show: o > 0 && r,
|
|
169
169
|
position: s,
|
|
170
|
-
formatter: /* @__PURE__ */
|
|
171
|
-
const
|
|
172
|
-
return
|
|
170
|
+
formatter: /* @__PURE__ */ c(function(l) {
|
|
171
|
+
const d = l.value;
|
|
172
|
+
return d !== 0 ? d : "";
|
|
173
173
|
}, "formatter")
|
|
174
|
-
}, ["both", "insideBoth"].includes(s) && (n.label.position =
|
|
175
|
-
}, "setSeriesOption"), F = /* @__PURE__ */
|
|
176
|
-
const { seriesData: o } =
|
|
177
|
-
return (a == "simple" ? [{ name:
|
|
178
|
-
}, "setSeries"),
|
|
179
|
-
const { theme: o, barColorList: a } = t,
|
|
174
|
+
}, ["both", "insideBoth"].includes(s) && (n.label.position = v(i, s, o === 1))), n;
|
|
175
|
+
}, "setSeriesOption"), F = /* @__PURE__ */ c((e, t) => {
|
|
176
|
+
const { seriesData: o } = e, { type: a = "simple", legend: r = [] } = t;
|
|
177
|
+
return (a == "simple" ? [{ name: r[0], data: o }] : o || []).map((s, i) => E(t, s, i));
|
|
178
|
+
}, "setSeries"), Z = /* @__PURE__ */ c((e, t) => {
|
|
179
|
+
const { theme: o, barColorList: a } = t, r = {
|
|
180
180
|
textStyle: {},
|
|
181
|
-
backgroundColor: C[o ||
|
|
182
|
-
color: a ||
|
|
183
|
-
legend:
|
|
184
|
-
grid:
|
|
185
|
-
xAxis:
|
|
186
|
-
yAxis:
|
|
187
|
-
series: F(
|
|
188
|
-
dataZoom:
|
|
189
|
-
}, s =
|
|
190
|
-
return s && (
|
|
181
|
+
backgroundColor: C[o || m],
|
|
182
|
+
color: a || O[o || m],
|
|
183
|
+
legend: R(t),
|
|
184
|
+
grid: H(t),
|
|
185
|
+
xAxis: x(e, t, "x"),
|
|
186
|
+
yAxis: x(e, t, "y"),
|
|
187
|
+
series: F(e, t),
|
|
188
|
+
dataZoom: T(t)
|
|
189
|
+
}, s = D(t);
|
|
190
|
+
return s && (r.tooltip = s), r;
|
|
191
191
|
}, "setOption");
|
|
192
|
-
function
|
|
193
|
-
return
|
|
192
|
+
function P(e = {}, t = {}) {
|
|
193
|
+
return Z(e, t);
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
c(P, "dealOption");
|
|
196
196
|
export {
|
|
197
|
-
|
|
197
|
+
P as dealOption
|
|
198
198
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var b=Object.defineProperty;var u=(a,e)=>b(a,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../_utils/utils/index.cjs"),t=require("../../base/index.cjs"),C=u((a,e,o,i,s)=>{const{name:r,seriesName:n,value:l,color:E}=a,d=i==0?`<div class="name">${r}</div>`:"",p=e&&l!=="-"&&n!=="temp"?`<span class="serise-name">${e?n:""}</span>`:"",c=l!=="-"&&n!=="temp"?`<span class="value">${l||"-"}</span>`:"",m=l!=="-"&&n!=="temp"?`<div class="content-badge ${o}" style="background-color: ${typeof E=="string"?E:s};"></div>`:"";return` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${p} </div> ${c} </div> `},"setTooltipFormat"),A=u(a=>{let{legend:e,legendIcon:o,tooltip:i="shadow",theme:s,tooltipFormatter:r,barColorList:n}=a;const l=n||t.BAR_COLOR_MAP[s||t.DEF_THEME][0];return r=r||function(E){let d=`<div class="ls-bar-tooltip-wrap ${s}">`;return E.forEach((p,c)=>{d+=C(p,e,o,c,l)}),d+"</div>"},i?{trigger:"axis",axisPointer:{type:i,z:1,label:{color:t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].color}},textStyle:{color:t.FONT_COLOR_MAP[s||t.DEF_THEME]},padding:12,backgroundColor:t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].bgColor,extraCssText:`box-shadow: ${t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].shadowColor};`,formatter:r}:null},"setTooltip"),S=u(a=>{const{legend:e,legendIcon:o="rect",theme:i}=a;return{type:"scroll",data:e||[],icon:o,itemWidth:12,itemHeight:10,textStyle:{color:t.FONT_COLOR_MAP[i||t.DEF_THEME],fontSize:12,height:10,rich:{a:{verticalAlign:"middle"}}}}},"setLegend"),F=u(a=>{const{dataZoom:e}=a,o={left:"3%",right:"3%",top:"12%",bottom:"3%",containLabel:!0};return e==="vertical"&&delete o.right,e==="horizontal"&&delete o.bottom,o},"setGrid"),M=u((a,e,o)=>{const{axisData:i,seriesData:s}=a,{axis:r="x",theme:n,lineBar:l,dynamicAxis:E,type:d}=e;let p=[{type:r==o?"category":"value",axisTick:{show:!1},axisLine:{show:r==o,lineStyle:{width:1,color:t.FONT_COLOR_MAP[n||t.DEF_THEME]}},axisLabel:{margin:18},splitLine:{lineStyle:{type:"dashed",color:t.SPLIT_LINE_COLOR[n||t.DEF_THEME]}},data:r==o?i:[]}];if(r!==o&&(l&&(p=r=="x"?[{type:"value",splitLine:{show:!1,lineStyle:{color:t.SPLIT_LINE_COLOR[n||t.DEF_THEME]}}},{type:"value",splitLine:{lineStyle:{color:t.SPLIT_LINE_COLOR[n||t.DEF_THEME],type:"dashed",width:2,dashOffset:2}}}]:[{type:"value"}]),E)){let c=[];d==="multiple"&&(!l||r=="y"&&l)&&(c=s.reduce((m,O)=>m.concat(O.data),[])),p.map((m,O)=>{var L;d==="multiple"?l&&r=="x"&&(c=(((L=s[O])==null?void 0:L.data)||[]).map(h=>f.numberFixed(h))):c=(s||[]).map(h=>f.numberFixed(h)),c=c.filter(h=>h>0);const _=Math.max(...c),x=Math.min(...c),{aInterval:y,aMax:g,aMin:T}=f.formatChartAxis(_,x);return m.min=T,m.max=g,m.interval=y,m})}return p},"setAxis"),v=u(a=>{const{dataZoom:e,dataZoomColorOut:o,dataZoomColorIn:i,theme:s}=a;return e?[{show:!0,start:0,end:100,orient:e,showDataShadow:!0,dataBackground:{areaStyle:{color:i||"#d2dbee"}},fillerColor:o||"rgba(207, 223, 243, 0.25)",textStyle:{color:t.FONT_COLOR_MAP[s||t.DEF_THEME]}},{type:"inside",start:0,end:100,orient:e},{show:!1,filterMode:"empty",right:0,showDataShadow:!0}]:null},"setDataZoom"),D=u((a,e)=>{const{seriesData:o}=a,{type:i="simple",showBarFont:s=!0,labelPosition:r="inside",smooth:n=!0,areaStyle:l=void 0,showBackground:E,theme:d,name:p,lineBar:c,axis:m,symbol:O="circle"}=e;return i==="multiple"?(o||[]).map((_,x)=>{const y={name:_.name,type:_.type,symbol:O,emphasis:_.emphasis||{focus:"series"},smooth:n,areaStyle:l||null,label:{show:s,position:r},showBackground:E,backgroundStyle:{color:t.BG_BAR_COLOR_MAP[d||t.DEF_THEME]},itemStyle:_.itemStyle||{},data:_.data||[]};return c&&(m!=="y"&&x===1?y.yAxisIndex=x:y.yAxisIndex&&delete y.yAxisIndex),y}):[{name:p,label:{show:s,position:r},showBackground:E,backgroundStyle:{color:t.BG_BAR_COLOR_MAP[d||t.DEF_THEME]},data:o||[],smooth:n,symbol:O,areaStyle:l||null,type:"line"}]},"setSeries"),H=u((a,e)=>{const{theme:o,barColorList:i}=e,s={textStyle:{},backgroundColor:t.BG_COLOR_MAP[o||t.DEF_THEME],color:i||t.BAR_COLOR_MAP[o||t.DEF_THEME],legend:S(e),grid:F(e),xAxis:M(a,e,"x"),yAxis:M(a,e,"y"),series:D(a,e),dataZoom:v(e)},r=A(e);return r&&(s.tooltip=r),s},"setOption");function w(a={},e={}){return H(a,e)}u(w,"dealOption");exports.dealOption=w;
|