abl-ui 0.2.52 → 0.2.53
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/lib/abl-ui.es.js +111 -110
- package/lib/abl-ui.umd.js +2 -2
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/abl-ui.es.js
CHANGED
|
@@ -163,55 +163,56 @@ const En = { class: "abl-tabs" }, Vn = {
|
|
|
163
163
|
emits: ["tabClick"],
|
|
164
164
|
setup(e, { emit: t }) {
|
|
165
165
|
var v;
|
|
166
|
-
const n = t, o = Ye(), a = e, s = _({}), r = _(), i = _([]), l = _(), d = _(
|
|
166
|
+
const n = t, o = Ye(), a = e, s = _({}), r = _(), i = _([]), l = _(), d = _(0), b = _(!1), f = _(!1), h = _(!0);
|
|
167
167
|
(v = o.default()) == null || v.map(({ props: $ }) => {
|
|
168
168
|
if ($) {
|
|
169
|
-
const { title:
|
|
169
|
+
const { title: L, value: S, icon: C } = $;
|
|
170
170
|
i.value.push({
|
|
171
|
-
title:
|
|
171
|
+
title: L,
|
|
172
172
|
value: S,
|
|
173
173
|
icon: C
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
}), Me("active", d);
|
|
177
|
-
const g = ($,
|
|
177
|
+
const g = ($, L) => {
|
|
178
178
|
const S = document.querySelector("#tab-hidden");
|
|
179
|
-
|
|
179
|
+
L > d.value ? S.scrollLeft += $.target.clientWidth : S.scrollLeft -= $.target.clientWidth, s.value = {
|
|
180
180
|
transform: `translateX(${$.target.offsetLeft}px)`,
|
|
181
181
|
width: $.target.clientWidth + "px"
|
|
182
|
-
}, d.value =
|
|
182
|
+
}, d.value = L, n("tabClick", L);
|
|
183
183
|
}, m = () => {
|
|
184
184
|
const $ = document.querySelector("#tab-hidden");
|
|
185
185
|
if (!$)
|
|
186
186
|
return;
|
|
187
|
-
const
|
|
188
|
-
$.scrollWidth > $.clientWidth + $.scrollLeft && ($.scrollLeft +=
|
|
187
|
+
const L = document.querySelector("#tabs-header-wrap").clientWidth;
|
|
188
|
+
$.scrollWidth > $.clientWidth + $.scrollLeft && ($.scrollLeft += L);
|
|
189
189
|
}, w = () => {
|
|
190
|
-
const $ = document.querySelector("#tab-hidden"),
|
|
191
|
-
$.scrollLeft > 0 && ($.scrollLeft -=
|
|
190
|
+
const $ = document.querySelector("#tab-hidden"), L = document.querySelector("#tabs-header-wrap").clientWidth;
|
|
191
|
+
$.scrollLeft > 0 && ($.scrollLeft -= L);
|
|
192
192
|
};
|
|
193
193
|
xe(() => {
|
|
194
194
|
x();
|
|
195
195
|
});
|
|
196
196
|
const x = () => {
|
|
197
|
-
if (!
|
|
197
|
+
if (!r.value)
|
|
198
198
|
return;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
console.log($), s.value = {
|
|
199
|
+
const $ = r.value[d.value];
|
|
200
|
+
s.value = {
|
|
202
201
|
transform: `translateX(${$.offsetLeft}px)`,
|
|
203
202
|
width: $.clientWidth + "px"
|
|
204
203
|
};
|
|
205
|
-
const
|
|
206
|
-
|
|
204
|
+
const L = document.getElementById("tab-hidden");
|
|
205
|
+
L.scrollWidth > L.clientWidth ? b.value = !0 : b.value = !1, L.addEventListener("scroll", function(S) {
|
|
207
206
|
S.target.scrollLeft + S.target.offsetWidth >= S.target.scrollWidth - 1 && (h.value = !1, f.value = !0), S.target.scrollLeft == 0 && (h.value = !0, f.value = !1);
|
|
208
207
|
});
|
|
209
208
|
};
|
|
210
|
-
return fe(() => a.modelValue, async (
|
|
211
|
-
|
|
209
|
+
return fe(() => a.modelValue, async () => {
|
|
210
|
+
i.value.map(($, L) => {
|
|
211
|
+
$.value == a.modelValue && (d.value = L);
|
|
212
|
+
}), x();
|
|
212
213
|
}, {
|
|
213
214
|
immediate: !0
|
|
214
|
-
}), ($,
|
|
215
|
+
}), ($, L) => {
|
|
215
216
|
var S;
|
|
216
217
|
return u(), p("div", En, [
|
|
217
218
|
c("div", Vn, [
|
|
@@ -259,7 +260,7 @@ const En = { class: "abl-tabs" }, Vn = {
|
|
|
259
260
|
]);
|
|
260
261
|
};
|
|
261
262
|
}
|
|
262
|
-
}, Tn = /* @__PURE__ */ J(On, [["__scopeId", "data-v-
|
|
263
|
+
}, Tn = /* @__PURE__ */ J(On, [["__scopeId", "data-v-2f3a488f"]]), Nn = (e) => (pe("data-v-9ebed9dd"), e = e(), ve(), e), Mn = /* @__PURE__ */ Nn(() => /* @__PURE__ */ c("span", { class: "abl-switch__core" }, null, -1)), Dn = [
|
|
263
264
|
Mn
|
|
264
265
|
], Pn = {
|
|
265
266
|
name: "AblSwitch"
|
|
@@ -1115,7 +1116,7 @@ const No = async (e, t, n) => {
|
|
|
1115
1116
|
fn: v
|
|
1116
1117
|
} = i[w], {
|
|
1117
1118
|
x: $,
|
|
1118
|
-
y:
|
|
1119
|
+
y: L,
|
|
1119
1120
|
data: S,
|
|
1120
1121
|
reset: C
|
|
1121
1122
|
} = await v({
|
|
@@ -1132,7 +1133,7 @@ const No = async (e, t, n) => {
|
|
|
1132
1133
|
floating: t
|
|
1133
1134
|
}
|
|
1134
1135
|
});
|
|
1135
|
-
b = $ ?? b, f =
|
|
1136
|
+
b = $ ?? b, f = L ?? f, g = {
|
|
1136
1137
|
...g,
|
|
1137
1138
|
[x]: {
|
|
1138
1139
|
...g[x],
|
|
@@ -1180,7 +1181,7 @@ async function Dt(e, t) {
|
|
|
1180
1181
|
...r.floating,
|
|
1181
1182
|
x: o,
|
|
1182
1183
|
y: a
|
|
1183
|
-
} : r.reference,
|
|
1184
|
+
} : r.reference, L = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(i.floating)), S = await (s.isElement == null ? void 0 : s.isElement(L)) ? await (s.getScale == null ? void 0 : s.getScale(L)) || {
|
|
1184
1185
|
x: 1,
|
|
1185
1186
|
y: 1
|
|
1186
1187
|
} : {
|
|
@@ -1189,7 +1190,7 @@ async function Dt(e, t) {
|
|
|
1189
1190
|
}, C = Xe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1190
1191
|
elements: i,
|
|
1191
1192
|
rect: $,
|
|
1192
|
-
offsetParent:
|
|
1193
|
+
offsetParent: L,
|
|
1193
1194
|
strategy: l
|
|
1194
1195
|
}) : $);
|
|
1195
1196
|
return {
|
|
@@ -1220,10 +1221,10 @@ const Mo = (e) => ({
|
|
|
1220
1221
|
const f = Mt(b), h = {
|
|
1221
1222
|
x: n,
|
|
1222
1223
|
y: o
|
|
1223
|
-
}, g = pt(a), m = ht(g), w = await r.getDimensions(d), x = g === "y", v = x ? "top" : "left", $ = x ? "bottom" : "right",
|
|
1224
|
-
let
|
|
1225
|
-
(!
|
|
1226
|
-
const M = S / 2 - C / 2, q =
|
|
1224
|
+
}, g = pt(a), m = ht(g), w = await r.getDimensions(d), x = g === "y", v = x ? "top" : "left", $ = x ? "bottom" : "right", L = x ? "clientHeight" : "clientWidth", S = s.reference[m] + s.reference[g] - h[g] - s.floating[m], C = h[g] - s.reference[g], y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(d));
|
|
1225
|
+
let A = y ? y[L] : 0;
|
|
1226
|
+
(!A || !await (r.isElement == null ? void 0 : r.isElement(y))) && (A = i.floating[L] || s.floating[m]);
|
|
1227
|
+
const M = S / 2 - C / 2, q = A / 2 - w[m] / 2 - 1, z = Ve(f[v], q), V = Ve(f[$], q), I = z, W = A - w[m] - V, U = A / 2 - w[m] / 2 + M, X = lt(I, U, W), Z = !l.arrow && We(a) != null && U !== X && s.reference[m] / 2 - (U < I ? z : V) - w[m] / 2 < 0, Q = Z ? U < I ? U - I : U - W : 0;
|
|
1227
1228
|
return {
|
|
1228
1229
|
[g]: h[g] + Q,
|
|
1229
1230
|
data: {
|
|
@@ -1260,18 +1261,18 @@ const Mo = (e) => ({
|
|
|
1260
1261
|
} = He(e, t);
|
|
1261
1262
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
1262
1263
|
return {};
|
|
1263
|
-
const v = Ce(a), $ = Ce(i) === i,
|
|
1264
|
-
!h && m !== "none" && S.push(...Oo(i, w, m,
|
|
1265
|
-
const C = [i, ...S], y = await Dt(t, x),
|
|
1264
|
+
const v = Ce(a), $ = Ce(i) === i, L = await (l.isRTL == null ? void 0 : l.isRTL(d.floating)), S = h || ($ || !w ? [Ue(i)] : Ro(i));
|
|
1265
|
+
!h && m !== "none" && S.push(...Oo(i, w, m, L));
|
|
1266
|
+
const C = [i, ...S], y = await Dt(t, x), A = [];
|
|
1266
1267
|
let M = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
1267
|
-
if (b &&
|
|
1268
|
-
const I = Vo(a, r,
|
|
1269
|
-
|
|
1268
|
+
if (b && A.push(y[v]), f) {
|
|
1269
|
+
const I = Vo(a, r, L);
|
|
1270
|
+
A.push(y[I[0]], y[I[1]]);
|
|
1270
1271
|
}
|
|
1271
1272
|
if (M = [...M, {
|
|
1272
1273
|
placement: a,
|
|
1273
|
-
overflows:
|
|
1274
|
-
}], !
|
|
1274
|
+
overflows: A
|
|
1275
|
+
}], !A.every((I) => I <= 0)) {
|
|
1275
1276
|
var q, z;
|
|
1276
1277
|
const I = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, W = C[I];
|
|
1277
1278
|
if (W)
|
|
@@ -1389,12 +1390,12 @@ const Ho = function(e) {
|
|
|
1389
1390
|
}, b = await Dt(t, l), f = Ze(Ce(a)), h = Nt(f);
|
|
1390
1391
|
let g = d[h], m = d[f];
|
|
1391
1392
|
if (s) {
|
|
1392
|
-
const x = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", $ = g + b[x],
|
|
1393
|
-
g = lt($, g,
|
|
1393
|
+
const x = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", $ = g + b[x], L = g - b[v];
|
|
1394
|
+
g = lt($, g, L);
|
|
1394
1395
|
}
|
|
1395
1396
|
if (r) {
|
|
1396
|
-
const x = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", $ = m + b[x],
|
|
1397
|
-
m = lt($, m,
|
|
1397
|
+
const x = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", $ = m + b[x], L = m - b[v];
|
|
1398
|
+
m = lt($, m, L);
|
|
1398
1399
|
}
|
|
1399
1400
|
const w = i.fn({
|
|
1400
1401
|
...t,
|
|
@@ -1549,8 +1550,8 @@ function Le(e, t, n, o) {
|
|
|
1549
1550
|
const h = se(s), g = o && ge(o) ? se(o) : o;
|
|
1550
1551
|
let m = h, w = m.frameElement;
|
|
1551
1552
|
for (; w && o && g !== m; ) {
|
|
1552
|
-
const x = ze(w), v = w.getBoundingClientRect(), $ = de(w),
|
|
1553
|
-
l *= x.x, d *= x.y, b *= x.x, f *= x.y, l +=
|
|
1553
|
+
const x = ze(w), v = w.getBoundingClientRect(), $ = de(w), L = v.left + (w.clientLeft + parseFloat($.paddingLeft)) * x.x, S = v.top + (w.clientTop + parseFloat($.paddingTop)) * x.y;
|
|
1554
|
+
l *= x.x, d *= x.y, b *= x.x, f *= x.y, l += L, d += S, m = se(w), w = m.frameElement;
|
|
1554
1555
|
}
|
|
1555
1556
|
}
|
|
1556
1557
|
return Xe({
|
|
@@ -1780,17 +1781,17 @@ function la(e, t) {
|
|
|
1780
1781
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -x + "px",
|
|
1781
1782
|
threshold: Se(0, Ve(1, l)) || 1
|
|
1782
1783
|
};
|
|
1783
|
-
let
|
|
1784
|
+
let L = !0;
|
|
1784
1785
|
function S(C) {
|
|
1785
1786
|
const y = C[0].intersectionRatio;
|
|
1786
1787
|
if (y !== l) {
|
|
1787
|
-
if (!
|
|
1788
|
+
if (!L)
|
|
1788
1789
|
return r();
|
|
1789
1790
|
y ? r(!1, y) : o = setTimeout(() => {
|
|
1790
1791
|
r(!1, 1e-7);
|
|
1791
1792
|
}, 100);
|
|
1792
1793
|
}
|
|
1793
|
-
|
|
1794
|
+
L = !1;
|
|
1794
1795
|
}
|
|
1795
1796
|
try {
|
|
1796
1797
|
n = new IntersectionObserver(S, {
|
|
@@ -1824,8 +1825,8 @@ function ia(e, t, n, o) {
|
|
|
1824
1825
|
r && (g = new ResizeObserver((v) => {
|
|
1825
1826
|
let [$] = v;
|
|
1826
1827
|
$ && $.target === d && g && (g.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1827
|
-
var
|
|
1828
|
-
(
|
|
1828
|
+
var L;
|
|
1829
|
+
(L = g) == null || L.observe(t);
|
|
1829
1830
|
})), n();
|
|
1830
1831
|
}), d && !l && g.observe(d), g.observe(t));
|
|
1831
1832
|
let m, w = l ? Le(e) : null;
|
|
@@ -1972,7 +1973,7 @@ const ha = ["data-side"], Yt = {
|
|
|
1972
1973
|
y: x,
|
|
1973
1974
|
contentRef: v,
|
|
1974
1975
|
middlewareData: $
|
|
1975
|
-
} = ua({ middleware: a, placement: s, strategy: r }, h),
|
|
1976
|
+
} = ua({ middleware: a, placement: s, strategy: r }, h), L = N(() => s.value.split("-")[0]), S = N(() => ({ left: w.value + "px", top: x.value + "px" })), C = N(() => {
|
|
1976
1977
|
if (!n.showArrow)
|
|
1977
1978
|
return {};
|
|
1978
1979
|
const { arrow: y } = ne($);
|
|
@@ -1984,7 +1985,7 @@ const ha = ["data-side"], Yt = {
|
|
|
1984
1985
|
return t({
|
|
1985
1986
|
open: d,
|
|
1986
1987
|
close: b
|
|
1987
|
-
}), (y,
|
|
1988
|
+
}), (y, A) => (u(), p(j, null, [
|
|
1988
1989
|
(u(), le(ln(y.$slots.default), Ee({ ref: f.value }, y.$attrs), null, 16)),
|
|
1989
1990
|
(u(), le(Ge, { to: "body" }, [
|
|
1990
1991
|
oe(ce, { name: e.transitionName }, {
|
|
@@ -1995,8 +1996,8 @@ const ha = ["data-side"], Yt = {
|
|
|
1995
1996
|
ref: v,
|
|
1996
1997
|
class: B(["abl-popper", `is-${e.effect}`, e.popperClass]),
|
|
1997
1998
|
style: O(S.value),
|
|
1998
|
-
"data-side":
|
|
1999
|
-
onMousedown:
|
|
1999
|
+
"data-side": L.value,
|
|
2000
|
+
onMousedown: A[0] || (A[0] = H(() => {
|
|
2000
2001
|
}, ["stop"]))
|
|
2001
2002
|
}, [
|
|
2002
2003
|
R(y.$slots, "content", {}, () => [
|
|
@@ -2694,7 +2695,7 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2694
2695
|
r.value = (r.value - 1 + a.value) % a.value;
|
|
2695
2696
|
}, $ = () => {
|
|
2696
2697
|
i.value + o.zoomRate > o.maxScale ? i.value = o.maxScale : i.value = m(i.value, o.zoomRate);
|
|
2697
|
-
},
|
|
2698
|
+
}, L = () => {
|
|
2698
2699
|
i.value - o.zoomRate < o.minScale ? i.value = o.minScale : i.value = m(i.value, -o.zoomRate);
|
|
2699
2700
|
}, S = () => {
|
|
2700
2701
|
h.value -= 90;
|
|
@@ -2702,7 +2703,7 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2702
2703
|
h.value += 90;
|
|
2703
2704
|
}, y = () => {
|
|
2704
2705
|
h.value = 0, i.value = 1, b.value = 0, f.value = 0;
|
|
2705
|
-
},
|
|
2706
|
+
}, A = (z) => {
|
|
2706
2707
|
console.log("e====", z);
|
|
2707
2708
|
const V = z.target, { top: I, left: W, right: U, bottom: X } = V.getBoundingClientRect(), Z = document.documentElement.clientWidth, Q = document.documentElement.clientHeight;
|
|
2708
2709
|
l.value = z.clientX, d.value = z.clientY;
|
|
@@ -2755,7 +2756,7 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2755
2756
|
class: "abl-image-preview__img",
|
|
2756
2757
|
style: O(`transform: scale3d(${i.value}, ${i.value}, 1) rotate(${h.value}deg);`),
|
|
2757
2758
|
onLoad: (U) => w(W),
|
|
2758
|
-
onMousedown: V[0] || (V[0] = H((U) =>
|
|
2759
|
+
onMousedown: V[0] || (V[0] = H((U) => A(U), ["prevent"])),
|
|
2759
2760
|
onClick: V[1] || (V[1] = H(() => {
|
|
2760
2761
|
}, ["stop"]))
|
|
2761
2762
|
}, null, 44, Ja),
|
|
@@ -2785,7 +2786,7 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2785
2786
|
c("div", is, [
|
|
2786
2787
|
c("i", {
|
|
2787
2788
|
class: "abl-icon",
|
|
2788
|
-
onClick: H(
|
|
2789
|
+
onClick: H(L, ["stop"])
|
|
2789
2790
|
}, cs),
|
|
2790
2791
|
c("i", {
|
|
2791
2792
|
class: "abl-icon",
|
|
@@ -3903,9 +3904,9 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3903
3904
|
var C;
|
|
3904
3905
|
const n = t, o = Ye(), a = typeof window < "u" && typeof document < "u", s = e, r = _([]);
|
|
3905
3906
|
(C = o.default()) == null || C.forEach((y) => {
|
|
3906
|
-
const { props:
|
|
3907
|
-
if (
|
|
3908
|
-
const { title: M, disabled: q } =
|
|
3907
|
+
const { props: A } = y;
|
|
3908
|
+
if (A) {
|
|
3909
|
+
const { title: M, disabled: q } = A;
|
|
3909
3910
|
r.value.push({
|
|
3910
3911
|
title: M,
|
|
3911
3912
|
disabled: q
|
|
@@ -3923,18 +3924,18 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3923
3924
|
immediate: !0
|
|
3924
3925
|
}
|
|
3925
3926
|
);
|
|
3926
|
-
const m = (y,
|
|
3927
|
-
if (!r.value[
|
|
3928
|
-
if (
|
|
3927
|
+
const m = (y, A) => {
|
|
3928
|
+
if (!r.value[A].disabled) {
|
|
3929
|
+
if (A === f.value && s.closeOnClickSelf) {
|
|
3929
3930
|
x(), setTimeout(() => {
|
|
3930
|
-
l.value.children[
|
|
3931
|
+
l.value.children[A].style.display = "none";
|
|
3931
3932
|
}, s.duration);
|
|
3932
3933
|
return;
|
|
3933
3934
|
}
|
|
3934
|
-
h.value = !0, w(
|
|
3935
|
+
h.value = !0, w(A);
|
|
3935
3936
|
}
|
|
3936
3937
|
}, w = async (y) => {
|
|
3937
|
-
await v(), d.value = !0, f.value = y, Array.from(l.value.children).map((
|
|
3938
|
+
await v(), d.value = !0, f.value = y, Array.from(l.value.children).map((A, M) => {
|
|
3938
3939
|
M === y ? l.value.children[M].style.display = "block" : l.value.children[M].style.display = "none";
|
|
3939
3940
|
}), n("open", f.value);
|
|
3940
3941
|
}, x = () => {
|
|
@@ -3945,20 +3946,20 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3945
3946
|
var M;
|
|
3946
3947
|
if (!a)
|
|
3947
3948
|
return;
|
|
3948
|
-
const { top: y, bottom:
|
|
3949
|
-
|
|
3949
|
+
const { top: y, bottom: A } = (M = i == null ? void 0 : i.value) == null ? void 0 : M.getBoundingClientRect();
|
|
3950
|
+
A > 0 && (b.value = A - 1);
|
|
3950
3951
|
}, $ = () => {
|
|
3951
3952
|
s.closeOnClickMask && x();
|
|
3952
|
-
},
|
|
3953
|
+
}, L = ke({
|
|
3953
3954
|
...De(s),
|
|
3954
3955
|
onClose: x,
|
|
3955
3956
|
current: f
|
|
3956
3957
|
}), S = qs(() => {
|
|
3957
3958
|
h.value && x();
|
|
3958
3959
|
});
|
|
3959
|
-
return Me(Zs,
|
|
3960
|
+
return Me(Zs, L), xe(() => {
|
|
3960
3961
|
v();
|
|
3961
|
-
}), (y,
|
|
3962
|
+
}), (y, A) => (u(), p("div", {
|
|
3962
3963
|
class: "abl-dropdown",
|
|
3963
3964
|
ref_key: "root",
|
|
3964
3965
|
ref: S
|
|
@@ -4000,7 +4001,7 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
4000
4001
|
}
|
|
4001
4002
|
]),
|
|
4002
4003
|
onClick: $,
|
|
4003
|
-
onTouchmove:
|
|
4004
|
+
onTouchmove: A[1] || (A[1] = H(() => {
|
|
4004
4005
|
}, ["prevent"]))
|
|
4005
4006
|
}, [
|
|
4006
4007
|
oe(ce, { name: "fade-mask" }, {
|
|
@@ -4014,7 +4015,7 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
4014
4015
|
oe(ce, { name: "slide-top" }, {
|
|
4015
4016
|
default: te(() => [
|
|
4016
4017
|
F(c("div", {
|
|
4017
|
-
onTouchmove:
|
|
4018
|
+
onTouchmove: A[0] || (A[0] = H(() => {
|
|
4018
4019
|
}, ["prevent"])),
|
|
4019
4020
|
class: "abl-dropdown__content",
|
|
4020
4021
|
ref_key: "childrenRef",
|
|
@@ -4237,7 +4238,7 @@ const pl = {
|
|
|
4237
4238
|
F(c("input", Ee({
|
|
4238
4239
|
ref_key: "inputRef",
|
|
4239
4240
|
ref: s,
|
|
4240
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
|
4241
|
+
"onUpdate:modelValue": $[0] || ($[0] = (L) => b.value = L),
|
|
4241
4242
|
class: "abl-input__inner",
|
|
4242
4243
|
type: l.value,
|
|
4243
4244
|
placeholder: e.placeholder,
|
|
@@ -4428,8 +4429,8 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4428
4429
|
const C = /\.(jpg|jpeg|png|gif|webp)$/i, y = /^data:image/;
|
|
4429
4430
|
return C.test(S) || y.test(S);
|
|
4430
4431
|
}, b = (S, C) => {
|
|
4431
|
-
var
|
|
4432
|
-
const y = (
|
|
4432
|
+
var A;
|
|
4433
|
+
const y = (A = S.dataTransfer) == null ? void 0 : A.files;
|
|
4433
4434
|
if (y != null && y.length) {
|
|
4434
4435
|
const M = y.length;
|
|
4435
4436
|
for (let q = 0; q < M && C + q <= n.maxCount; q++)
|
|
@@ -4441,45 +4442,45 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4441
4442
|
}, h = (S, C) => {
|
|
4442
4443
|
const y = S.target.files;
|
|
4443
4444
|
if (y != null && y.length) {
|
|
4444
|
-
const
|
|
4445
|
-
for (let M = 0; M <
|
|
4445
|
+
const A = y.length;
|
|
4446
|
+
for (let M = 0; M < A && C + M < n.maxCount; M++)
|
|
4446
4447
|
m(y[M], C + M);
|
|
4447
4448
|
r.value[C].value = "";
|
|
4448
4449
|
}
|
|
4449
4450
|
}, g = t, m = function(S, C) {
|
|
4450
4451
|
n.beforeUpload(S) ? (n.maxCount > a.value && a.value++, n.uploadMode === "base64" && (s.value[C] = !0, w(S, C)), n.uploadMode === "custom" && (s.value[C] = !0, x(S, C))) : me(() => {
|
|
4451
|
-
|
|
4452
|
+
L(n.errorInfo);
|
|
4452
4453
|
});
|
|
4453
4454
|
}, w = (S, C) => {
|
|
4454
4455
|
var y = new FileReader();
|
|
4455
|
-
y.readAsDataURL(S), y.onloadstart = function(
|
|
4456
|
-
console.log("开始读取 onloadstart:",
|
|
4457
|
-
}, y.onabort = function(
|
|
4458
|
-
console.log("读取中止 onabort:",
|
|
4459
|
-
}, y.onerror = function(
|
|
4460
|
-
console.log("读取错误 onerror:",
|
|
4461
|
-
}, y.onprogress = function(
|
|
4462
|
-
|
|
4463
|
-
}, y.onload = function(
|
|
4456
|
+
y.readAsDataURL(S), y.onloadstart = function(A) {
|
|
4457
|
+
console.log("开始读取 onloadstart:", A);
|
|
4458
|
+
}, y.onabort = function(A) {
|
|
4459
|
+
console.log("读取中止 onabort:", A);
|
|
4460
|
+
}, y.onerror = function(A) {
|
|
4461
|
+
console.log("读取错误 onerror:", A);
|
|
4462
|
+
}, y.onprogress = function(A) {
|
|
4463
|
+
A.loaded === A.total && (s.value[C] = !1);
|
|
4464
|
+
}, y.onload = function(A) {
|
|
4464
4465
|
var M;
|
|
4465
4466
|
o.value.push({
|
|
4466
4467
|
name: S.name,
|
|
4467
|
-
url: (M =
|
|
4468
|
+
url: (M = A.target) == null ? void 0 : M.result
|
|
4468
4469
|
}), g("update:fileList", o.value), g("change", o.value);
|
|
4469
|
-
}, y.onloadend = function(
|
|
4470
|
-
console.log("读取结束 onloadend:",
|
|
4470
|
+
}, y.onloadend = function(A) {
|
|
4471
|
+
console.log("读取结束 onloadend:", A);
|
|
4471
4472
|
};
|
|
4472
4473
|
}, x = (S, C) => {
|
|
4473
4474
|
n.customRequest(S).then((y) => {
|
|
4474
4475
|
o.value.push(y), g("update:fileList", o.value), g("change", o.value);
|
|
4475
4476
|
}).catch((y) => {
|
|
4476
|
-
n.maxCount > 1 && (a.value = o.value.length + 1),
|
|
4477
|
+
n.maxCount > 1 && (a.value = o.value.length + 1), L(y);
|
|
4477
4478
|
}).finally(() => {
|
|
4478
4479
|
s.value[C] = !1;
|
|
4479
4480
|
});
|
|
4480
4481
|
}, v = (S, C) => {
|
|
4481
4482
|
if (d(C)) {
|
|
4482
|
-
const y = o.value.slice(0, S).filter((
|
|
4483
|
+
const y = o.value.slice(0, S).filter((A) => !d(A.url));
|
|
4483
4484
|
i.value[S - y.length].onPreview();
|
|
4484
4485
|
} else
|
|
4485
4486
|
window.open(C);
|
|
@@ -4487,7 +4488,7 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4487
4488
|
o.value.length < n.maxCount && a.value--;
|
|
4488
4489
|
const C = o.value.splice(S, 1);
|
|
4489
4490
|
g("remove", C), g("update:fileList", o.value), g("change", o.value);
|
|
4490
|
-
},
|
|
4491
|
+
}, L = (S) => {
|
|
4491
4492
|
ft({ type: "error", text: S, duration: 1e3, top: 100 });
|
|
4492
4493
|
};
|
|
4493
4494
|
return (S, C) => (u(), p("div", Rl, [
|
|
@@ -4502,8 +4503,8 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4502
4503
|
}, ["stop", "prevent"])),
|
|
4503
4504
|
onDragover: C[2] || (C[2] = H(() => {
|
|
4504
4505
|
}, ["stop", "prevent"])),
|
|
4505
|
-
onDrop: H((
|
|
4506
|
-
onClick: (
|
|
4506
|
+
onDrop: H((A) => e.disabled ? () => !1 : b(A, y - 1), ["stop", "prevent"]),
|
|
4507
|
+
onClick: (A) => e.disabled ? () => !1 : f(y - 1)
|
|
4507
4508
|
}, [
|
|
4508
4509
|
c("input", {
|
|
4509
4510
|
ref_for: !0,
|
|
@@ -4514,7 +4515,7 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4514
4515
|
}, ["stop"])),
|
|
4515
4516
|
accept: e.accept,
|
|
4516
4517
|
multiple: e.multiple,
|
|
4517
|
-
onChange: (
|
|
4518
|
+
onChange: (A) => h(A, y - 1),
|
|
4518
4519
|
style: { display: "none" }
|
|
4519
4520
|
}, null, 40, Tl),
|
|
4520
4521
|
c("div", null, [
|
|
@@ -4554,12 +4555,12 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4554
4555
|
c("a", {
|
|
4555
4556
|
class: "m-icon",
|
|
4556
4557
|
title: "preview",
|
|
4557
|
-
onClick: (
|
|
4558
|
+
onClick: (A) => v(y - 1, o.value[y - 1].url)
|
|
4558
4559
|
}, jl, 8, Wl),
|
|
4559
4560
|
F(c("a", {
|
|
4560
4561
|
class: "m-icon",
|
|
4561
4562
|
title: "delete",
|
|
4562
|
-
onClick: H((
|
|
4563
|
+
onClick: H((A) => $(y - 1), ["prevent", "stop"])
|
|
4563
4564
|
}, Xl, 8, ql), [
|
|
4564
4565
|
[G, !e.disabled]
|
|
4565
4566
|
])
|
|
@@ -4653,7 +4654,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4653
4654
|
const V = n.options.filter((I) => I.name.includes(z.target.value));
|
|
4654
4655
|
f.list = V;
|
|
4655
4656
|
}
|
|
4656
|
-
},
|
|
4657
|
+
}, L = (z) => {
|
|
4657
4658
|
n.disabled || (h.value = !0, z.stopPropagation(), l.value === "focus" ? l.value = "blur" : l.value = "focus");
|
|
4658
4659
|
}, S = (z, V) => {
|
|
4659
4660
|
var W;
|
|
@@ -4679,7 +4680,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4679
4680
|
(I = i.value) == null || I.focus();
|
|
4680
4681
|
const V = v.findIndex((W) => W.value === z.value);
|
|
4681
4682
|
v.splice(V, 1), o("changeSelect", ot(v));
|
|
4682
|
-
},
|
|
4683
|
+
}, A = () => {
|
|
4683
4684
|
l.value = "blur";
|
|
4684
4685
|
}, M = () => {
|
|
4685
4686
|
n.type == "single" ? (o("update:modelValue", ""), o("changeSelect", "")) : (o("update:modelValue", []), o("changeSelect", [])), v.splice(0, v.length);
|
|
@@ -4725,7 +4726,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4725
4726
|
]),
|
|
4726
4727
|
default: te(() => [
|
|
4727
4728
|
c("div", {
|
|
4728
|
-
onClick:
|
|
4729
|
+
onClick: L,
|
|
4729
4730
|
id: "select-input-warpper",
|
|
4730
4731
|
class: B(["abl-select-warpper", m.value ? "abl-select-warpper-disabled" : ""]),
|
|
4731
4732
|
onKeydown: It(C, ["delete"])
|
|
@@ -4749,7 +4750,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4749
4750
|
[G, v.length && !g.value]
|
|
4750
4751
|
]),
|
|
4751
4752
|
F(c("input", {
|
|
4752
|
-
onBlur: V[0] || (V[0] = (I) =>
|
|
4753
|
+
onBlur: V[0] || (V[0] = (I) => A()),
|
|
4753
4754
|
type: "text",
|
|
4754
4755
|
class: B(["abl-select-input-focus", g.value ? "abl-select-input-search" : ""]),
|
|
4755
4756
|
ref_key: "inputFocus",
|
|
@@ -4858,16 +4859,16 @@ const ci = { class: "abl-header" }, di = { class: "abl-title" }, ui = { class: "
|
|
|
4858
4859
|
t.bordered ? me(() => {
|
|
4859
4860
|
i.value.forEach((x, v) => {
|
|
4860
4861
|
x.forEach(($) => {
|
|
4861
|
-
const
|
|
4862
|
+
const L = Array.from($.element.children), S = L[0].cloneNode(!0);
|
|
4862
4863
|
S.colSpan = 1, f(S, t.labelStyle), f(S, JSON.parse($.element.dataset.labelStyle));
|
|
4863
|
-
const C =
|
|
4864
|
+
const C = L[1].cloneNode(!0);
|
|
4864
4865
|
C.colSpan = $.span * 2 - 1, f(C, t.contentStyle), f(C, JSON.parse($.element.dataset.contentStyle)), r.value[v].appendChild(S), r.value[v].appendChild(C);
|
|
4865
4866
|
});
|
|
4866
4867
|
});
|
|
4867
4868
|
}) : me(() => {
|
|
4868
4869
|
h.forEach((x, v) => {
|
|
4869
|
-
const $ = Array.from(x.children),
|
|
4870
|
-
f(
|
|
4870
|
+
const $ = Array.from(x.children), L = $[0];
|
|
4871
|
+
f(L, t.labelStyle), f(L, JSON.parse(x.dataset.labelStyle));
|
|
4871
4872
|
const S = $[1];
|
|
4872
4873
|
f(S, t.contentStyle), f(S, JSON.parse(x.dataset.contentStyle)), s.value[v].appendChild(x);
|
|
4873
4874
|
});
|
|
@@ -5142,17 +5143,17 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5142
5143
|
})), x = _(!1), v = (k) => !!n.range && Array.isArray(k), $ = () => {
|
|
5143
5144
|
const { modelValue: k, min: P } = n;
|
|
5144
5145
|
return v(k) ? `${(k[1] - k[0]) * 100 / f.value}%` : `${(k - Number(P)) * 100 / f.value}%`;
|
|
5145
|
-
},
|
|
5146
|
+
}, L = () => {
|
|
5146
5147
|
const { modelValue: k, min: P } = n;
|
|
5147
5148
|
return v(k) ? `${(k[0] - Number(P)) * 100 / f.value}%` : "0%";
|
|
5148
5149
|
}, S = N(() => n.vertical ? {
|
|
5149
5150
|
height: $(),
|
|
5150
|
-
top:
|
|
5151
|
+
top: L(),
|
|
5151
5152
|
background: n.activeColor,
|
|
5152
5153
|
transition: l.value ? "none" : void 0
|
|
5153
5154
|
} : {
|
|
5154
5155
|
width: $(),
|
|
5155
|
-
left:
|
|
5156
|
+
left: L(),
|
|
5156
5157
|
background: n.activeColor,
|
|
5157
5158
|
transition: l.value ? "none" : void 0
|
|
5158
5159
|
}), C = (k) => {
|
|
@@ -5176,7 +5177,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5176
5177
|
return D && (K = {
|
|
5177
5178
|
top: `${(k - Number(P)) / f.value * 100}%`
|
|
5178
5179
|
}), K;
|
|
5179
|
-
},
|
|
5180
|
+
}, A = (k) => {
|
|
5180
5181
|
const { modelValue: P, max: D, min: K } = n;
|
|
5181
5182
|
let re = Number(K), ae = Number(D);
|
|
5182
5183
|
if (n.range) {
|
|
@@ -5245,7 +5246,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5245
5246
|
Y(T(D) + " ", 1),
|
|
5246
5247
|
c("span", {
|
|
5247
5248
|
class: "abl-range-tick",
|
|
5248
|
-
style: O(
|
|
5249
|
+
style: O(A(D))
|
|
5249
5250
|
}, null, 4)
|
|
5250
5251
|
], 6))), 128))
|
|
5251
5252
|
])) : E("", !0),
|