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