@aplus-frontend/ui 0.1.25 → 0.1.26

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,74 +1,76 @@
1
- import { defineComponent as H, inject as u, ref as I, watch as J, openBlock as f, createElementBlock as h, normalizeClass as K, unref as o, createElementVNode as d, Fragment as Q, renderList as W, withDirectives as X, createVNode as C, createCommentVNode as R, vShow as Y, toDisplayString as U } from "vue";
1
+ import { defineComponent as J, inject as u, ref as R, watch as K, openBlock as f, createElementBlock as h, normalizeClass as Q, unref as i, createElementVNode as p, Fragment as W, renderList as X, withDirectives as Y, createVNode as C, createCommentVNode as $, vShow as Z, toDisplayString as U } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as Z, getName as F, getReturnData as w } from "../utils/returnData.mjs";
4
- import { CloseOutlined as ee, PlusOutlined as te } from "@ant-design/icons-vue";
5
- import { useOss as ne, getOssInstance as $ } from "../hooks/useOss.mjs";
6
- import { fileMatchesAccept as ae, getAcceptText as se } from "../utils/accept.mjs";
7
- import { message as m, Progress as oe } from "ant-design-vue";
3
+ import { getPath as F, getName as ee, getReturnData as w } from "../utils/returnData.mjs";
4
+ import { CloseOutlined as te, PlusOutlined as ne } from "@ant-design/icons-vue";
5
+ import { useOss as ae, getOssInstance as D } from "../hooks/useOss.mjs";
6
+ import { fileMatchesAccept as se, getAcceptText as oe } from "../utils/accept.mjs";
7
+ import { message as d, Progress as ie } from "ant-design-vue";
8
8
  import "../styles/picture.css";
9
- import { useLocale as ie } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useNamespace as ce } from "../../config-provider/hooks/use-namespace.mjs";
11
- const ue = ["accept"], re = { class: "picture-context" }, le = { class: "picture-item-box" }, pe = ["src"], de = { class: "picture-item-shadow" }, me = ["onClick"], fe = {
9
+ import { useLocale as ce } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const re = ["accept"], le = { class: "picture-context" }, pe = { class: "picture-item-box" }, de = ["src"], me = { class: "picture-item-shadow" }, fe = ["onClick"], he = {
12
12
  key: 0,
13
13
  class: "picture-item-uploading"
14
- }, he = { class: "picture-title" }, ge = { key: 0 }, ve = { key: 1 }, be = /* @__PURE__ */ H({
14
+ }, ge = { class: "picture-title" }, ve = { key: 0 }, _e = { key: 1 }, ze = /* @__PURE__ */ J({
15
15
  __name: "Picture",
16
- setup(_e) {
17
- const { t: r } = ie(), { b: A } = ce("ap-upload-picture"), { put: D } = ne(), E = u("theme"), O = u("dirName"), y = u("accept") || "image/*", k = u("maxSize") ?? 5, N = u("title"), l = u("maxCount") ?? 10, g = u("uploadingCount"), P = u("beforeUpload"), S = u("customRequest"), b = u("getOssAccess"), x = I(null), c = u("value"), v = u("needName");
18
- let i = I([]);
16
+ setup(xe) {
17
+ const { t: r } = ce(), { b: A } = ue("ap-upload-picture"), { put: E } = ae(), O = u("theme"), T = u("dirName"), y = u("accept") || "image/*", k = u("maxSize") ?? 5, N = u("title"), l = u("maxCount") ?? 10, g = u("uploadingCount"), P = u("beforeUpload"), S = u("customRequest"), b = u("getOssAccess"), x = R(null), c = u("value"), v = u("needName");
18
+ let o = R([]);
19
19
  const _ = [];
20
- J(
20
+ K(
21
21
  () => c == null ? void 0 : c.value,
22
22
  async function(e) {
23
- if (!i.value.length && e) {
24
- const a = [];
23
+ var a;
24
+ if (!((a = o == null ? void 0 : o.value) != null && a.length) && e) {
25
+ const n = [];
25
26
  for (let t of e) {
26
- const n = Z(v, t), s = F(v, t), p = await $(b), j = await p.getSignatureUrl(n), G = {
27
- ...new File([t], s, {}),
27
+ const s = F(v, t), m = ee(v, t), I = await D(b), G = await I.getSignatureUrl(s), H = {
28
+ ...new File([t], m, {}),
28
29
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
29
- thumbUrl: j,
30
+ thumbUrl: G,
30
31
  status: "success",
31
32
  percent: 100,
32
- path: n
33
+ path: s
33
34
  };
34
- a.push(G), p.destroy();
35
+ n.push(H), I.destroy();
35
36
  }
36
- if (l && a.length > l) {
37
- m.warning(
37
+ if (l && n.length > l) {
38
+ d.warning(
38
39
  r("ap.apUpload.fileInitializationException", {
39
40
  maxCount: l
40
41
  })
41
42
  );
42
43
  return;
43
44
  }
44
- a.forEach((t) => {
45
- i.value.push(t), _.push({
45
+ n.forEach((t) => {
46
+ o.value.push(t), _.push({
46
47
  uid: t.uid,
47
48
  path: t.path
48
49
  });
49
50
  });
50
51
  }
51
- }
52
+ },
53
+ { immediate: !0 }
52
54
  );
53
- function T() {
55
+ function B() {
54
56
  var e;
55
57
  (e = x.value) == null || e.click();
56
58
  }
57
- function B(e) {
59
+ function q(e) {
58
60
  const a = e.target;
59
61
  L(a == null ? void 0 : a.files);
60
62
  }
61
63
  function L(e) {
62
64
  if (e != null && e.length)
63
65
  for (let a = 0; a < e.length; a++)
64
- q(e[a]);
66
+ M(e[a]);
65
67
  x.value && (x.value.value = "");
66
68
  }
67
69
  let z;
68
- function q(e) {
69
- if (l && l > 1 && i.value.length >= l)
70
+ function M(e) {
71
+ if (l && l > 1 && o.value.length >= l)
70
72
  return clearTimeout(z), z = setTimeout(() => {
71
- m.warning(
73
+ d.warning(
72
74
  r("ap.apUpload.maxUploadPicture", { maxCount: l })
73
75
  );
74
76
  }), !1;
@@ -77,45 +79,45 @@ const ue = ["accept"], re = { class: "picture-context" }, le = { class: "picture
77
79
  return !1;
78
80
  } else {
79
81
  if (e.size > k * 1024 * 1024)
80
- return m.warning(
82
+ return d.warning(
81
83
  r("ap.apUpload.maxUploadFileSize", { maxSize: k })
82
84
  ), !1;
83
- if (!/image\/\w+/.test(e.type) || !ae(e, y))
84
- return m.warning(r("ap.apUpload.pictureFormatNotSupported")), !1;
85
+ if (!/image\/\w+/.test(e.type) || !se(e, y))
86
+ return d.warning(r("ap.apUpload.pictureFormatNotSupported")), !1;
85
87
  }
86
88
  const a = new FileReader();
87
89
  a.readAsDataURL(e), a.onload = function() {
88
- const t = {
90
+ const n = {
89
91
  ...e,
90
92
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
91
93
  thumbUrl: this.result,
92
94
  status: "uploading",
93
95
  percent: 0
94
96
  };
95
- M(t, e);
97
+ V(n, e);
96
98
  }, a.onerror = function() {
97
- m.warning(r("ap.apUpload.imageParsingFailed"));
99
+ d.warning(r("ap.apUpload.imageParsingFailed"));
98
100
  };
99
101
  }
100
- async function M(e, a) {
102
+ async function V(e, a) {
101
103
  if (g.value++, typeof S == "function") {
102
104
  S({
103
- onProgress: (t) => {
104
- const n = i.value.find((s) => s.uid === e.uid);
105
- n && (n.percent = t);
105
+ onProgress: (n) => {
106
+ const t = o.value.find((s) => s.uid === e.uid);
107
+ t && (t.percent = n);
106
108
  },
107
- onError: (t) => {
108
- m.warning(t || r("ap.apUpload.networkAnomaly"));
109
- const n = i.value.findIndex(
109
+ onError: (n) => {
110
+ d.warning(n || r("ap.apUpload.networkAnomaly"));
111
+ const t = o.value.findIndex(
110
112
  (s) => s.uid === e.uid
111
113
  );
112
- n > -1 && i.value.splice(n, 1), g.value--;
114
+ t > -1 && o.value.splice(t, 1), g.value--;
113
115
  },
114
- onSuccess: (t) => {
115
- const n = i.value.find((s) => s.uid === e.uid);
116
- n && (n.status = "success", n.path = t), c.value ? c.value.push(w(v, t, a.name)) : c.value = [w(v, t, a.name)], _.push({
116
+ onSuccess: (n) => {
117
+ const t = o.value.find((s) => s.uid === e.uid);
118
+ t && (t.status = "success", t.path = n), c.value ? c.value.push(w(v, n, a.name)) : c.value = [w(v, n, a.name)], _.push({
117
119
  uid: e.uid,
118
- path: t
120
+ path: n
119
121
  }), g.value--;
120
122
  },
121
123
  file: a
@@ -123,117 +125,117 @@ const ue = ["accept"], re = { class: "picture-context" }, le = { class: "picture
123
125
  return;
124
126
  }
125
127
  try {
126
- const t = await $(b);
127
- e.oss = t, i.value.push(e), D({
128
+ const n = await D(b);
129
+ e.oss = n, o.value.push(e), E({
128
130
  file: a,
129
- dirName: O,
130
- oss: t,
131
- successCallBack(n) {
132
- const s = i.value.find((p) => p.uid === e.uid);
133
- s && (s.status = "success", s.path = n), c.value ? c.value.push(w(v, n, a.name)) : c.value = [w(v, n, a.name)], _.push({
131
+ dirName: T,
132
+ oss: n,
133
+ successCallBack(t) {
134
+ const s = o.value.find((m) => m.uid === e.uid);
135
+ s && (s.status = "success", s.path = t), c.value ? c.value.push(w(v, t, a.name)) : c.value = [w(v, t, a.name)], _.push({
134
136
  uid: e.uid,
135
- path: n
137
+ path: t
136
138
  }), g.value--;
137
139
  },
138
- errorCallBack(n) {
139
- m.warning(n || r("ap.apUpload.networkAnomaly"));
140
- const s = i.value.findIndex(
141
- (p) => p.uid === e.uid
140
+ errorCallBack(t) {
141
+ d.warning(t || r("ap.apUpload.networkAnomaly"));
142
+ const s = o.value.findIndex(
143
+ (m) => m.uid === e.uid
142
144
  );
143
- s > -1 && i.value.splice(s, 1), g.value--;
145
+ s > -1 && o.value.splice(s, 1), g.value--;
144
146
  },
145
- progressCallBack(n) {
146
- const s = i.value.find((p) => p.uid === e.uid);
147
- s && (s.percent = n);
147
+ progressCallBack(t) {
148
+ const s = o.value.find((m) => m.uid === e.uid);
149
+ s && (s.percent = t);
148
150
  }
149
151
  });
150
- } catch (t) {
151
- m.warning(
152
- typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
152
+ } catch (n) {
153
+ d.warning(
154
+ typeof (n == null ? void 0 : n.message) == "string" ? n.message : r("ap.apUpload.networkAnomaly")
153
155
  );
154
- const n = i.value.findIndex((s) => s.uid === e.uid);
155
- n > -1 && i.value.splice(n, 1), g.value--;
156
+ const t = o.value.findIndex((s) => s.uid === e.uid);
157
+ t > -1 && o.value.splice(t, 1), g.value--;
156
158
  }
157
159
  }
158
- function V(e) {
159
- var t;
160
+ function j(e) {
161
+ var n;
160
162
  if (e.path) {
161
163
  if (Array.isArray(c.value)) {
162
- const n = _.findIndex(
164
+ const t = _.findIndex(
163
165
  (s) => s.uid === e.uid
164
166
  );
165
- n >= 0 && (c == null || c.value.splice(n, 1), _.splice(n, 1)), c.value.length === 0 && (c.value = void 0);
167
+ t >= 0 && (c == null || c.value.splice(t, 1), _.splice(t, 1)), c.value.length === 0 && (c.value = void 0);
166
168
  }
167
169
  } else
168
- (t = e == null ? void 0 : e.oss) == null || t.pauseUpload();
169
- const a = i.value.findIndex(
170
- (n) => n.uid === e.uid
170
+ (n = e == null ? void 0 : e.oss) == null || n.pauseUpload();
171
+ const a = o.value.findIndex(
172
+ (t) => t.uid === e.uid
171
173
  );
172
- return i.value.splice(a, 1), Promise.resolve(!0);
174
+ return o.value.splice(a, 1), Promise.resolve(!0);
173
175
  }
174
176
  return (e, a) => (f(), h("div", {
175
- class: K({
176
- [o(A)()]: !0,
177
- [o(A)("admin")]: o(E) === "admin"
177
+ class: Q({
178
+ [i(A)()]: !0,
179
+ [i(A)("admin")]: i(O) === "admin"
178
180
  })
179
181
  }, [
180
- d("input", {
182
+ p("input", {
181
183
  style: { display: "none" },
182
184
  type: "file",
183
185
  ref_key: "fileRef",
184
186
  ref: x,
185
- accept: o(y),
186
- onChange: B
187
- }, null, 40, ue),
188
- d("div", re, [
189
- (f(!0), h(Q, null, W(o(i), (t) => (f(), h("div", {
187
+ accept: i(y),
188
+ onChange: q
189
+ }, null, 40, re),
190
+ p("div", le, [
191
+ (f(!0), h(W, null, X(i(o), (n) => (f(), h("div", {
190
192
  class: "picture-item",
191
- key: t.uid
193
+ key: n.uid
192
194
  }, [
193
- d("div", le, [
194
- d("img", {
195
- src: t.thumbUrl,
195
+ p("div", pe, [
196
+ p("img", {
197
+ src: n.thumbUrl,
196
198
  alt: ""
197
- }, null, 8, pe),
198
- X(d("div", de, [
199
- d("div", {
199
+ }, null, 8, de),
200
+ Y(p("div", me, [
201
+ p("div", {
200
202
  class: "picture-item-close",
201
- onClick: (n) => V(t)
203
+ onClick: (t) => j(n)
202
204
  }, [
203
- C(o(ee))
204
- ], 8, me),
205
- t.status === "uploading" ? (f(), h("div", fe, [
206
- C(o(oe), {
207
- percent: t.percent,
205
+ C(i(te))
206
+ ], 8, fe),
207
+ n.status === "uploading" ? (f(), h("div", he, [
208
+ C(i(ie), {
209
+ percent: n.percent,
208
210
  strokeColor: "#ffffff",
209
211
  trailColor: "rgba(255, 255, 255, 0.3)",
210
212
  size: 4,
211
213
  showInfo: !1
212
214
  }, null, 8, ["percent"])
213
- ])) : R("", !0)
215
+ ])) : $("", !0)
214
216
  ], 512), [
215
- [Y, t.status === "uploading"]
217
+ [Z, n.status === "uploading"]
216
218
  ])
217
219
  ])
218
220
  ]))), 128)),
219
- o(l) === void 0 || o(i).length < o(l) ? (f(), h("div", {
221
+ i(l) === void 0 || i(o).length < i(l) ? (f(), h("div", {
220
222
  key: 0,
221
223
  class: "picture-upload",
222
- onClick: T
224
+ onClick: B
223
225
  }, [
224
- C(o(te)),
225
- d("div", null, U(o(r)("ap.apUpload.update")), 1)
226
- ])) : R("", !0)
226
+ C(i(ne)),
227
+ p("div", null, U(i(r)("ap.apUpload.update")), 1)
228
+ ])) : $("", !0)
227
229
  ]),
228
- d("div", he, [
229
- o(N) ? (f(), h("div", ge, U(o(N)), 1)) : (f(), h("div", ve, U(`${o(r)("ap.apUpload.supportExtension")}:${o(se)(o(y))},${o(r)(
230
+ p("div", ge, [
231
+ i(N) ? (f(), h("div", ve, U(i(N)), 1)) : (f(), h("div", _e, U(`${i(r)("ap.apUpload.supportExtension")}:${i(oe)(i(y))},${i(r)(
230
232
  "ap.apUpload.maxUploadPictureSize",
231
- { maxSize: o(k) }
233
+ { maxSize: i(k) }
232
234
  )}`), 1))
233
235
  ])
234
236
  ], 2));
235
237
  }
236
238
  });
237
239
  export {
238
- be as default
240
+ ze as default
239
241
  };
@@ -22,13 +22,16 @@ const ge = ["accept"], he = {
22
22
  ee(
23
23
  () => n == null ? void 0 : n.value,
24
24
  function(e) {
25
- const t = re(F, e);
26
- o.value === null && e && (l.value = 3, o.value = new File(
27
- [e],
28
- t,
29
- {}
30
- ));
31
- }
25
+ if (o.value === null && e) {
26
+ const t = re(F, e);
27
+ l.value = 3, o.value = new File(
28
+ [e],
29
+ t,
30
+ {}
31
+ );
32
+ }
33
+ },
34
+ { immediate: !0 }
32
35
  );
33
36
  const l = h(1), f = h(0), m = h(null), P = te(() => o.value && (n == null ? void 0 : n.value));
34
37
  function H() {
@@ -1,10 +1,11 @@
1
- import { defineComponent as O, useSlots as T, ref as W, computed as d, unref as l, onMounted as q, openBlock as t, createElementBlock as s, normalizeClass as a, createBlock as P, normalizeProps as S, mergeProps as _, createSlots as V, withCtx as m, Fragment as c, createElementVNode as u, normalizeStyle as p, toDisplayString as i, renderSlot as $, createCommentVNode as C, renderList as E } from "vue";
2
- import { Tooltip as M } from "ant-design-vue";
1
+ import { defineComponent as q, useSlots as H, ref as R, computed as h, unref as l, onMounted as J, openBlock as t, createElementBlock as r, normalizeClass as u, createBlock as $, normalizeProps as w, mergeProps as E, createSlots as M, withCtx as b, Fragment as y, createElementVNode as p, normalizeStyle as m, toDisplayString as i, renderSlot as N, createCommentVNode as f, renderList as z, createTextVNode as K } from "vue";
2
+ import { Tooltip as O } from "ant-design-vue";
3
3
  import "../../config-provider/index.mjs";
4
+ import { locales as Q } from "./interface.mjs";
4
5
  import "./style.css";
5
- import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
6
- import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
7
- const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key: 1 }, re = /* @__PURE__ */ O({
6
+ import { useNamespace as U } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
8
+ const Y = { key: 1 }, Z = { key: 0 }, x = { key: 1 }, ee = { key: 0 }, oe = ["onClick"], te = { key: 0 }, re = { key: 1 }, le = { key: 0 }, se = { key: 1 }, me = /* @__PURE__ */ q({
8
9
  name: "ApLadder",
9
10
  __name: "ApLadder",
10
11
  props: {
@@ -33,114 +34,143 @@ const K = { key: 0 }, Q = { key: 1 }, R = ["onClick"], U = { key: 0 }, X = { key
33
34
  trigger: "hover"
34
35
  }) }
35
36
  },
36
- setup(w) {
37
- const y = T(), r = w, { b: A, e: n, m: B } = H("ap-ladder"), N = J("uiMode", "aplus"), v = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, L = n("ellipsis"), h = W(!1), z = d(() => r.major || r.minor), D = d(() => r.labelValues.length > 0), b = d(() => r.majorColor ? {
38
- color: `${r.majorColor}`
39
- } : {}), j = d(() => r.minorColor ? {
40
- color: `${r.minorColor}`
41
- } : {}), f = (e) => e == null ? "--" : typeof e == "string" ? e || "--" : typeof e == "number" ? e.toFixed(2) : "--", F = () => {
42
- const e = document.getElementById(v);
43
- if (!e)
37
+ setup(A) {
38
+ const v = H(), s = A, { b: B, e: n, m: L } = U("ap-ladder"), F = X("uiMode", "aplus"), _ = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, W = n("ellipsis"), k = R(!1), D = h(() => s.labelValues.length === 0), T = h(() => s.labelValues.length > 0), g = h(() => s.majorColor ? {
39
+ color: `${s.majorColor}`
40
+ } : {}), S = h(() => s.minorColor ? {
41
+ color: `${s.minorColor}`
42
+ } : {}), C = (o) => o == null || typeof o == "string" && o.trim() === "", c = (o, a = {}) => {
43
+ const e = {
44
+ rawValue: a.rawValue,
45
+ precision: a.precision === void 0 ? 2 : a.precision,
46
+ thousand: a.thousand,
47
+ thousandSeparator: a.thousandSeparator || ",",
48
+ currency: a.currency,
49
+ percent: a.percent
50
+ };
51
+ return C(o) ? "--" : e.rawValue ? o : typeof o == "number" ? e.percent ? `${o.toFixed(e.precision)}%` : e.currency ? o.toLocaleString(Q[e.currency], {
52
+ style: "currency",
53
+ currency: e.currency
54
+ }) : e.thousand ? o.toFixed(e.precision).replace(
55
+ /(\d)(?=(\d{3})+(?!\d))/g,
56
+ `$1${e.thousandSeparator}`
57
+ ) : o.toFixed(e.precision) : o;
58
+ }, G = () => {
59
+ const o = document.getElementById(_);
60
+ if (!o)
44
61
  return;
45
- e.querySelectorAll(`.${L}`).forEach((o) => {
46
- o.clientWidth < o.scrollWidth && (h.value = !0);
62
+ const a = o.querySelectorAll(`.${W}`);
63
+ new ResizeObserver((d) => {
64
+ d.forEach((j) => {
65
+ j.target === o && (k.value = !1, a.forEach((P) => {
66
+ P.clientWidth < P.scrollWidth && (k.value = !0);
67
+ }));
68
+ });
69
+ }).observe(o), k.value = !1, a.forEach((d) => {
70
+ d.clientWidth < d.scrollWidth && (k.value = !0);
47
71
  });
48
- }, g = d(() => y.title ? !0 : r.tooltip && l(h)), G = (e) => {
49
- e && window.open(e, "_blank");
72
+ }, V = h(() => v.title ? !0 : s.tooltip && l(k)), I = (o) => {
73
+ o && window.open(o, "_blank");
50
74
  };
51
- return q(() => {
52
- F();
53
- }), (e, I) => (t(), s("div", {
54
- id: v,
55
- class: a([l(A)(), `${l(B)(l(N))}`])
75
+ return J(() => {
76
+ G();
77
+ }), (o, a) => (t(), r("div", {
78
+ id: _,
79
+ class: u([l(B)(), `${l(L)(l(F))}`])
56
80
  }, [
57
- z.value ? (t(), P(l(M), S(_({ key: 0 }, { ...r.tooltipProps })), V({
58
- default: m(() => [
59
- r.layout === "vertical" ? (t(), s(c, { key: 0 }, [
60
- u("div", {
61
- class: a([l(n)("major"), l(n)("ellipsis")]),
62
- style: p(b.value)
63
- }, i(e.major || "--"), 7),
64
- u("div", {
65
- class: a([l(n)("minor"), l(n)("ellipsis")]),
66
- style: p(j.value)
67
- }, i(e.minor || "--"), 7)
68
- ], 64)) : (t(), s("div", {
69
- key: 1,
70
- class: a(l(n)("ellipsis"))
71
- }, [
72
- u("span", {
73
- class: a([l(n)("major")]),
74
- style: p(b.value)
75
- }, i(e.major || "--"), 7),
76
- u("span", {
77
- class: a([l(n)("minor")]),
78
- style: p(j.value)
79
- }, i(e.minor || "--"), 7)
80
- ], 2))
81
+ D.value ? (t(), $(l(O), w(E({ key: 0 }, { ...s.tooltipProps })), M({
82
+ default: b(() => [
83
+ !C(o.major) || !C(o.minor) ? (t(), r(y, { key: 0 }, [
84
+ s.layout === "vertical" ? (t(), r(y, { key: 0 }, [
85
+ p("div", {
86
+ class: u([l(n)("major"), l(n)("ellipsis")]),
87
+ style: m(g.value)
88
+ }, i(c(o.major)), 7),
89
+ p("div", {
90
+ class: u([l(n)("minor"), l(n)("ellipsis")]),
91
+ style: m(S.value)
92
+ }, i(c(o.minor)), 7)
93
+ ], 64)) : (t(), r("div", {
94
+ key: 1,
95
+ class: u(l(n)("ellipsis"))
96
+ }, [
97
+ p("span", {
98
+ class: u([l(n)("major")]),
99
+ style: m(g.value)
100
+ }, i(c(o.major)), 7),
101
+ p("span", {
102
+ class: u([l(n)("minor")]),
103
+ style: m(S.value)
104
+ }, i(c(o.minor)), 7)
105
+ ], 2))
106
+ ], 64)) : (t(), r("div", Y, i("--")))
81
107
  ]),
82
108
  _: 2
83
109
  }, [
84
- g.value ? {
110
+ V.value ? {
85
111
  name: "title",
86
- fn: m(() => [
87
- y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
88
- r.tooltipProps.title ? (t(), s("div", K, i(r.tooltipProps.title), 1)) : (t(), s("div", Q, [
89
- u("div", null, i(e.major || "--"), 1),
90
- u("div", null, i(e.minor || "--"), 1)
112
+ fn: b(() => [
113
+ v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
114
+ s.tooltipProps.title ? (t(), r("div", Z, i(s.tooltipProps.title), 1)) : (t(), r("div", x, [
115
+ p("div", null, i(c(o.major)), 1),
116
+ p("div", null, i(c(o.minor)), 1)
91
117
  ]))
92
118
  ], 64))
93
119
  ]),
94
120
  key: "0"
95
121
  } : void 0
96
- ]), 1040)) : C("", !0),
97
- D.value ? (t(), P(l(M), S(_({ key: 1 }, { ...r.tooltipProps })), V({
98
- default: m(() => [
99
- (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", {
100
- key: k,
101
- class: a([l(n)("ellipsis")])
122
+ ]), 1040)) : f("", !0),
123
+ T.value ? (t(), $(l(O), w(E({ key: 1 }, { ...s.tooltipProps })), M({
124
+ default: b(() => [
125
+ (t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", {
126
+ key: d,
127
+ class: u([l(n)("ellipsis")])
102
128
  }, [
103
- u("span", {
104
- class: a(l(n)("label")),
105
- style: p(o.labelColor ? { color: o.labelColor } : void 0)
106
- }, i(o.label) + ":", 7),
107
- o.link ? (t(), s("span", {
108
- key: 0,
109
- class: a(l(n)("link")),
110
- style: p(o.linkColor ? { color: o.linkColor } : void 0),
111
- onClick: (Y) => G(o.link)
112
- }, i(f(o.value)), 15, R)) : (t(), s("span", {
129
+ p("span", {
130
+ class: u(l(n)("label")),
131
+ style: m(e.labelColor ? { color: e.labelColor } : void 0)
132
+ }, [
133
+ K(i(e.label), 1),
134
+ e.label ? (t(), r("span", ee, ":")) : f("", !0)
135
+ ], 6),
136
+ C(e.link) ? (t(), r("span", {
113
137
  key: 1,
114
- class: a(l(n)("value")),
115
- style: p(o.valueColor ? { color: o.valueColor } : void 0)
116
- }, i(f(o.value)), 7)),
117
- o.unit ? (t(), s("span", {
138
+ class: u(l(n)("value")),
139
+ style: m(e.valueColor ? { color: e.valueColor } : void 0)
140
+ }, i(c(e.value, { ...e })), 7)) : (t(), r("span", {
141
+ key: 0,
142
+ class: u(l(n)("link")),
143
+ style: m(e.linkColor ? { color: e.linkColor } : void 0),
144
+ onClick: (j) => I(e.link)
145
+ }, i(c(e.value, { ...e })), 15, oe)),
146
+ e.unit ? (t(), r("span", {
118
147
  key: 2,
119
- class: a(l(n)("unit")),
120
- style: p(o.unitColor ? { color: o.unitColor } : void 0)
121
- }, i(o.unit), 7)) : C("", !0)
148
+ class: u(l(n)("unit")),
149
+ style: m(e.unitColor ? { color: e.unitColor } : void 0)
150
+ }, i(e.unit), 7)) : f("", !0)
122
151
  ], 2))), 128))
123
152
  ]),
124
153
  _: 2
125
154
  }, [
126
- g.value ? {
155
+ V.value ? {
127
156
  name: "title",
128
- fn: m(() => [
129
- y.title ? $(e.$slots, "title", { key: 0 }) : (t(), s(c, { key: 1 }, [
130
- r.tooltipProps.title ? (t(), s("div", U, i(r.tooltipProps.title), 1)) : (t(), s("div", X, [
131
- (t(!0), s(c, null, E(r.labelValues, (o, k) => (t(), s("div", { key: k }, [
132
- u("span", null, i(o.label), 1),
133
- u("span", null, i(f(o.value)), 1)
157
+ fn: b(() => [
158
+ v.title ? N(o.$slots, "title", { key: 0 }) : (t(), r(y, { key: 1 }, [
159
+ s.tooltipProps.title ? (t(), r("div", te, i(s.tooltipProps.title), 1)) : (t(), r("div", re, [
160
+ (t(!0), r(y, null, z(s.labelValues, (e, d) => (t(), r("div", { key: d }, [
161
+ e.label ? (t(), r("span", le, i(e.label), 1)) : f("", !0),
162
+ e.label ? (t(), r("span", se, ":")) : f("", !0),
163
+ p("span", null, i(c(e.value, { ...e })), 1)
134
164
  ]))), 128))
135
165
  ]))
136
166
  ], 64))
137
167
  ]),
138
168
  key: "0"
139
169
  } : void 0
140
- ]), 1040)) : C("", !0)
170
+ ]), 1040)) : f("", !0)
141
171
  ], 2));
142
172
  }
143
173
  });
144
174
  export {
145
- re as default
175
+ me as default
146
176
  };