@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.
- package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
- package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +114 -84
- package/es/src/business/ap-ladder/interface.d.ts +42 -0
- package/es/src/business/ap-ladder/interface.mjs +10 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +6 -1
- package/es/src/business/hooks/usePageListApTable.mjs +27 -17
- package/es/src/business/hooks/useTableRefresh.d.ts +3 -4
- package/es/src/business/hooks/useTableRefresh.mjs +9 -9
- package/es/src/business/index.d.ts +3 -3
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/interface.d.ts +42 -0
- package/lib/src/business/ap-ladder/interface.js +1 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +6 -1
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +3 -4
- package/lib/src/business/hooks/useTableRefresh.js +1 -1
- package/lib/src/business/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
|
|
4
|
-
import { CloseOutlined as
|
|
5
|
-
import { useOss as
|
|
6
|
-
import { fileMatchesAccept as
|
|
7
|
-
import { message as
|
|
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
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
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
|
-
},
|
|
14
|
+
}, ge = { class: "picture-title" }, ve = { key: 0 }, _e = { key: 1 }, ze = /* @__PURE__ */ J({
|
|
15
15
|
__name: "Picture",
|
|
16
|
-
setup(
|
|
17
|
-
const { t: r } =
|
|
18
|
-
let
|
|
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
|
-
|
|
20
|
+
K(
|
|
21
21
|
() => c == null ? void 0 : c.value,
|
|
22
22
|
async function(e) {
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
27
|
-
...new File([t],
|
|
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:
|
|
30
|
+
thumbUrl: G,
|
|
30
31
|
status: "success",
|
|
31
32
|
percent: 100,
|
|
32
|
-
path:
|
|
33
|
+
path: s
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
n.push(H), I.destroy();
|
|
35
36
|
}
|
|
36
|
-
if (l &&
|
|
37
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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
|
|
55
|
+
function B() {
|
|
54
56
|
var e;
|
|
55
57
|
(e = x.value) == null || e.click();
|
|
56
58
|
}
|
|
57
|
-
function
|
|
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
|
-
|
|
66
|
+
M(e[a]);
|
|
65
67
|
x.value && (x.value.value = "");
|
|
66
68
|
}
|
|
67
69
|
let z;
|
|
68
|
-
function
|
|
69
|
-
if (l && l > 1 &&
|
|
70
|
+
function M(e) {
|
|
71
|
+
if (l && l > 1 && o.value.length >= l)
|
|
70
72
|
return clearTimeout(z), z = setTimeout(() => {
|
|
71
|
-
|
|
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
|
|
82
|
+
return d.warning(
|
|
81
83
|
r("ap.apUpload.maxUploadFileSize", { maxSize: k })
|
|
82
84
|
), !1;
|
|
83
|
-
if (!/image\/\w+/.test(e.type) || !
|
|
84
|
-
return
|
|
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
|
|
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
|
-
|
|
97
|
+
V(n, e);
|
|
96
98
|
}, a.onerror = function() {
|
|
97
|
-
|
|
99
|
+
d.warning(r("ap.apUpload.imageParsingFailed"));
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
|
-
async function
|
|
102
|
+
async function V(e, a) {
|
|
101
103
|
if (g.value++, typeof S == "function") {
|
|
102
104
|
S({
|
|
103
|
-
onProgress: (
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
onProgress: (n) => {
|
|
106
|
+
const t = o.value.find((s) => s.uid === e.uid);
|
|
107
|
+
t && (t.percent = n);
|
|
106
108
|
},
|
|
107
|
-
onError: (
|
|
108
|
-
|
|
109
|
-
const
|
|
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
|
-
|
|
114
|
+
t > -1 && o.value.splice(t, 1), g.value--;
|
|
113
115
|
},
|
|
114
|
-
onSuccess: (
|
|
115
|
-
const
|
|
116
|
-
|
|
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:
|
|
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
|
|
127
|
-
e.oss =
|
|
128
|
+
const n = await D(b);
|
|
129
|
+
e.oss = n, o.value.push(e), E({
|
|
128
130
|
file: a,
|
|
129
|
-
dirName:
|
|
130
|
-
oss:
|
|
131
|
-
successCallBack(
|
|
132
|
-
const s =
|
|
133
|
-
s && (s.status = "success", s.path =
|
|
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:
|
|
137
|
+
path: t
|
|
136
138
|
}), g.value--;
|
|
137
139
|
},
|
|
138
|
-
errorCallBack(
|
|
139
|
-
|
|
140
|
-
const s =
|
|
141
|
-
(
|
|
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 &&
|
|
145
|
+
s > -1 && o.value.splice(s, 1), g.value--;
|
|
144
146
|
},
|
|
145
|
-
progressCallBack(
|
|
146
|
-
const s =
|
|
147
|
-
s && (s.percent =
|
|
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 (
|
|
151
|
-
|
|
152
|
-
typeof (
|
|
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
|
|
155
|
-
|
|
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
|
|
159
|
-
var
|
|
160
|
+
function j(e) {
|
|
161
|
+
var n;
|
|
160
162
|
if (e.path) {
|
|
161
163
|
if (Array.isArray(c.value)) {
|
|
162
|
-
const
|
|
164
|
+
const t = _.findIndex(
|
|
163
165
|
(s) => s.uid === e.uid
|
|
164
166
|
);
|
|
165
|
-
|
|
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
|
-
(
|
|
169
|
-
const a =
|
|
170
|
-
(
|
|
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
|
|
174
|
+
return o.value.splice(a, 1), Promise.resolve(!0);
|
|
173
175
|
}
|
|
174
176
|
return (e, a) => (f(), h("div", {
|
|
175
|
-
class:
|
|
176
|
-
[
|
|
177
|
-
[
|
|
177
|
+
class: Q({
|
|
178
|
+
[i(A)()]: !0,
|
|
179
|
+
[i(A)("admin")]: i(O) === "admin"
|
|
178
180
|
})
|
|
179
181
|
}, [
|
|
180
|
-
|
|
182
|
+
p("input", {
|
|
181
183
|
style: { display: "none" },
|
|
182
184
|
type: "file",
|
|
183
185
|
ref_key: "fileRef",
|
|
184
186
|
ref: x,
|
|
185
|
-
accept:
|
|
186
|
-
onChange:
|
|
187
|
-
}, null, 40,
|
|
188
|
-
|
|
189
|
-
(f(!0), h(
|
|
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:
|
|
193
|
+
key: n.uid
|
|
192
194
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
src:
|
|
195
|
+
p("div", pe, [
|
|
196
|
+
p("img", {
|
|
197
|
+
src: n.thumbUrl,
|
|
196
198
|
alt: ""
|
|
197
|
-
}, null, 8,
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
}, null, 8, de),
|
|
200
|
+
Y(p("div", me, [
|
|
201
|
+
p("div", {
|
|
200
202
|
class: "picture-item-close",
|
|
201
|
-
onClick: (
|
|
203
|
+
onClick: (t) => j(n)
|
|
202
204
|
}, [
|
|
203
|
-
C(
|
|
204
|
-
], 8,
|
|
205
|
-
|
|
206
|
-
C(
|
|
207
|
-
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
|
-
])) :
|
|
215
|
+
])) : $("", !0)
|
|
214
216
|
], 512), [
|
|
215
|
-
[
|
|
217
|
+
[Z, n.status === "uploading"]
|
|
216
218
|
])
|
|
217
219
|
])
|
|
218
220
|
]))), 128)),
|
|
219
|
-
|
|
221
|
+
i(l) === void 0 || i(o).length < i(l) ? (f(), h("div", {
|
|
220
222
|
key: 0,
|
|
221
223
|
class: "picture-upload",
|
|
222
|
-
onClick:
|
|
224
|
+
onClick: B
|
|
223
225
|
}, [
|
|
224
|
-
C(
|
|
225
|
-
|
|
226
|
-
])) :
|
|
226
|
+
C(i(ne)),
|
|
227
|
+
p("div", null, U(i(r)("ap.apUpload.update")), 1)
|
|
228
|
+
])) : $("", !0)
|
|
227
229
|
]),
|
|
228
|
-
|
|
229
|
-
|
|
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:
|
|
233
|
+
{ maxSize: i(k) }
|
|
232
234
|
)}`), 1))
|
|
233
235
|
])
|
|
234
236
|
], 2));
|
|
235
237
|
}
|
|
236
238
|
});
|
|
237
239
|
export {
|
|
238
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
2
|
-
import { Tooltip as
|
|
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
|
|
6
|
-
import { useGlobalConfig as
|
|
7
|
-
const
|
|
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(
|
|
37
|
-
const
|
|
38
|
-
color: `${
|
|
39
|
-
} : {}),
|
|
40
|
-
color: `${
|
|
41
|
-
} : {}),
|
|
42
|
-
const e =
|
|
43
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
},
|
|
49
|
-
|
|
72
|
+
}, V = h(() => v.title ? !0 : s.tooltip && l(k)), I = (o) => {
|
|
73
|
+
o && window.open(o, "_blank");
|
|
50
74
|
};
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
}), (
|
|
54
|
-
id:
|
|
55
|
-
class:
|
|
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
|
-
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
110
|
+
V.value ? {
|
|
85
111
|
name: "title",
|
|
86
|
-
fn:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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)) :
|
|
97
|
-
|
|
98
|
-
default:
|
|
99
|
-
(t(!0),
|
|
100
|
-
key:
|
|
101
|
-
class:
|
|
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
|
-
|
|
104
|
-
class:
|
|
105
|
-
style:
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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:
|
|
115
|
-
style:
|
|
116
|
-
}, i(
|
|
117
|
-
|
|
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:
|
|
120
|
-
style:
|
|
121
|
-
}, i(
|
|
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
|
-
|
|
155
|
+
V.value ? {
|
|
127
156
|
name: "title",
|
|
128
|
-
fn:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
(t(!0),
|
|
132
|
-
|
|
133
|
-
|
|
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)) :
|
|
170
|
+
]), 1040)) : f("", !0)
|
|
141
171
|
], 2));
|
|
142
172
|
}
|
|
143
173
|
});
|
|
144
174
|
export {
|
|
145
|
-
|
|
175
|
+
me as default
|
|
146
176
|
};
|