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