@lingshugroup/web-plus 1.0.23 → 1.0.24

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.
@@ -1,17 +1,17 @@
1
- var I = Object.defineProperty;
2
- var p = (a, t) => I(a, "name", { value: t, configurable: !0 });
3
- import { numberFixed as C, formatChartAxis as D } from "../../../../_utils/utils/index.js";
4
- import { BG_COLOR_MAP as R, DEF_THEME as s, BAR_COLOR_MAP as M, TOOLTIP_COLOR_MAP as O, FONT_COLOR_MAP as b, DATA_ZOOM_COLOR as L, BG_BAR_COLOR_MAP as A, SPLIT_LINE_COLOR as S } from "../../base/index.js";
5
- const k = /* @__PURE__ */ p((a, t, e, n, o) => {
6
- const { name: r, seriesName: i, value: l, color: u } = a, d = n == 0 ? `<div class="name">${r}</div>` : "", y = t && l !== "-" && i !== "temp" ? `<span class="serise-name">${t ? i : ""}</span>` : "", c = l !== "-" && i !== "temp" ? `<span class="value">${l || "-"}</span>` : "", m = l !== "-" && i !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : o};"></div>` : "";
1
+ var B = Object.defineProperty;
2
+ var p = (o, t) => B(o, "name", { value: t, configurable: !0 });
3
+ import { numberFixed as C, formatChartAxis as I } from "../../../../_utils/utils/index.js";
4
+ import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as _, TOOLTIP_COLOR_MAP as S, FONT_COLOR_MAP as b, BG_BAR_COLOR_MAP as L, SPLIT_LINE_COLOR as w } from "../../base/index.js";
5
+ const D = /* @__PURE__ */ p((o, t, e, n, a) => {
6
+ const { name: s, seriesName: i, value: r, color: u } = o, d = n == 0 ? `<div class="name">${s}</div>` : "", y = t && r !== "-" && i !== "temp" ? `<span class="serise-name">${t ? i : ""}</span>` : "", c = r !== "-" && i !== "temp" ? `<span class="value">${r || "-"}</span>` : "", m = r !== "-" && i !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : a};"></div>` : "";
7
7
  return ` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${y} </div> ${c} </div> `;
8
- }, "setTooltipFormat"), H = /* @__PURE__ */ p((a) => {
9
- let { legend: t, legendIcon: e, tooltip: n = "shadow", theme: o, tooltipFormatter: r, barColorList: i } = a;
10
- const l = i || M[o || s][0];
11
- return r = r || function(u) {
12
- let d = `<div class="ls-bar-tooltip-wrap ${o}">`;
8
+ }, "setTooltipFormat"), R = /* @__PURE__ */ p((o) => {
9
+ let { legend: t, legendIcon: e, tooltip: n = "shadow", theme: a, tooltipFormatter: s, barColorList: i } = o;
10
+ const r = i || _[a || l][0];
11
+ return s = s || function(u) {
12
+ let d = `<div class="ls-bar-tooltip-wrap ${a}">`;
13
13
  return u.forEach((y, c) => {
14
- d += k(y, t, e, c, l);
14
+ d += D(y, t, e, c, r);
15
15
  }), d + "</div>";
16
16
  }, n ? {
17
17
  trigger: "axis",
@@ -19,19 +19,19 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
19
19
  type: n,
20
20
  z: 1,
21
21
  label: {
22
- color: O[o || s].color
22
+ color: S[a || l].color
23
23
  }
24
24
  },
25
25
  textStyle: {
26
- color: b[o || s]
26
+ color: b[a || l]
27
27
  },
28
28
  padding: 12,
29
- backgroundColor: O[o || s].bgColor,
30
- extraCssText: `box-shadow: ${O[o || s].shadowColor};`,
31
- formatter: r
29
+ backgroundColor: S[a || l].bgColor,
30
+ extraCssText: `box-shadow: ${S[a || l].shadowColor};`,
31
+ formatter: s
32
32
  } : null;
33
- }, "setTooltip"), T = /* @__PURE__ */ p((a) => {
34
- const { legend: t, legendIcon: e = "rect", theme: n } = a;
33
+ }, "setTooltip"), H = /* @__PURE__ */ p((o) => {
34
+ const { legend: t, legendIcon: e = "rect", theme: n } = o;
35
35
  return {
36
36
  type: "scroll",
37
37
  data: t || [],
@@ -39,7 +39,7 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
39
39
  itemWidth: 12,
40
40
  itemHeight: 10,
41
41
  textStyle: {
42
- color: b[n || s],
42
+ color: b[n || l],
43
43
  fontSize: 12,
44
44
  height: 10,
45
45
  rich: {
@@ -49,8 +49,8 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
49
49
  }
50
50
  }
51
51
  };
52
- }, "setLegend"), Z = /* @__PURE__ */ p((a) => {
53
- const { dataZoom: t } = a, e = {
52
+ }, "setLegend"), F = /* @__PURE__ */ p((o) => {
53
+ const { dataZoom: t } = o, e = {
54
54
  left: "3%",
55
55
  right: "3%",
56
56
  top: "12%",
@@ -58,19 +58,19 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
58
58
  containLabel: !0
59
59
  };
60
60
  return t === "vertical" && delete e.right, t === "horizontal" && delete e.bottom, e;
61
- }, "setGrid"), _ = /* @__PURE__ */ p((a, t, e) => {
62
- const { axisData: n, seriesData: o } = a, { axis: r = "x", theme: i, lineBar: l, dynamicAxis: u, type: d } = t;
61
+ }, "setGrid"), A = /* @__PURE__ */ p((o, t, e) => {
62
+ const { axisData: n, seriesData: a } = o, { axis: s = "x", theme: i, lineBar: r, dynamicAxis: u, type: d } = t;
63
63
  let y = [
64
64
  {
65
- type: r == e ? "category" : "value",
65
+ type: s == e ? "category" : "value",
66
66
  axisTick: {
67
67
  show: !1
68
68
  },
69
69
  axisLine: {
70
- show: r == e,
70
+ show: s == e,
71
71
  lineStyle: {
72
72
  width: 1,
73
- color: b[i || s]
73
+ color: b[i || l]
74
74
  }
75
75
  },
76
76
  axisLabel: {
@@ -79,19 +79,19 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
79
79
  splitLine: {
80
80
  lineStyle: {
81
81
  type: "dashed",
82
- color: S[i || s]
82
+ color: w[i || l]
83
83
  }
84
84
  },
85
- data: r == e ? n : []
85
+ data: s == e ? n : []
86
86
  }
87
87
  ];
88
- if (r !== e && (l && (y = r == "x" ? [
88
+ if (s !== e && (r && (y = s == "x" ? [
89
89
  {
90
90
  type: "value",
91
91
  splitLine: {
92
92
  show: !1,
93
93
  lineStyle: {
94
- color: S[i || s]
94
+ color: w[i || l]
95
95
  }
96
96
  }
97
97
  },
@@ -99,7 +99,7 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
99
99
  type: "value",
100
100
  splitLine: {
101
101
  lineStyle: {
102
- color: S[i || s],
102
+ color: w[i || l],
103
103
  type: "dashed",
104
104
  width: 2,
105
105
  dashOffset: 2
@@ -112,16 +112,16 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
112
112
  }
113
113
  ]), u)) {
114
114
  let c = [];
115
- d === "multiple" && (!l || r == "y" && l) && (c = o.reduce((m, x) => m.concat(x.data), [])), y.map((m, x) => {
116
- var w;
117
- d === "multiple" ? l && r == "x" && (c = (((w = o[x]) == null ? void 0 : w.data) || []).map((v) => C(v))) : c = (o || []).map((v) => C(v));
118
- const h = Math.max(...c), g = Math.min(...c), { aInterval: f, aMax: $, aMin: B } = D(h, g);
119
- return m.min = B, m.max = $, m.interval = f, m;
115
+ d === "multiple" && (!r || s == "y" && r) && (c = a.reduce((m, x) => m.concat(x.data), [])), y.map((m, x) => {
116
+ var O;
117
+ d === "multiple" ? r && s == "x" && (c = (((O = a[x]) == null ? void 0 : O.data) || []).map((v) => C(v))) : c = (a || []).map((v) => C(v));
118
+ const h = Math.max(...c), g = Math.min(...c), { aInterval: f, aMax: M, aMin: $ } = I(h, g);
119
+ return m.min = $, m.max = M, m.interval = f, m;
120
120
  });
121
121
  }
122
122
  return y;
123
- }, "setAxis"), F = /* @__PURE__ */ p((a) => {
124
- const { dataZoom: t, dataZoomColorOut: e, dataZoomColorIn: n, theme: o } = a;
123
+ }, "setAxis"), T = /* @__PURE__ */ p((o) => {
124
+ const { dataZoom: t, dataZoomColorOut: e, dataZoomColorIn: n, theme: a } = o;
125
125
  return t ? [
126
126
  {
127
127
  show: !0,
@@ -130,20 +130,20 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
130
130
  orient: t,
131
131
  showDataShadow: !0,
132
132
  dataBackground: {
133
- lineStyle: {
134
- color: "transparent"
135
- },
133
+ // lineStyle: {
134
+ // color: 'transparent'
135
+ // },
136
136
  areaStyle: {
137
- color: n || L[o || s][0]
137
+ color: n || "#d2dbee"
138
138
  }
139
139
  },
140
- fillerColor: e || L[o || s][1],
141
- moveHandleStyle: {
142
- opacity: 0
143
- },
144
- borderColor: null,
140
+ fillerColor: e || "rgba(207, 223, 243, 0.25)",
141
+ // moveHandleStyle: {
142
+ // opacity: 0
143
+ // },
144
+ // borderColor: null,
145
145
  textStyle: {
146
- color: b[o || s]
146
+ color: b[a || l]
147
147
  }
148
148
  },
149
149
  {
@@ -159,13 +159,13 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
159
159
  showDataShadow: !0
160
160
  }
161
161
  ] : null;
162
- }, "setDataZoom"), E = /* @__PURE__ */ p((a, t) => {
163
- const { seriesData: e } = a, {
162
+ }, "setDataZoom"), Z = /* @__PURE__ */ p((o, t) => {
163
+ const { seriesData: e } = o, {
164
164
  type: n = "simple",
165
- showBarFont: o = !0,
166
- labelPosition: r = "inside",
165
+ showBarFont: a = !0,
166
+ labelPosition: s = "inside",
167
167
  smooth: i = !0,
168
- areaStyle: l = void 0,
168
+ areaStyle: r = void 0,
169
169
  showBackground: u,
170
170
  theme: d,
171
171
  name: y,
@@ -182,14 +182,14 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
182
182
  focus: "series"
183
183
  },
184
184
  smooth: i,
185
- areaStyle: l || null,
185
+ areaStyle: r || null,
186
186
  label: {
187
- show: o,
188
- position: r
187
+ show: a,
188
+ position: s
189
189
  },
190
190
  showBackground: u,
191
191
  backgroundStyle: {
192
- color: A[d || s]
192
+ color: L[d || l]
193
193
  },
194
194
  itemStyle: h.itemStyle || {},
195
195
  data: h.data || []
@@ -199,39 +199,39 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
199
199
  {
200
200
  name: y,
201
201
  label: {
202
- show: o,
203
- position: r
202
+ show: a,
203
+ position: s
204
204
  },
205
205
  showBackground: u,
206
206
  backgroundStyle: {
207
- color: A[d || s]
207
+ color: L[d || l]
208
208
  },
209
209
  data: e || [],
210
210
  smooth: i,
211
211
  symbol: x,
212
212
  // 设置填充透明度
213
- areaStyle: l || null,
213
+ areaStyle: r || null,
214
214
  type: "line"
215
215
  }
216
216
  ];
217
- }, "setSeries"), z = /* @__PURE__ */ p((a, t) => {
218
- const { theme: e, barColorList: n } = t, o = {
217
+ }, "setSeries"), E = /* @__PURE__ */ p((o, t) => {
218
+ const { theme: e, barColorList: n } = t, a = {
219
219
  textStyle: {},
220
- backgroundColor: R[e || s],
221
- color: n || M[e || s],
222
- legend: T(t),
223
- grid: Z(t),
224
- xAxis: _(a, t, "x"),
225
- yAxis: _(a, t, "y"),
226
- series: E(a, t),
227
- dataZoom: F(t)
228
- }, r = H(t);
229
- return r && (o.tooltip = r), o;
220
+ backgroundColor: k[e || l],
221
+ color: n || _[e || l],
222
+ legend: H(t),
223
+ grid: F(t),
224
+ xAxis: A(o, t, "x"),
225
+ yAxis: A(o, t, "y"),
226
+ series: Z(o, t),
227
+ dataZoom: T(t)
228
+ }, s = R(t);
229
+ return s && (a.tooltip = s), a;
230
230
  }, "setOption");
231
- function W(a = {}, t = {}) {
232
- return z(a, t);
231
+ function P(o = {}, t = {}) {
232
+ return E(o, t);
233
233
  }
234
- p(W, "dealOption");
234
+ p(P, "dealOption");
235
235
  export {
236
- W as dealOption
236
+ P as dealOption
237
237
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",