abl-ui 0.2.52 → 0.2.54
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 +206 -203
- 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,56 +163,59 @@ 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 = _(
|
|
167
|
-
(v = o.default()) == null || v.map(({ props:
|
|
168
|
-
if (
|
|
169
|
-
const { title: A, value:
|
|
166
|
+
const n = t, o = Ye(), a = e, s = _({}), r = _(), i = _([]), l = _(), d = _(0), b = _(!1), f = _(!1), h = _(!0);
|
|
167
|
+
(v = o.default()) == null || v.map(({ props: k }) => {
|
|
168
|
+
if (k) {
|
|
169
|
+
const { title: A, value: C, icon: $ } = k;
|
|
170
170
|
i.value.push({
|
|
171
171
|
title: A,
|
|
172
|
-
value:
|
|
173
|
-
icon:
|
|
172
|
+
value: C,
|
|
173
|
+
icon: $
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
}), Me("active", d);
|
|
177
|
-
const g = (
|
|
178
|
-
const
|
|
179
|
-
A > d.value ?
|
|
180
|
-
transform: `translateX(${
|
|
181
|
-
width:
|
|
177
|
+
const g = (k, A) => {
|
|
178
|
+
const C = document.querySelector("#tab-hidden");
|
|
179
|
+
A > d.value ? C.scrollLeft += k.target.clientWidth : C.scrollLeft -= k.target.clientWidth, s.value = {
|
|
180
|
+
transform: `translateX(${k.target.offsetLeft}px)`,
|
|
181
|
+
width: k.target.clientWidth + "px"
|
|
182
182
|
}, d.value = A, n("tabClick", A);
|
|
183
183
|
}, m = () => {
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
184
|
+
const k = document.querySelector("#tab-hidden");
|
|
185
|
+
if (!k)
|
|
186
186
|
return;
|
|
187
187
|
const A = document.querySelector("#tabs-header-wrap").clientWidth;
|
|
188
|
-
|
|
188
|
+
k.scrollWidth > k.clientWidth + k.scrollLeft && (k.scrollLeft += A);
|
|
189
189
|
}, w = () => {
|
|
190
|
-
const
|
|
191
|
-
|
|
190
|
+
const k = document.querySelector("#tab-hidden"), A = document.querySelector("#tabs-header-wrap").clientWidth;
|
|
191
|
+
k.scrollLeft > 0 && (k.scrollLeft -= A);
|
|
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
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
let k = 0;
|
|
200
|
+
i.value.map(($, y) => {
|
|
201
|
+
$.value == a.modelValue && (k = y);
|
|
202
|
+
});
|
|
203
|
+
const A = r.value[k];
|
|
204
|
+
s.value = {
|
|
205
|
+
transform: `translateX(${A.offsetLeft}px)`,
|
|
206
|
+
width: A.clientWidth + "px"
|
|
204
207
|
};
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
const C = document.getElementById("tab-hidden");
|
|
209
|
+
C.scrollWidth > C.clientWidth ? b.value = !0 : b.value = !1, C.addEventListener("scroll", function($) {
|
|
210
|
+
$.target.scrollLeft + $.target.offsetWidth >= $.target.scrollWidth - 1 && (h.value = !1, f.value = !0), $.target.scrollLeft == 0 && (h.value = !0, f.value = !1);
|
|
208
211
|
});
|
|
209
212
|
};
|
|
210
|
-
return fe(() => a.modelValue, async (
|
|
211
|
-
|
|
213
|
+
return fe(() => a.modelValue, async () => {
|
|
214
|
+
d.value = a.modelValue, x();
|
|
212
215
|
}, {
|
|
213
216
|
immediate: !0
|
|
214
|
-
}), (
|
|
215
|
-
var
|
|
217
|
+
}), (k, A) => {
|
|
218
|
+
var C;
|
|
216
219
|
return u(), p("div", En, [
|
|
217
220
|
c("div", Vn, [
|
|
218
221
|
F(c("i", {
|
|
@@ -222,21 +225,21 @@ const En = { class: "abl-tabs" }, Vn = {
|
|
|
222
225
|
[G, b.value]
|
|
223
226
|
]),
|
|
224
227
|
c("header", Rn, [
|
|
225
|
-
(u(!0), p(j, null, ee(i.value, (
|
|
226
|
-
key:
|
|
228
|
+
(u(!0), p(j, null, ee(i.value, ($) => (u(), p("div", {
|
|
229
|
+
key: $.title,
|
|
227
230
|
ref_for: !0,
|
|
228
231
|
ref_key: "tabs",
|
|
229
232
|
ref: r,
|
|
230
233
|
class: B("header-btn"),
|
|
231
|
-
onClick: (y) => g(y,
|
|
234
|
+
onClick: (y) => g(y, $.value)
|
|
232
235
|
}, [
|
|
233
|
-
|
|
236
|
+
$.icon ? (u(), p("i", {
|
|
234
237
|
key: 0,
|
|
235
|
-
class: B(["iconfont-abl tab-icon",
|
|
238
|
+
class: B(["iconfont-abl tab-icon", $.icon])
|
|
236
239
|
}, null, 2)) : E("", !0),
|
|
237
|
-
Y(T(
|
|
240
|
+
Y(T($.title), 1)
|
|
238
241
|
], 8, In))), 128)),
|
|
239
|
-
(
|
|
242
|
+
(C = s.value) != null && C.width ? (u(), p("div", {
|
|
240
243
|
key: 0,
|
|
241
244
|
class: "bottom-line",
|
|
242
245
|
style: O(s.value)
|
|
@@ -254,12 +257,12 @@ const En = { class: "abl-tabs" }, Vn = {
|
|
|
254
257
|
ref: l,
|
|
255
258
|
class: "tab-content"
|
|
256
259
|
}, [
|
|
257
|
-
R(
|
|
260
|
+
R(k.$slots, "default", {}, void 0, !0)
|
|
258
261
|
], 512)
|
|
259
262
|
]);
|
|
260
263
|
};
|
|
261
264
|
}
|
|
262
|
-
}, Tn = /* @__PURE__ */ J(On, [["__scopeId", "data-v-
|
|
265
|
+
}, Tn = /* @__PURE__ */ J(On, [["__scopeId", "data-v-c4e5d168"]]), Nn = (e) => (pe("data-v-9ebed9dd"), e = e(), ve(), e), Mn = /* @__PURE__ */ Nn(() => /* @__PURE__ */ c("span", { class: "abl-switch__core" }, null, -1)), Dn = [
|
|
263
266
|
Mn
|
|
264
267
|
], Pn = {
|
|
265
268
|
name: "AblSwitch"
|
|
@@ -1114,10 +1117,10 @@ const No = async (e, t, n) => {
|
|
|
1114
1117
|
name: x,
|
|
1115
1118
|
fn: v
|
|
1116
1119
|
} = i[w], {
|
|
1117
|
-
x:
|
|
1120
|
+
x: k,
|
|
1118
1121
|
y: A,
|
|
1119
|
-
data:
|
|
1120
|
-
reset:
|
|
1122
|
+
data: C,
|
|
1123
|
+
reset: $
|
|
1121
1124
|
} = await v({
|
|
1122
1125
|
x: b,
|
|
1123
1126
|
y: f,
|
|
@@ -1132,17 +1135,17 @@ const No = async (e, t, n) => {
|
|
|
1132
1135
|
floating: t
|
|
1133
1136
|
}
|
|
1134
1137
|
});
|
|
1135
|
-
b =
|
|
1138
|
+
b = k ?? b, f = A ?? f, g = {
|
|
1136
1139
|
...g,
|
|
1137
1140
|
[x]: {
|
|
1138
1141
|
...g[x],
|
|
1139
|
-
...
|
|
1142
|
+
...C
|
|
1140
1143
|
}
|
|
1141
|
-
},
|
|
1144
|
+
}, $ && m <= 50 && (m++, typeof $ == "object" && ($.placement && (h = $.placement), $.rects && (d = $.rects === !0 ? await r.getElementRects({
|
|
1142
1145
|
reference: e,
|
|
1143
1146
|
floating: t,
|
|
1144
1147
|
strategy: a
|
|
1145
|
-
}) :
|
|
1148
|
+
}) : $.rects), {
|
|
1146
1149
|
x: b,
|
|
1147
1150
|
y: f
|
|
1148
1151
|
} = _t(d, h, l)), w = -1);
|
|
@@ -1176,27 +1179,27 @@ async function Dt(e, t) {
|
|
|
1176
1179
|
boundary: d,
|
|
1177
1180
|
rootBoundary: b,
|
|
1178
1181
|
strategy: l
|
|
1179
|
-
})),
|
|
1182
|
+
})), k = f === "floating" ? {
|
|
1180
1183
|
...r.floating,
|
|
1181
1184
|
x: o,
|
|
1182
1185
|
y: a
|
|
1183
|
-
} : r.reference, A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(i.floating)),
|
|
1186
|
+
} : r.reference, A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(i.floating)), C = await (s.isElement == null ? void 0 : s.isElement(A)) ? await (s.getScale == null ? void 0 : s.getScale(A)) || {
|
|
1184
1187
|
x: 1,
|
|
1185
1188
|
y: 1
|
|
1186
1189
|
} : {
|
|
1187
1190
|
x: 1,
|
|
1188
1191
|
y: 1
|
|
1189
|
-
},
|
|
1192
|
+
}, $ = Xe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1190
1193
|
elements: i,
|
|
1191
|
-
rect:
|
|
1194
|
+
rect: k,
|
|
1192
1195
|
offsetParent: A,
|
|
1193
1196
|
strategy: l
|
|
1194
|
-
}) :
|
|
1197
|
+
}) : k);
|
|
1195
1198
|
return {
|
|
1196
|
-
top: (v.top -
|
|
1197
|
-
bottom: (
|
|
1198
|
-
left: (v.left -
|
|
1199
|
-
right: (
|
|
1199
|
+
top: (v.top - $.top + m.top) / C.y,
|
|
1200
|
+
bottom: ($.bottom - v.bottom + m.bottom) / C.y,
|
|
1201
|
+
left: (v.left - $.left + m.left) / C.x,
|
|
1202
|
+
right: ($.right - v.right + m.right) / C.x
|
|
1200
1203
|
};
|
|
1201
1204
|
}
|
|
1202
1205
|
const Mo = (e) => ({
|
|
@@ -1220,10 +1223,10 @@ const Mo = (e) => ({
|
|
|
1220
1223
|
const f = Mt(b), h = {
|
|
1221
1224
|
x: n,
|
|
1222
1225
|
y: o
|
|
1223
|
-
}, g = pt(a), m = ht(g), w = await r.getDimensions(d), x = g === "y", v = x ? "top" : "left",
|
|
1226
|
+
}, g = pt(a), m = ht(g), w = await r.getDimensions(d), x = g === "y", v = x ? "top" : "left", k = x ? "bottom" : "right", A = x ? "clientHeight" : "clientWidth", C = s.reference[m] + s.reference[g] - h[g] - s.floating[m], $ = h[g] - s.reference[g], y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(d));
|
|
1224
1227
|
let L = y ? y[A] : 0;
|
|
1225
1228
|
(!L || !await (r.isElement == null ? void 0 : r.isElement(y))) && (L = i.floating[A] || s.floating[m]);
|
|
1226
|
-
const M =
|
|
1229
|
+
const M = C / 2 - $ / 2, q = L / 2 - w[m] / 2 - 1, z = Ve(f[v], q), V = Ve(f[k], q), I = z, W = L - w[m] - V, U = L / 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
1230
|
return {
|
|
1228
1231
|
[g]: h[g] + Q,
|
|
1229
1232
|
data: {
|
|
@@ -1260,9 +1263,9 @@ const Mo = (e) => ({
|
|
|
1260
1263
|
} = He(e, t);
|
|
1261
1264
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
1262
1265
|
return {};
|
|
1263
|
-
const v = Ce(a),
|
|
1264
|
-
!h && m !== "none" &&
|
|
1265
|
-
const
|
|
1266
|
+
const v = Ce(a), k = Ce(i) === i, A = await (l.isRTL == null ? void 0 : l.isRTL(d.floating)), C = h || (k || !w ? [Ue(i)] : Ro(i));
|
|
1267
|
+
!h && m !== "none" && C.push(...Oo(i, w, m, A));
|
|
1268
|
+
const $ = [i, ...C], y = await Dt(t, x), L = [];
|
|
1266
1269
|
let M = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
1267
1270
|
if (b && L.push(y[v]), f) {
|
|
1268
1271
|
const I = Vo(a, r, A);
|
|
@@ -1273,7 +1276,7 @@ const Mo = (e) => ({
|
|
|
1273
1276
|
overflows: L
|
|
1274
1277
|
}], !L.every((I) => I <= 0)) {
|
|
1275
1278
|
var q, z;
|
|
1276
|
-
const I = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, W =
|
|
1279
|
+
const I = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, W = $[I];
|
|
1277
1280
|
if (W)
|
|
1278
1281
|
return {
|
|
1279
1282
|
data: {
|
|
@@ -1374,11 +1377,11 @@ const Ho = function(e) {
|
|
|
1374
1377
|
fn: (x) => {
|
|
1375
1378
|
let {
|
|
1376
1379
|
x: v,
|
|
1377
|
-
y:
|
|
1380
|
+
y: k
|
|
1378
1381
|
} = x;
|
|
1379
1382
|
return {
|
|
1380
1383
|
x: v,
|
|
1381
|
-
y:
|
|
1384
|
+
y: k
|
|
1382
1385
|
};
|
|
1383
1386
|
}
|
|
1384
1387
|
},
|
|
@@ -1389,12 +1392,12 @@ const Ho = function(e) {
|
|
|
1389
1392
|
}, b = await Dt(t, l), f = Ze(Ce(a)), h = Nt(f);
|
|
1390
1393
|
let g = d[h], m = d[f];
|
|
1391
1394
|
if (s) {
|
|
1392
|
-
const x = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right",
|
|
1393
|
-
g = lt(
|
|
1395
|
+
const x = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", k = g + b[x], A = g - b[v];
|
|
1396
|
+
g = lt(k, g, A);
|
|
1394
1397
|
}
|
|
1395
1398
|
if (r) {
|
|
1396
|
-
const x = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right",
|
|
1397
|
-
m = lt(
|
|
1399
|
+
const x = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", k = m + b[x], A = m - b[v];
|
|
1400
|
+
m = lt(k, m, A);
|
|
1398
1401
|
}
|
|
1399
1402
|
const w = i.fn({
|
|
1400
1403
|
...t,
|
|
@@ -1549,8 +1552,8 @@ function Le(e, t, n, o) {
|
|
|
1549
1552
|
const h = se(s), g = o && ge(o) ? se(o) : o;
|
|
1550
1553
|
let m = h, w = m.frameElement;
|
|
1551
1554
|
for (; w && o && g !== m; ) {
|
|
1552
|
-
const x = ze(w), v = w.getBoundingClientRect(),
|
|
1553
|
-
l *= x.x, d *= x.y, b *= x.x, f *= x.y, l += A, d +=
|
|
1555
|
+
const x = ze(w), v = w.getBoundingClientRect(), k = de(w), A = v.left + (w.clientLeft + parseFloat(k.paddingLeft)) * x.x, C = v.top + (w.clientTop + parseFloat(k.paddingTop)) * x.y;
|
|
1556
|
+
l *= x.x, d *= x.y, b *= x.x, f *= x.y, l += A, d += C, m = se(w), w = m.frameElement;
|
|
1554
1557
|
}
|
|
1555
1558
|
}
|
|
1556
1559
|
return Xe({
|
|
@@ -1776,13 +1779,13 @@ function la(e, t) {
|
|
|
1776
1779
|
} = e.getBoundingClientRect();
|
|
1777
1780
|
if (i || t(), !f || !h)
|
|
1778
1781
|
return;
|
|
1779
|
-
const g = je(b), m = je(a.clientWidth - (d + f)), w = je(a.clientHeight - (b + h)), x = je(d),
|
|
1782
|
+
const g = je(b), m = je(a.clientWidth - (d + f)), w = je(a.clientHeight - (b + h)), x = je(d), k = {
|
|
1780
1783
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -x + "px",
|
|
1781
1784
|
threshold: Se(0, Ve(1, l)) || 1
|
|
1782
1785
|
};
|
|
1783
1786
|
let A = !0;
|
|
1784
|
-
function
|
|
1785
|
-
const y =
|
|
1787
|
+
function C($) {
|
|
1788
|
+
const y = $[0].intersectionRatio;
|
|
1786
1789
|
if (y !== l) {
|
|
1787
1790
|
if (!A)
|
|
1788
1791
|
return r();
|
|
@@ -1793,13 +1796,13 @@ function la(e, t) {
|
|
|
1793
1796
|
A = !1;
|
|
1794
1797
|
}
|
|
1795
1798
|
try {
|
|
1796
|
-
n = new IntersectionObserver(
|
|
1797
|
-
|
|
1799
|
+
n = new IntersectionObserver(C, {
|
|
1800
|
+
...k,
|
|
1798
1801
|
// Handle <iframe>s
|
|
1799
1802
|
root: a.ownerDocument
|
|
1800
1803
|
});
|
|
1801
1804
|
} catch {
|
|
1802
|
-
n = new IntersectionObserver(
|
|
1805
|
+
n = new IntersectionObserver(C, k);
|
|
1803
1806
|
}
|
|
1804
1807
|
n.observe(e);
|
|
1805
1808
|
}
|
|
@@ -1822,8 +1825,8 @@ function ia(e, t, n, o) {
|
|
|
1822
1825
|
const f = d && i ? la(d, n) : null;
|
|
1823
1826
|
let h = -1, g = null;
|
|
1824
1827
|
r && (g = new ResizeObserver((v) => {
|
|
1825
|
-
let [
|
|
1826
|
-
|
|
1828
|
+
let [k] = v;
|
|
1829
|
+
k && k.target === d && g && (g.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1827
1830
|
var A;
|
|
1828
1831
|
(A = g) == null || A.observe(t);
|
|
1829
1832
|
})), n();
|
|
@@ -1836,8 +1839,8 @@ function ia(e, t, n, o) {
|
|
|
1836
1839
|
}
|
|
1837
1840
|
return n(), () => {
|
|
1838
1841
|
var v;
|
|
1839
|
-
b.forEach((
|
|
1840
|
-
a &&
|
|
1842
|
+
b.forEach((k) => {
|
|
1843
|
+
a && k.removeEventListener("scroll", n), s && k.removeEventListener("resize", n);
|
|
1841
1844
|
}), f == null || f(), (v = g) == null || v.disconnect(), g = null, l && cancelAnimationFrame(m);
|
|
1842
1845
|
};
|
|
1843
1846
|
}
|
|
@@ -1971,11 +1974,11 @@ const ha = ["data-side"], Yt = {
|
|
|
1971
1974
|
x: w,
|
|
1972
1975
|
y: x,
|
|
1973
1976
|
contentRef: v,
|
|
1974
|
-
middlewareData:
|
|
1975
|
-
} = ua({ middleware: a, placement: s, strategy: r }, h), A = N(() => s.value.split("-")[0]),
|
|
1977
|
+
middlewareData: k
|
|
1978
|
+
} = ua({ middleware: a, placement: s, strategy: r }, h), A = N(() => s.value.split("-")[0]), C = N(() => ({ left: w.value + "px", top: x.value + "px" })), $ = N(() => {
|
|
1976
1979
|
if (!n.showArrow)
|
|
1977
1980
|
return {};
|
|
1978
|
-
const { arrow: y } = ne(
|
|
1981
|
+
const { arrow: y } = ne(k);
|
|
1979
1982
|
return {
|
|
1980
1983
|
left: (y == null ? void 0 : y.x) + "px",
|
|
1981
1984
|
top: (y == null ? void 0 : y.y) + "px"
|
|
@@ -1994,7 +1997,7 @@ const ha = ["data-side"], Yt = {
|
|
|
1994
1997
|
ref_key: "contentRef",
|
|
1995
1998
|
ref: v,
|
|
1996
1999
|
class: B(["abl-popper", `is-${e.effect}`, e.popperClass]),
|
|
1997
|
-
style: O(
|
|
2000
|
+
style: O(C.value),
|
|
1998
2001
|
"data-side": A.value,
|
|
1999
2002
|
onMousedown: L[0] || (L[0] = H(() => {
|
|
2000
2003
|
}, ["stop"]))
|
|
@@ -2007,7 +2010,7 @@ const ha = ["data-side"], Yt = {
|
|
|
2007
2010
|
ref_key: "arrowRef",
|
|
2008
2011
|
ref: o,
|
|
2009
2012
|
class: "abl-popper__arrow",
|
|
2010
|
-
style: O(
|
|
2013
|
+
style: O($.value)
|
|
2011
2014
|
}, null, 4)) : E("", !0)
|
|
2012
2015
|
], 46, ha)) : E("", !0)
|
|
2013
2016
|
]),
|
|
@@ -2692,13 +2695,13 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2692
2695
|
r.value = (r.value + 1) % a.value;
|
|
2693
2696
|
}, v = (z) => {
|
|
2694
2697
|
r.value = (r.value - 1 + a.value) % a.value;
|
|
2695
|
-
},
|
|
2698
|
+
}, k = () => {
|
|
2696
2699
|
i.value + o.zoomRate > o.maxScale ? i.value = o.maxScale : i.value = m(i.value, o.zoomRate);
|
|
2697
2700
|
}, A = () => {
|
|
2698
2701
|
i.value - o.zoomRate < o.minScale ? i.value = o.minScale : i.value = m(i.value, -o.zoomRate);
|
|
2699
|
-
}, S = () => {
|
|
2700
|
-
h.value -= 90;
|
|
2701
2702
|
}, C = () => {
|
|
2703
|
+
h.value -= 90;
|
|
2704
|
+
}, $ = () => {
|
|
2702
2705
|
h.value += 90;
|
|
2703
2706
|
}, y = () => {
|
|
2704
2707
|
h.value = 0, i.value = 1, b.value = 0, f.value = 0;
|
|
@@ -2706,11 +2709,11 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2706
2709
|
console.log("e====", z);
|
|
2707
2710
|
const V = z.target, { top: I, left: W, right: U, bottom: X } = V.getBoundingClientRect(), Z = document.documentElement.clientWidth, Q = document.documentElement.clientHeight;
|
|
2708
2711
|
l.value = z.clientX, d.value = z.clientY;
|
|
2709
|
-
const ie = b.value,
|
|
2712
|
+
const ie = b.value, S = f.value;
|
|
2710
2713
|
document.onmousemove = (P) => {
|
|
2711
|
-
b.value = ie + P.clientX - l.value, f.value =
|
|
2714
|
+
b.value = ie + P.clientX - l.value, f.value = S + P.clientY - d.value;
|
|
2712
2715
|
}, document.onmouseup = (P) => {
|
|
2713
|
-
b.value > ie + Z - U && (b.value = ie + Z - U), b.value < ie - W && (b.value = ie - W), f.value >
|
|
2716
|
+
b.value > ie + Z - U && (b.value = ie + Z - U), b.value < ie - W && (b.value = ie - W), f.value > S + Q - X && (f.value = S + Q - X), f.value < S - I && (f.value = S - I), document.onmousemove = null;
|
|
2714
2717
|
};
|
|
2715
2718
|
}, M = (z) => {
|
|
2716
2719
|
const V = z.deltaY * o.zoomRate * 0.1;
|
|
@@ -2789,7 +2792,7 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2789
2792
|
}, cs),
|
|
2790
2793
|
c("i", {
|
|
2791
2794
|
class: "abl-icon",
|
|
2792
|
-
onClick: H(
|
|
2795
|
+
onClick: H(k, ["stop"])
|
|
2793
2796
|
}, us),
|
|
2794
2797
|
c("i", {
|
|
2795
2798
|
class: "abl-icon",
|
|
@@ -2797,11 +2800,11 @@ const Ka = /* @__PURE__ */ c("div", {
|
|
|
2797
2800
|
}, hs),
|
|
2798
2801
|
c("i", {
|
|
2799
2802
|
class: "abl-icon",
|
|
2800
|
-
onClick:
|
|
2803
|
+
onClick: C
|
|
2801
2804
|
}, vs),
|
|
2802
2805
|
c("i", {
|
|
2803
2806
|
class: "abl-icon",
|
|
2804
|
-
onClick:
|
|
2807
|
+
onClick: $
|
|
2805
2808
|
}, gs)
|
|
2806
2809
|
])
|
|
2807
2810
|
])
|
|
@@ -3900,9 +3903,9 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3900
3903
|
},
|
|
3901
3904
|
emits: ["open", "close"],
|
|
3902
3905
|
setup(e, { emit: t }) {
|
|
3903
|
-
var
|
|
3906
|
+
var $;
|
|
3904
3907
|
const n = t, o = Ye(), a = typeof window < "u" && typeof document < "u", s = e, r = _([]);
|
|
3905
|
-
(
|
|
3908
|
+
($ = o.default()) == null || $.forEach((y) => {
|
|
3906
3909
|
const { props: L } = y;
|
|
3907
3910
|
if (L) {
|
|
3908
3911
|
const { title: M, disabled: q } = L;
|
|
@@ -3947,13 +3950,13 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3947
3950
|
return;
|
|
3948
3951
|
const { top: y, bottom: L } = (M = i == null ? void 0 : i.value) == null ? void 0 : M.getBoundingClientRect();
|
|
3949
3952
|
L > 0 && (b.value = L - 1);
|
|
3950
|
-
},
|
|
3953
|
+
}, k = () => {
|
|
3951
3954
|
s.closeOnClickMask && x();
|
|
3952
3955
|
}, A = ke({
|
|
3953
3956
|
...De(s),
|
|
3954
3957
|
onClose: x,
|
|
3955
3958
|
current: f
|
|
3956
|
-
}),
|
|
3959
|
+
}), C = qs(() => {
|
|
3957
3960
|
h.value && x();
|
|
3958
3961
|
});
|
|
3959
3962
|
return Me(Zs, A), xe(() => {
|
|
@@ -3961,7 +3964,7 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3961
3964
|
}), (y, L) => (u(), p("div", {
|
|
3962
3965
|
class: "abl-dropdown",
|
|
3963
3966
|
ref_key: "root",
|
|
3964
|
-
ref:
|
|
3967
|
+
ref: C
|
|
3965
3968
|
}, [
|
|
3966
3969
|
c("div", {
|
|
3967
3970
|
class: "abl-dropdown-menu",
|
|
@@ -3999,7 +4002,7 @@ const Us = (e) => (pe("data-v-b0efe321"), e = e(), ve(), e), Xs = ["onClick"], Y
|
|
|
3999
4002
|
top: g(b.value)
|
|
4000
4003
|
}
|
|
4001
4004
|
]),
|
|
4002
|
-
onClick:
|
|
4005
|
+
onClick: k,
|
|
4003
4006
|
onTouchmove: L[1] || (L[1] = H(() => {
|
|
4004
4007
|
}, ["prevent"]))
|
|
4005
4008
|
}, [
|
|
@@ -4218,7 +4221,7 @@ const pl = {
|
|
|
4218
4221
|
},
|
|
4219
4222
|
clear: g,
|
|
4220
4223
|
input: () => s.value
|
|
4221
|
-
}), (v,
|
|
4224
|
+
}), (v, k) => (u(), p("div", {
|
|
4222
4225
|
class: B(["abl-input", { "is-disabled": e.disabled }, { "abl-input-group": v.$slots.addonBefore || e.addonBefore || v.$slots.addonAfter || e.addonAfter }])
|
|
4223
4226
|
}, [
|
|
4224
4227
|
v.$slots.addonBefore || e.addonBefore ? (u(), p("span", pl, T(e.addonBefore), 1)) : E("", !0),
|
|
@@ -4237,7 +4240,7 @@ const pl = {
|
|
|
4237
4240
|
F(c("input", Ee({
|
|
4238
4241
|
ref_key: "inputRef",
|
|
4239
4242
|
ref: s,
|
|
4240
|
-
"onUpdate:modelValue":
|
|
4243
|
+
"onUpdate:modelValue": k[0] || (k[0] = (A) => b.value = A),
|
|
4241
4244
|
class: "abl-input__inner",
|
|
4242
4245
|
type: l.value,
|
|
4243
4246
|
placeholder: e.placeholder,
|
|
@@ -4424,73 +4427,73 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4424
4427
|
function l() {
|
|
4425
4428
|
o.value = [...n.fileList], o.value.length > n.maxCount && o.value.splice(n.maxCount), n.disabled ? a.value = o.value.length : o.value.length < n.maxCount ? a.value = n.fileList.length + 1 : a.value = n.maxCount;
|
|
4426
4429
|
}
|
|
4427
|
-
const d = (
|
|
4428
|
-
const
|
|
4429
|
-
return
|
|
4430
|
-
}, b = (
|
|
4430
|
+
const d = (C) => {
|
|
4431
|
+
const $ = /\.(jpg|jpeg|png|gif|webp)$/i, y = /^data:image/;
|
|
4432
|
+
return $.test(C) || y.test(C);
|
|
4433
|
+
}, b = (C, $) => {
|
|
4431
4434
|
var L;
|
|
4432
|
-
const y = (L =
|
|
4435
|
+
const y = (L = C.dataTransfer) == null ? void 0 : L.files;
|
|
4433
4436
|
if (y != null && y.length) {
|
|
4434
4437
|
const M = y.length;
|
|
4435
|
-
for (let q = 0; q < M &&
|
|
4436
|
-
m(y[q],
|
|
4437
|
-
r.value[
|
|
4438
|
+
for (let q = 0; q < M && $ + q <= n.maxCount; q++)
|
|
4439
|
+
m(y[q], $ + q);
|
|
4440
|
+
r.value[$].value = "";
|
|
4438
4441
|
}
|
|
4439
|
-
}, f = (
|
|
4440
|
-
r.value[
|
|
4441
|
-
}, h = (
|
|
4442
|
-
const y =
|
|
4442
|
+
}, f = (C) => {
|
|
4443
|
+
r.value[C].click();
|
|
4444
|
+
}, h = (C, $) => {
|
|
4445
|
+
const y = C.target.files;
|
|
4443
4446
|
if (y != null && y.length) {
|
|
4444
4447
|
const L = y.length;
|
|
4445
|
-
for (let M = 0; M < L &&
|
|
4446
|
-
m(y[M],
|
|
4447
|
-
r.value[
|
|
4448
|
+
for (let M = 0; M < L && $ + M < n.maxCount; M++)
|
|
4449
|
+
m(y[M], $ + M);
|
|
4450
|
+
r.value[$].value = "";
|
|
4448
4451
|
}
|
|
4449
|
-
}, g = t, m = function(
|
|
4450
|
-
n.beforeUpload(
|
|
4452
|
+
}, g = t, m = function(C, $) {
|
|
4453
|
+
n.beforeUpload(C) ? (n.maxCount > a.value && a.value++, n.uploadMode === "base64" && (s.value[$] = !0, w(C, $)), n.uploadMode === "custom" && (s.value[$] = !0, x(C, $))) : me(() => {
|
|
4451
4454
|
A(n.errorInfo);
|
|
4452
4455
|
});
|
|
4453
|
-
}, w = (
|
|
4456
|
+
}, w = (C, $) => {
|
|
4454
4457
|
var y = new FileReader();
|
|
4455
|
-
y.readAsDataURL(
|
|
4458
|
+
y.readAsDataURL(C), y.onloadstart = function(L) {
|
|
4456
4459
|
console.log("开始读取 onloadstart:", L);
|
|
4457
4460
|
}, y.onabort = function(L) {
|
|
4458
4461
|
console.log("读取中止 onabort:", L);
|
|
4459
4462
|
}, y.onerror = function(L) {
|
|
4460
4463
|
console.log("读取错误 onerror:", L);
|
|
4461
4464
|
}, y.onprogress = function(L) {
|
|
4462
|
-
L.loaded === L.total && (s.value[
|
|
4465
|
+
L.loaded === L.total && (s.value[$] = !1);
|
|
4463
4466
|
}, y.onload = function(L) {
|
|
4464
4467
|
var M;
|
|
4465
4468
|
o.value.push({
|
|
4466
|
-
name:
|
|
4469
|
+
name: C.name,
|
|
4467
4470
|
url: (M = L.target) == null ? void 0 : M.result
|
|
4468
4471
|
}), g("update:fileList", o.value), g("change", o.value);
|
|
4469
4472
|
}, y.onloadend = function(L) {
|
|
4470
4473
|
console.log("读取结束 onloadend:", L);
|
|
4471
4474
|
};
|
|
4472
|
-
}, x = (
|
|
4473
|
-
n.customRequest(
|
|
4475
|
+
}, x = (C, $) => {
|
|
4476
|
+
n.customRequest(C).then((y) => {
|
|
4474
4477
|
o.value.push(y), g("update:fileList", o.value), g("change", o.value);
|
|
4475
4478
|
}).catch((y) => {
|
|
4476
4479
|
n.maxCount > 1 && (a.value = o.value.length + 1), A(y);
|
|
4477
4480
|
}).finally(() => {
|
|
4478
|
-
s.value[
|
|
4481
|
+
s.value[$] = !1;
|
|
4479
4482
|
});
|
|
4480
|
-
}, v = (
|
|
4481
|
-
if (d(
|
|
4482
|
-
const y = o.value.slice(0,
|
|
4483
|
-
i.value[
|
|
4483
|
+
}, v = (C, $) => {
|
|
4484
|
+
if (d($)) {
|
|
4485
|
+
const y = o.value.slice(0, C).filter((L) => !d(L.url));
|
|
4486
|
+
i.value[C - y.length].onPreview();
|
|
4484
4487
|
} else
|
|
4485
|
-
window.open(
|
|
4486
|
-
},
|
|
4488
|
+
window.open($);
|
|
4489
|
+
}, k = (C) => {
|
|
4487
4490
|
o.value.length < n.maxCount && a.value--;
|
|
4488
|
-
const
|
|
4489
|
-
g("remove",
|
|
4490
|
-
}, A = (
|
|
4491
|
-
ft({ type: "error", text:
|
|
4491
|
+
const $ = o.value.splice(C, 1);
|
|
4492
|
+
g("remove", $), g("update:fileList", o.value), g("change", o.value);
|
|
4493
|
+
}, A = (C) => {
|
|
4494
|
+
ft({ type: "error", text: C, duration: 1e3, top: 100 });
|
|
4492
4495
|
};
|
|
4493
|
-
return (
|
|
4496
|
+
return (C, $) => (u(), p("div", Rl, [
|
|
4494
4497
|
(u(!0), p(j, null, ee(a.value, (y) => (u(), p("div", {
|
|
4495
4498
|
class: "abl-upload-item",
|
|
4496
4499
|
key: y
|
|
@@ -4498,9 +4501,9 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4498
4501
|
c("div", Il, [
|
|
4499
4502
|
F(c("div", {
|
|
4500
4503
|
class: B(["abl-upload-wrap", { "upload-disabled": e.disabled }]),
|
|
4501
|
-
onDragenter:
|
|
4504
|
+
onDragenter: $[1] || ($[1] = H(() => {
|
|
4502
4505
|
}, ["stop", "prevent"])),
|
|
4503
|
-
onDragover:
|
|
4506
|
+
onDragover: $[2] || ($[2] = H(() => {
|
|
4504
4507
|
}, ["stop", "prevent"])),
|
|
4505
4508
|
onDrop: H((L) => e.disabled ? () => !1 : b(L, y - 1), ["stop", "prevent"]),
|
|
4506
4509
|
onClick: (L) => e.disabled ? () => !1 : f(y - 1)
|
|
@@ -4510,7 +4513,7 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4510
4513
|
ref_key: "uploadInput",
|
|
4511
4514
|
ref: r,
|
|
4512
4515
|
type: "file",
|
|
4513
|
-
onClick:
|
|
4516
|
+
onClick: $[0] || ($[0] = H(() => {
|
|
4514
4517
|
}, ["stop"])),
|
|
4515
4518
|
accept: e.accept,
|
|
4516
4519
|
multiple: e.multiple,
|
|
@@ -4520,7 +4523,7 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4520
4523
|
c("div", null, [
|
|
4521
4524
|
Nl,
|
|
4522
4525
|
c("p", Ml, [
|
|
4523
|
-
R(
|
|
4526
|
+
R(C.$slots, "default", {}, () => [
|
|
4524
4527
|
Y(T(e.tip), 1)
|
|
4525
4528
|
], !0)
|
|
4526
4529
|
])
|
|
@@ -4559,7 +4562,7 @@ const bt = (e) => (pe("data-v-12e7e74b"), e = e(), ve(), e), Rl = { class: "abl-
|
|
|
4559
4562
|
F(c("a", {
|
|
4560
4563
|
class: "m-icon",
|
|
4561
4564
|
title: "delete",
|
|
4562
|
-
onClick: H((L) =>
|
|
4565
|
+
onClick: H((L) => k(y - 1), ["prevent", "stop"])
|
|
4563
4566
|
}, Xl, 8, ql), [
|
|
4564
4567
|
[G, !e.disabled]
|
|
4565
4568
|
])
|
|
@@ -4646,7 +4649,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4646
4649
|
n.search && l.value === "focus" && h.value
|
|
4647
4650
|
), m = _(n.disabled), w = _(n.mode === "tag"), x = _(""), v = ke(
|
|
4648
4651
|
(q = n == null ? void 0 : n.options) == null ? void 0 : q.filter((z) => z.selected === !0)
|
|
4649
|
-
),
|
|
4652
|
+
), k = (z) => {
|
|
4650
4653
|
if (!g.value)
|
|
4651
4654
|
x.value = "";
|
|
4652
4655
|
else {
|
|
@@ -4655,7 +4658,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4655
4658
|
}
|
|
4656
4659
|
}, A = (z) => {
|
|
4657
4660
|
n.disabled || (h.value = !0, z.stopPropagation(), l.value === "focus" ? l.value = "blur" : l.value = "focus");
|
|
4658
|
-
},
|
|
4661
|
+
}, C = (z, V) => {
|
|
4659
4662
|
var W;
|
|
4660
4663
|
if (n.disabled)
|
|
4661
4664
|
return;
|
|
@@ -4671,7 +4674,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4671
4674
|
});
|
|
4672
4675
|
}
|
|
4673
4676
|
o("update:modelValue", I), o("changeSelect", ot(v)), d.value.close();
|
|
4674
|
-
},
|
|
4677
|
+
}, $ = () => {
|
|
4675
4678
|
var z;
|
|
4676
4679
|
(z = i.value) == null || z.focus(), !g.value && l.value === "focus" && v.length > 0 && (v.pop(), o("changeSelect", ot(v)));
|
|
4677
4680
|
}, y = (z) => {
|
|
@@ -4719,7 +4722,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4719
4722
|
f.list.length > 0 ? (u(!0), p(j, { key: 0 }, ee(f.list, (I) => (u(), p("div", {
|
|
4720
4723
|
class: B(["abl-select-options-item", v.some((W) => W.value === I.value) ? "abl-options-item-active" : ""]),
|
|
4721
4724
|
key: I.name + I.value,
|
|
4722
|
-
onClick: (W) =>
|
|
4725
|
+
onClick: (W) => C(I, W)
|
|
4723
4726
|
}, T(I.name), 11, si))), 128)) : (u(), p("div", li, " 暂无数据 "))
|
|
4724
4727
|
], 4)
|
|
4725
4728
|
]),
|
|
@@ -4728,7 +4731,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4728
4731
|
onClick: A,
|
|
4729
4732
|
id: "select-input-warpper",
|
|
4730
4733
|
class: B(["abl-select-warpper", m.value ? "abl-select-warpper-disabled" : ""]),
|
|
4731
|
-
onKeydown: It(
|
|
4734
|
+
onKeydown: It($, ["delete"])
|
|
4732
4735
|
}, [
|
|
4733
4736
|
c("div", Gl, [
|
|
4734
4737
|
c("div", Jl, [
|
|
@@ -4755,7 +4758,7 @@ const Gl = { class: "abl-select-warpper-content" }, Jl = { class: "abl-select-in
|
|
|
4755
4758
|
ref_key: "inputFocus",
|
|
4756
4759
|
ref: i,
|
|
4757
4760
|
"onUpdate:modelValue": V[1] || (V[1] = (I) => x.value = I),
|
|
4758
|
-
onInput:
|
|
4761
|
+
onInput: k,
|
|
4759
4762
|
placeholder: "请输入筛选条件"
|
|
4760
4763
|
}, null, 34), [
|
|
4761
4764
|
[Ot, x.value]
|
|
@@ -4857,19 +4860,19 @@ const ci = { class: "abl-header" }, di = { class: "abl-title" }, ui = { class: "
|
|
|
4857
4860
|
}
|
|
4858
4861
|
t.bordered ? me(() => {
|
|
4859
4862
|
i.value.forEach((x, v) => {
|
|
4860
|
-
x.forEach((
|
|
4861
|
-
const A = Array.from(
|
|
4862
|
-
|
|
4863
|
-
const
|
|
4864
|
-
|
|
4863
|
+
x.forEach((k) => {
|
|
4864
|
+
const A = Array.from(k.element.children), C = A[0].cloneNode(!0);
|
|
4865
|
+
C.colSpan = 1, f(C, t.labelStyle), f(C, JSON.parse(k.element.dataset.labelStyle));
|
|
4866
|
+
const $ = A[1].cloneNode(!0);
|
|
4867
|
+
$.colSpan = k.span * 2 - 1, f($, t.contentStyle), f($, JSON.parse(k.element.dataset.contentStyle)), r.value[v].appendChild(C), r.value[v].appendChild($);
|
|
4865
4868
|
});
|
|
4866
4869
|
});
|
|
4867
4870
|
}) : me(() => {
|
|
4868
4871
|
h.forEach((x, v) => {
|
|
4869
|
-
const
|
|
4872
|
+
const k = Array.from(x.children), A = k[0];
|
|
4870
4873
|
f(A, t.labelStyle), f(A, JSON.parse(x.dataset.labelStyle));
|
|
4871
|
-
const
|
|
4872
|
-
f(
|
|
4874
|
+
const C = k[1];
|
|
4875
|
+
f(C, t.contentStyle), f(C, JSON.parse(x.dataset.contentStyle)), s.value[v].appendChild(x);
|
|
4873
4876
|
});
|
|
4874
4877
|
});
|
|
4875
4878
|
}
|
|
@@ -5119,43 +5122,43 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5119
5122
|
const i = _(), l = _(), d = Ci();
|
|
5120
5123
|
_(), _(), _([]);
|
|
5121
5124
|
const b = N(() => {
|
|
5122
|
-
const { marks:
|
|
5123
|
-
return Object.keys(
|
|
5125
|
+
const { marks: S, max: P, min: D } = n;
|
|
5126
|
+
return Object.keys(S).map(parseFloat).sort((ae, ue) => ae - ue).filter((ae) => ae >= +D && ae <= +P);
|
|
5124
5127
|
}), f = N(() => Number(n.max) - Number(n.min)), h = N(() => {
|
|
5125
|
-
const
|
|
5128
|
+
const S = "abl-range";
|
|
5126
5129
|
return {
|
|
5127
|
-
[
|
|
5128
|
-
[`${
|
|
5129
|
-
[`${
|
|
5130
|
-
[`${
|
|
5130
|
+
[S]: !0,
|
|
5131
|
+
[`${S}-disabled`]: n.disabled,
|
|
5132
|
+
[`${S}-vertical`]: n.vertical,
|
|
5133
|
+
[`${S}-show-number`]: !n.hiddenRange
|
|
5131
5134
|
};
|
|
5132
5135
|
}), g = N(() => {
|
|
5133
|
-
const
|
|
5136
|
+
const S = "abl-range-container";
|
|
5134
5137
|
return {
|
|
5135
|
-
[
|
|
5136
|
-
[`${
|
|
5138
|
+
[S]: !0,
|
|
5139
|
+
[`${S}-vertical`]: n.vertical
|
|
5137
5140
|
};
|
|
5138
5141
|
}), m = N(() => ({
|
|
5139
5142
|
background: n.inactiveColor
|
|
5140
5143
|
})), w = N(() => ({
|
|
5141
5144
|
borderColor: n.buttonColor
|
|
5142
|
-
})), x = _(!1), v = (
|
|
5143
|
-
const { modelValue:
|
|
5144
|
-
return v(
|
|
5145
|
+
})), x = _(!1), v = (S) => !!n.range && Array.isArray(S), k = () => {
|
|
5146
|
+
const { modelValue: S, min: P } = n;
|
|
5147
|
+
return v(S) ? `${(S[1] - S[0]) * 100 / f.value}%` : `${(S - Number(P)) * 100 / f.value}%`;
|
|
5145
5148
|
}, A = () => {
|
|
5146
|
-
const { modelValue:
|
|
5147
|
-
return v(
|
|
5148
|
-
},
|
|
5149
|
-
height:
|
|
5149
|
+
const { modelValue: S, min: P } = n;
|
|
5150
|
+
return v(S) ? `${(S[0] - Number(P)) * 100 / f.value}%` : "0%";
|
|
5151
|
+
}, C = N(() => n.vertical ? {
|
|
5152
|
+
height: k(),
|
|
5150
5153
|
top: A(),
|
|
5151
5154
|
background: n.activeColor,
|
|
5152
5155
|
transition: l.value ? "none" : void 0
|
|
5153
5156
|
} : {
|
|
5154
|
-
width:
|
|
5157
|
+
width: k(),
|
|
5155
5158
|
left: A(),
|
|
5156
5159
|
background: n.activeColor,
|
|
5157
5160
|
transition: l.value ? "none" : void 0
|
|
5158
|
-
}),
|
|
5161
|
+
}), $ = (S) => {
|
|
5159
5162
|
const P = "abl-range-mark", { modelValue: D, max: K, min: re } = n;
|
|
5160
5163
|
let ae = Number(re), ue = Number(K);
|
|
5161
5164
|
if (n.range) {
|
|
@@ -5163,20 +5166,20 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5163
5166
|
ae = Ae, ue = Oe;
|
|
5164
5167
|
} else
|
|
5165
5168
|
ue = D;
|
|
5166
|
-
let Ie =
|
|
5169
|
+
let Ie = S <= +ue && S >= ae;
|
|
5167
5170
|
return {
|
|
5168
5171
|
[`${P}-text`]: !0,
|
|
5169
5172
|
[`${P}-text-active`]: Ie
|
|
5170
5173
|
};
|
|
5171
|
-
}, y = (
|
|
5174
|
+
}, y = (S) => {
|
|
5172
5175
|
const { min: P, vertical: D } = n;
|
|
5173
5176
|
let K = {
|
|
5174
|
-
left: `${(
|
|
5177
|
+
left: `${(S - Number(P)) / f.value * 100}%`
|
|
5175
5178
|
};
|
|
5176
5179
|
return D && (K = {
|
|
5177
|
-
top: `${(
|
|
5180
|
+
top: `${(S - Number(P)) / f.value * 100}%`
|
|
5178
5181
|
}), K;
|
|
5179
|
-
}, L = (
|
|
5182
|
+
}, L = (S) => {
|
|
5180
5183
|
const { modelValue: P, max: D, min: K } = n;
|
|
5181
5184
|
let re = Number(K), ae = Number(D);
|
|
5182
5185
|
if (n.range) {
|
|
@@ -5184,20 +5187,20 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5184
5187
|
re = Ae, ae = Oe;
|
|
5185
5188
|
}
|
|
5186
5189
|
return {
|
|
5187
|
-
background:
|
|
5190
|
+
background: S <= ae && S >= re ? n.activeColor : n.inactiveColor
|
|
5188
5191
|
};
|
|
5189
|
-
}, M = (
|
|
5192
|
+
}, M = (S) => {
|
|
5190
5193
|
const { min: P, max: D, step: K } = n;
|
|
5191
|
-
return
|
|
5192
|
-
}, q = (
|
|
5193
|
-
v(
|
|
5194
|
-
}, I = (
|
|
5194
|
+
return S = Math.max(+P, Math.min(S, +D)), Math.round(S / +K) * +K;
|
|
5195
|
+
}, q = (S, P) => JSON.stringify(S) === JSON.stringify(P), z = (S) => S[0] > S[1] ? S.slice(0).reverse() : S, V = (S, P) => {
|
|
5196
|
+
v(S) ? S = z(S).map(M) : S = M(S), q(S, n.modelValue) || o("update:modelValue", S), P && !q(S, s) && o("change", S);
|
|
5197
|
+
}, I = (S) => {
|
|
5195
5198
|
if (n.disabled || l.value === "draging")
|
|
5196
5199
|
return;
|
|
5197
5200
|
x.value = !0;
|
|
5198
5201
|
const { min: P, modelValue: D } = n, K = Et(i);
|
|
5199
|
-
let re =
|
|
5200
|
-
n.vertical && (re =
|
|
5202
|
+
let re = S.clientX - K.left, ae = K.width;
|
|
5203
|
+
n.vertical && (re = S.clientY - K.top, ae = K.height);
|
|
5201
5204
|
const ue = Number(P) + re / ae * f.value;
|
|
5202
5205
|
if (v(D)) {
|
|
5203
5206
|
const [Ie, Ae] = D, Oe = (Ie + Ae) / 2;
|
|
@@ -5209,23 +5212,23 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5209
5212
|
});
|
|
5210
5213
|
}, W = () => {
|
|
5211
5214
|
x.value = !1;
|
|
5212
|
-
}, U = (
|
|
5213
|
-
n.disabled || (d.start(
|
|
5214
|
-
}, X = (
|
|
5215
|
+
}, U = (S) => {
|
|
5216
|
+
n.disabled || (d.start(S), r = n.modelValue, v(r) ? s = r.map(M) : s = M(r), l.value = "start");
|
|
5217
|
+
}, X = (S) => {
|
|
5215
5218
|
if (n.disabled)
|
|
5216
5219
|
return;
|
|
5217
|
-
l.value === "start" && o("dragStart"), d.move(
|
|
5220
|
+
l.value === "start" && o("dragStart"), d.move(S), l.value = "draging", S.type.startsWith("touch") && (x.value = !0);
|
|
5218
5221
|
const P = Et(i);
|
|
5219
5222
|
let D = d.deltaX.value, K = P.width, re = D / K * f.value;
|
|
5220
5223
|
n.vertical && (D = d.deltaY.value, K = P.height, re = D / K * f.value), v(s) ? r[a.value] = s[a.value] + re : r = s + re, V(r);
|
|
5221
|
-
}, Z = (
|
|
5222
|
-
n.disabled || l.value === "draging" && (V(r, !0), o("dragEnd"), window.removeEventListener("mousemove", X), window.removeEventListener("touchmove", X), window.removeEventListener("mouseup", Z), window.removeEventListener("touchend", Z), window.removeEventListener("contextmenu", Z),
|
|
5224
|
+
}, Z = (S) => {
|
|
5225
|
+
n.disabled || l.value === "draging" && (V(r, !0), o("dragEnd"), window.removeEventListener("mousemove", X), window.removeEventListener("touchmove", X), window.removeEventListener("mouseup", Z), window.removeEventListener("touchend", Z), window.removeEventListener("contextmenu", Z), S.type.startsWith("touch") && (x.value = !1), setTimeout(() => {
|
|
5223
5226
|
l.value = "";
|
|
5224
5227
|
}));
|
|
5225
|
-
}, Q = (
|
|
5226
|
-
n.disabled || (
|
|
5227
|
-
}, ie = (
|
|
5228
|
-
return (
|
|
5228
|
+
}, Q = (S) => {
|
|
5229
|
+
n.disabled || (S.preventDefault(), U(S), window.addEventListener("mousemove", X), window.addEventListener("touchmove", X), window.addEventListener("mouseup", Z), window.addEventListener("touchend", Z), window.addEventListener("contextmenu", Z));
|
|
5230
|
+
}, ie = (S) => Array.isArray(n.modelValue) && typeof S == "number" ? n.modelValue[S] : Number(n.modelValue);
|
|
5231
|
+
return (S, P) => (u(), p("div", {
|
|
5229
5232
|
class: B(g.value)
|
|
5230
5233
|
}, [
|
|
5231
5234
|
e.hiddenRange ? E("", !0) : (u(), p("div", Ai, T(+e.min), 1)),
|
|
@@ -5239,7 +5242,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5239
5242
|
b.value.length > 0 ? (u(), p("div", Bi, [
|
|
5240
5243
|
(u(!0), p(j, null, ee(b.value, (D) => (u(), p("span", {
|
|
5241
5244
|
key: D,
|
|
5242
|
-
class: B(
|
|
5245
|
+
class: B($(D)),
|
|
5243
5246
|
style: O(y(D))
|
|
5244
5247
|
}, [
|
|
5245
5248
|
Y(T(D) + " ", 1),
|
|
@@ -5251,7 +5254,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5251
5254
|
])) : E("", !0),
|
|
5252
5255
|
c("div", {
|
|
5253
5256
|
class: "abl-range-bar",
|
|
5254
|
-
style: O(
|
|
5257
|
+
style: O(C.value)
|
|
5255
5258
|
}, [
|
|
5256
5259
|
e.range ? (u(), p(j, { key: 0 }, ee([0, 1], (D) => c("div", {
|
|
5257
5260
|
key: D,
|
|
@@ -5269,7 +5272,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5269
5272
|
typeof D == "number" && (a.value = D), Q(K);
|
|
5270
5273
|
}
|
|
5271
5274
|
}, [
|
|
5272
|
-
|
|
5275
|
+
S.$slots.button ? R(S.$slots, "button", { key: 0 }, void 0, !0) : (u(), p("div", {
|
|
5273
5276
|
key: 1,
|
|
5274
5277
|
class: "abl-range-button",
|
|
5275
5278
|
style: O(w.value)
|
|
@@ -5297,7 +5300,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5297
5300
|
Q(D);
|
|
5298
5301
|
})
|
|
5299
5302
|
}, [
|
|
5300
|
-
|
|
5303
|
+
S.$slots.button ? R(S.$slots, "button", { key: 0 }, void 0, !0) : (u(), p("div", {
|
|
5301
5304
|
key: 1,
|
|
5302
5305
|
class: "abl-range-button",
|
|
5303
5306
|
style: O(w.value)
|
|
@@ -5413,8 +5416,8 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5413
5416
|
end: m + x
|
|
5414
5417
|
};
|
|
5415
5418
|
v.start < 1 && (v.end = v.end + (1 - v.start), v.start = 1), v.end > i.value && (v.start = v.start - (v.end - i.value), v.end = i.value), v.start < 1 && (v.start = 1), v.start > 1 ? s.value = !0 : s.value = !1, v.end < i.value ? r.value = !0 : r.value = !1;
|
|
5416
|
-
for (let
|
|
5417
|
-
w.push(
|
|
5419
|
+
for (let k = v.start; k <= v.end; k++)
|
|
5420
|
+
w.push(k);
|
|
5418
5421
|
return w;
|
|
5419
5422
|
}, f = () => {
|
|
5420
5423
|
a.value = a.value - n.pagerCount > 0 ? a.value - n.pagerCount : 1, o.itemRender && d("ellipsisClick", a.value);
|
|
@@ -5462,7 +5465,7 @@ const on = (e) => (pe("data-v-349f6091"), e = e(), ve(), e), Ai = {
|
|
|
5462
5465
|
(u(!0), p(j, null, ee(l.value, (x, v) => (u(), p("li", {
|
|
5463
5466
|
class: B(["abl-pagination-item", { active: a.value === x }]),
|
|
5464
5467
|
key: v,
|
|
5465
|
-
onClick: (
|
|
5468
|
+
onClick: (k) => !ne(o).itemRender && g(x)
|
|
5466
5469
|
}, [
|
|
5467
5470
|
R(m.$slots, "itemRender", {
|
|
5468
5471
|
page: x,
|