@lingshugroup/web-plus 1.0.22 → 1.0.23

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