abl-ui 0.1.43 → 0.1.44
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 +121 -113
- 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
|
@@ -996,7 +996,7 @@ const _o = async (e, t, n) => {
|
|
|
996
996
|
fn: _
|
|
997
997
|
} = r[x], {
|
|
998
998
|
x: b,
|
|
999
|
-
y:
|
|
999
|
+
y: E,
|
|
1000
1000
|
data: C,
|
|
1001
1001
|
reset: k
|
|
1002
1002
|
} = await _({
|
|
@@ -1013,7 +1013,7 @@ const _o = async (e, t, n) => {
|
|
|
1013
1013
|
floating: t
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
1016
|
-
v = b ?? v, f =
|
|
1016
|
+
v = b ?? v, f = E ?? f, m = {
|
|
1017
1017
|
...m,
|
|
1018
1018
|
[S]: {
|
|
1019
1019
|
...m[S],
|
|
@@ -1061,7 +1061,7 @@ async function Lt(e, t) {
|
|
|
1061
1061
|
...i.floating,
|
|
1062
1062
|
x: o,
|
|
1063
1063
|
y: s
|
|
1064
|
-
} : i.reference,
|
|
1064
|
+
} : i.reference, E = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(r.floating)), C = await (l.isElement == null ? void 0 : l.isElement(E)) ? await (l.getScale == null ? void 0 : l.getScale(E)) || {
|
|
1065
1065
|
x: 1,
|
|
1066
1066
|
y: 1
|
|
1067
1067
|
} : {
|
|
@@ -1070,7 +1070,7 @@ async function Lt(e, t) {
|
|
|
1070
1070
|
}, k = De(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1071
1071
|
elements: r,
|
|
1072
1072
|
rect: b,
|
|
1073
|
-
offsetParent:
|
|
1073
|
+
offsetParent: E,
|
|
1074
1074
|
strategy: a
|
|
1075
1075
|
}) : b);
|
|
1076
1076
|
return {
|
|
@@ -1101,10 +1101,10 @@ const wo = (e) => ({
|
|
|
1101
1101
|
const f = Ct(v), h = {
|
|
1102
1102
|
x: n,
|
|
1103
1103
|
y: o
|
|
1104
|
-
}, m = lt(s), y = st(m), x = await i.getDimensions(d), S = m === "y", _ = S ? "top" : "left", b = S ? "bottom" : "right",
|
|
1105
|
-
let $ = g ? g[
|
|
1106
|
-
(!$ || !await (i.isElement == null ? void 0 : i.isElement(g))) && ($ = r.floating[
|
|
1107
|
-
const V = C / 2 - k / 2, F = $ / 2 - x[y] / 2 - 1,
|
|
1104
|
+
}, m = lt(s), y = st(m), x = await i.getDimensions(d), S = m === "y", _ = S ? "top" : "left", b = S ? "bottom" : "right", E = S ? "clientHeight" : "clientWidth", C = l.reference[y] + l.reference[m] - h[m] - l.floating[y], k = h[m] - l.reference[m], g = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
1105
|
+
let $ = g ? g[E] : 0;
|
|
1106
|
+
(!$ || !await (i.isElement == null ? void 0 : i.isElement(g))) && ($ = r.floating[E] || l.floating[y]);
|
|
1107
|
+
const V = C / 2 - k / 2, F = $ / 2 - x[y] / 2 - 1, L = ke(f[_], F), z = ke(f[b], F), A = L, M = $ - x[y] - z, D = $ / 2 - x[y] / 2 + V, W = Je(A, D, M), X = !a.arrow && Re(s) != null && D !== W && l.reference[y] / 2 - (D < A ? L : z) - x[y] / 2 < 0, J = X ? D < A ? D - A : D - M : 0;
|
|
1108
1108
|
return {
|
|
1109
1109
|
[m]: h[m] + J,
|
|
1110
1110
|
data: {
|
|
@@ -1141,31 +1141,31 @@ const wo = (e) => ({
|
|
|
1141
1141
|
} = Oe(e, t);
|
|
1142
1142
|
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
1143
1143
|
return {};
|
|
1144
|
-
const _ = ye(s), b = ye(r) === r,
|
|
1145
|
-
!h && y !== "none" && C.push(...yo(r, x, y,
|
|
1144
|
+
const _ = ye(s), b = ye(r) === r, E = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), C = h || (b || !x ? [Me(r)] : mo(r));
|
|
1145
|
+
!h && y !== "none" && C.push(...yo(r, x, y, E));
|
|
1146
1146
|
const k = [r, ...C], g = await Lt(t, S), $ = [];
|
|
1147
1147
|
let V = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
1148
1148
|
if (v && $.push(g[_]), f) {
|
|
1149
|
-
const
|
|
1150
|
-
$.push(g[
|
|
1149
|
+
const A = vo(s, i, E);
|
|
1150
|
+
$.push(g[A[0]], g[A[1]]);
|
|
1151
1151
|
}
|
|
1152
1152
|
if (V = [...V, {
|
|
1153
1153
|
placement: s,
|
|
1154
1154
|
overflows: $
|
|
1155
|
-
}], !$.every((
|
|
1156
|
-
var F,
|
|
1157
|
-
const
|
|
1155
|
+
}], !$.every((A) => A <= 0)) {
|
|
1156
|
+
var F, L;
|
|
1157
|
+
const A = (((F = l.flip) == null ? void 0 : F.index) || 0) + 1, M = k[A];
|
|
1158
1158
|
if (M)
|
|
1159
1159
|
return {
|
|
1160
1160
|
data: {
|
|
1161
|
-
index:
|
|
1161
|
+
index: A,
|
|
1162
1162
|
overflows: V
|
|
1163
1163
|
},
|
|
1164
1164
|
reset: {
|
|
1165
1165
|
placement: M
|
|
1166
1166
|
}
|
|
1167
1167
|
};
|
|
1168
|
-
let D = (
|
|
1168
|
+
let D = (L = V.filter((W) => W.overflows[0] <= 0).sort((W, X) => W.overflows[1] - X.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
1169
1169
|
if (!D)
|
|
1170
1170
|
switch (m) {
|
|
1171
1171
|
case "bestFit": {
|
|
@@ -1270,12 +1270,12 @@ const ko = function(e) {
|
|
|
1270
1270
|
}, v = await Lt(t, a), f = Fe(ye(s)), h = St(f);
|
|
1271
1271
|
let m = d[h], y = d[f];
|
|
1272
1272
|
if (l) {
|
|
1273
|
-
const S = h === "y" ? "top" : "left", _ = h === "y" ? "bottom" : "right", b = m + v[S],
|
|
1274
|
-
m = Je(b, m,
|
|
1273
|
+
const S = h === "y" ? "top" : "left", _ = h === "y" ? "bottom" : "right", b = m + v[S], E = m - v[_];
|
|
1274
|
+
m = Je(b, m, E);
|
|
1275
1275
|
}
|
|
1276
1276
|
if (i) {
|
|
1277
|
-
const S = f === "y" ? "top" : "left", _ = f === "y" ? "bottom" : "right", b = y + v[S],
|
|
1278
|
-
y = Je(b, y,
|
|
1277
|
+
const S = f === "y" ? "top" : "left", _ = f === "y" ? "bottom" : "right", b = y + v[S], E = y - v[_];
|
|
1278
|
+
y = Je(b, y, E);
|
|
1279
1279
|
}
|
|
1280
1280
|
const x = r.fn({
|
|
1281
1281
|
...t,
|
|
@@ -1430,8 +1430,8 @@ function be(e, t, n, o) {
|
|
|
1430
1430
|
const h = Q(l), m = o && ae(o) ? Q(o) : o;
|
|
1431
1431
|
let y = h, x = y.frameElement;
|
|
1432
1432
|
for (; x && o && m !== y; ) {
|
|
1433
|
-
const S = xe(x), _ = x.getBoundingClientRect(), b = te(x),
|
|
1434
|
-
a *= S.x, d *= S.y, v *= S.x, f *= S.y, a +=
|
|
1433
|
+
const S = xe(x), _ = x.getBoundingClientRect(), b = te(x), E = _.left + (x.clientLeft + parseFloat(b.paddingLeft)) * S.x, C = _.top + (x.clientTop + parseFloat(b.paddingTop)) * S.y;
|
|
1434
|
+
a *= S.x, d *= S.y, v *= S.x, f *= S.y, a += E, d += C, y = Q(x), x = y.frameElement;
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
1437
|
return De({
|
|
@@ -1661,17 +1661,17 @@ function Wo(e, t) {
|
|
|
1661
1661
|
rootMargin: -m + "px " + -y + "px " + -x + "px " + -S + "px",
|
|
1662
1662
|
threshold: ge(0, ke(1, a)) || 1
|
|
1663
1663
|
};
|
|
1664
|
-
let
|
|
1664
|
+
let E = !0;
|
|
1665
1665
|
function C(k) {
|
|
1666
1666
|
const g = k[0].intersectionRatio;
|
|
1667
1667
|
if (g !== a) {
|
|
1668
|
-
if (!
|
|
1668
|
+
if (!E)
|
|
1669
1669
|
return i();
|
|
1670
1670
|
g ? i(!1, g) : o = setTimeout(() => {
|
|
1671
1671
|
i(!1, 1e-7);
|
|
1672
1672
|
}, 100);
|
|
1673
1673
|
}
|
|
1674
|
-
|
|
1674
|
+
E = !1;
|
|
1675
1675
|
}
|
|
1676
1676
|
try {
|
|
1677
1677
|
n = new IntersectionObserver(C, {
|
|
@@ -1705,8 +1705,8 @@ function jo(e, t, n, o) {
|
|
|
1705
1705
|
i && (m = new ResizeObserver((_) => {
|
|
1706
1706
|
let [b] = _;
|
|
1707
1707
|
b && b.target === d && m && (m.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1708
|
-
var
|
|
1709
|
-
(
|
|
1708
|
+
var E;
|
|
1709
|
+
(E = m) == null || E.observe(t);
|
|
1710
1710
|
})), n();
|
|
1711
1711
|
}), d && !a && m.observe(d), m.observe(t));
|
|
1712
1712
|
let y, x = a ? be(e) : null;
|
|
@@ -1853,7 +1853,7 @@ const Xo = ["data-side"], Tt = /* @__PURE__ */ Pe({
|
|
|
1853
1853
|
y: S,
|
|
1854
1854
|
contentRef: _,
|
|
1855
1855
|
middlewareData: b
|
|
1856
|
-
} = Go({ middleware: s, placement: l, strategy: i }, h),
|
|
1856
|
+
} = Go({ middleware: s, placement: l, strategy: i }, h), E = T(() => l.value.split("-")[0]), C = T(() => ({ left: x.value + "px", top: S.value + "px" })), k = T(() => {
|
|
1857
1857
|
if (!n.showArrow)
|
|
1858
1858
|
return {};
|
|
1859
1859
|
const { arrow: g } = oe(b);
|
|
@@ -1876,7 +1876,7 @@ const Xo = ["data-side"], Tt = /* @__PURE__ */ Pe({
|
|
|
1876
1876
|
ref: _,
|
|
1877
1877
|
class: O(["abl-popper", `is-${e.effect}`, e.popperClass]),
|
|
1878
1878
|
style: R(C.value),
|
|
1879
|
-
"data-side":
|
|
1879
|
+
"data-side": E.value,
|
|
1880
1880
|
onMousedown: $[0] || ($[0] = P(() => {
|
|
1881
1881
|
}, ["stop"]))
|
|
1882
1882
|
}, [
|
|
@@ -2554,29 +2554,29 @@ const Is = /* @__PURE__ */ c("div", {
|
|
|
2554
2554
|
},
|
|
2555
2555
|
emits: ["close"],
|
|
2556
2556
|
setup(e, { emit: t }) {
|
|
2557
|
-
const n = typeof window < "u" && typeof document < "u", o = e, s = T(() => o.previewSrcList.length), l = w(Array(s.value).fill(!1)), i = w(o.initialIndex), r = w(1), a = w(0), d = w(0), v = w(0), f = w(0), h = w(0), m = t, y = (
|
|
2558
|
-
let
|
|
2557
|
+
const n = typeof window < "u" && typeof document < "u", o = e, s = T(() => o.previewSrcList.length), l = w(Array(s.value).fill(!1)), i = w(o.initialIndex), r = w(1), a = w(0), d = w(0), v = w(0), f = w(0), h = w(0), m = t, y = (L, z) => {
|
|
2558
|
+
let A, M;
|
|
2559
2559
|
try {
|
|
2560
|
-
|
|
2560
|
+
A = L.toString().split(".")[1].length;
|
|
2561
2561
|
} catch {
|
|
2562
|
-
|
|
2562
|
+
A = 0;
|
|
2563
2563
|
}
|
|
2564
2564
|
try {
|
|
2565
2565
|
M = z.toString().split(".")[1].length;
|
|
2566
2566
|
} catch {
|
|
2567
2567
|
M = 0;
|
|
2568
2568
|
}
|
|
2569
|
-
const D = Math.max(
|
|
2570
|
-
return
|
|
2571
|
-
}, x = (
|
|
2572
|
-
l.value[
|
|
2573
|
-
}, S = (
|
|
2569
|
+
const D = Math.max(A, M), W = Math.pow(10, D);
|
|
2570
|
+
return L = Math.round(L * W), z = Math.round(z * W), (L + z) / W;
|
|
2571
|
+
}, x = (L) => {
|
|
2572
|
+
l.value[L] = !0;
|
|
2573
|
+
}, S = (L) => {
|
|
2574
2574
|
i.value = (i.value + 1) % s.value;
|
|
2575
|
-
}, _ = (
|
|
2575
|
+
}, _ = (L) => {
|
|
2576
2576
|
i.value = (i.value - 1 + s.value) % s.value;
|
|
2577
2577
|
}, b = () => {
|
|
2578
2578
|
r.value + o.zoomRate > o.maxScale ? r.value = o.maxScale : r.value = y(r.value, o.zoomRate);
|
|
2579
|
-
},
|
|
2579
|
+
}, E = () => {
|
|
2580
2580
|
r.value - o.zoomRate < o.minScale ? r.value = o.minScale : r.value = y(r.value, -o.zoomRate);
|
|
2581
2581
|
}, C = () => {
|
|
2582
2582
|
h.value -= 90;
|
|
@@ -2584,25 +2584,25 @@ const Is = /* @__PURE__ */ c("div", {
|
|
|
2584
2584
|
h.value += 90;
|
|
2585
2585
|
}, g = () => {
|
|
2586
2586
|
h.value = 0, r.value = 1, v.value = 0, f.value = 0;
|
|
2587
|
-
}, $ = (
|
|
2588
|
-
console.log("e====",
|
|
2589
|
-
const z =
|
|
2590
|
-
a.value =
|
|
2587
|
+
}, $ = (L) => {
|
|
2588
|
+
console.log("e====", L);
|
|
2589
|
+
const z = L.target, { top: A, left: M, right: D, bottom: W } = z.getBoundingClientRect(), X = document.documentElement.clientWidth, J = document.documentElement.clientHeight;
|
|
2590
|
+
a.value = L.clientX, d.value = L.clientY;
|
|
2591
2591
|
const pe = v.value, Le = f.value;
|
|
2592
2592
|
document.onmousemove = (Ke) => {
|
|
2593
2593
|
v.value = pe + Ke.clientX - a.value, f.value = Le + Ke.clientY - d.value;
|
|
2594
2594
|
}, document.onmouseup = (Ke) => {
|
|
2595
|
-
v.value > pe + X - D && (v.value = pe + X - D), v.value < pe - M && (v.value = pe - M), f.value > Le + J - W && (f.value = Le + J - W), f.value < Le -
|
|
2595
|
+
v.value > pe + X - D && (v.value = pe + X - D), v.value < pe - M && (v.value = pe - M), f.value > Le + J - W && (f.value = Le + J - W), f.value < Le - A && (f.value = Le - A), document.onmousemove = null;
|
|
2596
2596
|
};
|
|
2597
|
-
}, V = (
|
|
2598
|
-
const z =
|
|
2597
|
+
}, V = (L) => {
|
|
2598
|
+
const z = L.deltaY * o.zoomRate * 0.1;
|
|
2599
2599
|
r.value === o.minScale && z > 0 || r.value === o.maxScale && z < 0 || (r.value - z < o.minScale ? r.value = o.minScale : r.value - z > o.maxScale ? r.value = o.maxScale : r.value = y(r.value, -z));
|
|
2600
2600
|
}, F = () => {
|
|
2601
2601
|
m("close");
|
|
2602
2602
|
};
|
|
2603
2603
|
return Ce(() => {
|
|
2604
2604
|
n && (o.modelValue ? (document.body.style.overflow = "hidden", document.body.style.touchAction = "none") : (document.body.style.overflow = "", document.body.style.touchAction = ""));
|
|
2605
|
-
}), (
|
|
2605
|
+
}), (L, z) => (u(), ee(He, { to: "body" }, [
|
|
2606
2606
|
Z(ne, { name: "mask" }, {
|
|
2607
2607
|
default: K(() => [
|
|
2608
2608
|
Is
|
|
@@ -2616,19 +2616,19 @@ const Is = /* @__PURE__ */ c("div", {
|
|
|
2616
2616
|
default: K(() => [
|
|
2617
2617
|
c("div", {
|
|
2618
2618
|
class: "abl-image-preview-wrap",
|
|
2619
|
-
onWheel: z[2] || (z[2] = P((
|
|
2619
|
+
onWheel: z[2] || (z[2] = P((A) => V(A), ["prevent"]))
|
|
2620
2620
|
}, [
|
|
2621
2621
|
c("div", Os, [
|
|
2622
2622
|
c("div", {
|
|
2623
2623
|
class: "abl-image-preview",
|
|
2624
2624
|
style: R(`transform: translate3d(${v.value}px, ${f.value}px, 0px);`)
|
|
2625
2625
|
}, [
|
|
2626
|
-
(u(!0), p(H, null, G(e.previewSrcList, (
|
|
2626
|
+
(u(!0), p(H, null, G(e.previewSrcList, (A, M) => U((u(), p("div", {
|
|
2627
2627
|
key: M,
|
|
2628
2628
|
class: "abl-image-preview__box"
|
|
2629
2629
|
}, [
|
|
2630
2630
|
c("img", {
|
|
2631
|
-
src:
|
|
2631
|
+
src: A,
|
|
2632
2632
|
class: "abl-image-preview__img",
|
|
2633
2633
|
style: R(`transform: scale3d(${r.value}, ${r.value}, 1) rotate(${h.value}deg);`),
|
|
2634
2634
|
onLoad: (D) => x(M),
|
|
@@ -2636,7 +2636,7 @@ const Is = /* @__PURE__ */ c("div", {
|
|
|
2636
2636
|
onClick: z[1] || (z[1] = P(() => {
|
|
2637
2637
|
}, ["stop"]))
|
|
2638
2638
|
}, null, 44, Rs),
|
|
2639
|
-
B(
|
|
2639
|
+
B(L.$slots, "default"),
|
|
2640
2640
|
e.showProgress ? (u(), p("div", Vs, [
|
|
2641
2641
|
c("div", Ts, N(`${i.value + 1}/${s.value}`), 1)
|
|
2642
2642
|
])) : I("", !0)
|
|
@@ -2662,7 +2662,7 @@ const Is = /* @__PURE__ */ c("div", {
|
|
|
2662
2662
|
c("div", js, [
|
|
2663
2663
|
c("i", {
|
|
2664
2664
|
class: "abl-icon",
|
|
2665
|
-
onClick: P(
|
|
2665
|
+
onClick: P(E, ["stop"])
|
|
2666
2666
|
}, Us),
|
|
2667
2667
|
c("i", {
|
|
2668
2668
|
class: "abl-icon",
|
|
@@ -3826,14 +3826,14 @@ const El = (e) => (ie("data-v-b55ca1d7"), e = e(), re(), e), zl = ["onClick"], B
|
|
|
3826
3826
|
$ > 0 && (v.value = $ - 1);
|
|
3827
3827
|
}, b = () => {
|
|
3828
3828
|
l.closeOnClickMask && S();
|
|
3829
|
-
},
|
|
3829
|
+
}, E = ve({
|
|
3830
3830
|
...Be(l),
|
|
3831
3831
|
onClose: S,
|
|
3832
3832
|
current: f
|
|
3833
3833
|
}), C = Al(() => {
|
|
3834
3834
|
h.value && S();
|
|
3835
3835
|
});
|
|
3836
|
-
return ze(Vl,
|
|
3836
|
+
return ze(Vl, E), _e(() => {
|
|
3837
3837
|
_();
|
|
3838
3838
|
}), (g, $) => (u(), p("div", {
|
|
3839
3839
|
class: "abl-dropdown",
|
|
@@ -3851,7 +3851,7 @@ const El = (e) => (ie("data-v-b55ca1d7"), e = e(), re(), e), zl = ["onClick"], B
|
|
|
3851
3851
|
(u(!0), p(H, null, G(i.value, (V, F) => (u(), p("div", {
|
|
3852
3852
|
class: "abl-dropdown-menu__item",
|
|
3853
3853
|
key: F,
|
|
3854
|
-
onClick: P((
|
|
3854
|
+
onClick: P((L) => y(V, F), ["stop"])
|
|
3855
3855
|
}, [
|
|
3856
3856
|
c("span", {
|
|
3857
3857
|
class: "abl-dropdown-menu__item__title",
|
|
@@ -4099,7 +4099,7 @@ const Jl = {
|
|
|
4099
4099
|
U(c("input", $e({
|
|
4100
4100
|
ref_key: "inputRef",
|
|
4101
4101
|
ref: l,
|
|
4102
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
4102
|
+
"onUpdate:modelValue": b[0] || (b[0] = (E) => v.value = E),
|
|
4103
4103
|
class: "abl-input__inner",
|
|
4104
4104
|
type: a.value,
|
|
4105
4105
|
placeholder: e.placeholder,
|
|
@@ -4309,7 +4309,7 @@ const ct = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ha = { class: "abl-
|
|
|
4309
4309
|
}
|
|
4310
4310
|
}, m = t, y = function(C, k) {
|
|
4311
4311
|
n.beforeUpload(C) ? (n.maxCount > s.value && s.value++, n.uploadMode === "base64" && (l.value[k] = !0, x(C, k)), n.uploadMode === "custom" && (l.value[k] = !0, S(C, k))) : le(() => {
|
|
4312
|
-
|
|
4312
|
+
E(n.errorInfo);
|
|
4313
4313
|
});
|
|
4314
4314
|
}, x = (C, k) => {
|
|
4315
4315
|
var g = new FileReader();
|
|
@@ -4334,7 +4334,7 @@ const ct = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ha = { class: "abl-
|
|
|
4334
4334
|
n.customRequest(C).then((g) => {
|
|
4335
4335
|
o.value.push(g), m("update:fileList", o.value), m("change", o.value);
|
|
4336
4336
|
}).catch((g) => {
|
|
4337
|
-
n.maxCount > 1 && (s.value = o.value.length + 1),
|
|
4337
|
+
n.maxCount > 1 && (s.value = o.value.length + 1), E(g);
|
|
4338
4338
|
}).finally(() => {
|
|
4339
4339
|
l.value[k] = !1;
|
|
4340
4340
|
});
|
|
@@ -4348,7 +4348,7 @@ const ct = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ha = { class: "abl-
|
|
|
4348
4348
|
o.value.length < n.maxCount && s.value--;
|
|
4349
4349
|
const k = o.value.splice(C, 1);
|
|
4350
4350
|
m("remove", k), m("update:fileList", o.value), m("change", o.value);
|
|
4351
|
-
},
|
|
4351
|
+
}, E = (C) => {
|
|
4352
4352
|
ot({ type: "error", text: C, duration: 1e3, top: 100 });
|
|
4353
4353
|
};
|
|
4354
4354
|
return (C, k) => (u(), p("div", ha, [
|
|
@@ -4431,7 +4431,7 @@ const ct = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ha = { class: "abl-
|
|
|
4431
4431
|
]));
|
|
4432
4432
|
}
|
|
4433
4433
|
}, za = /* @__PURE__ */ q(Ea, [["__scopeId", "data-v-f9427f11"]]);
|
|
4434
|
-
const Ba = (e) => (ie("data-v-
|
|
4434
|
+
const Ba = (e) => (ie("data-v-4679b9c7"), e = e(), re(), e), Ia = { class: "abl-select-warpper-content" }, Oa = { class: "abl-select-input" }, Ra = { class: "abl-select-has-content" }, Va = {
|
|
4435
4435
|
key: 0,
|
|
4436
4436
|
class: "abl-select-tag-warpper"
|
|
4437
4437
|
}, Ta = ["onClick"], Na = { key: 1 }, Ma = /* @__PURE__ */ Ba(() => /* @__PURE__ */ c("span", { class: "abl-select-icon" }, [
|
|
@@ -4482,7 +4482,15 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4482
4482
|
emits: ["update:modelValue", "changeSelect"],
|
|
4483
4483
|
setup(e, { emit: t }) {
|
|
4484
4484
|
var F;
|
|
4485
|
-
const n = e
|
|
4485
|
+
const n = e;
|
|
4486
|
+
n.type == "single" ? n == null || n.options.map((L) => {
|
|
4487
|
+
L.value == n.modelValue && (L.selected = !0);
|
|
4488
|
+
}) : n == null || n.options.map((L) => {
|
|
4489
|
+
n.modelValue.map((z) => {
|
|
4490
|
+
L.value == z && (L.selected = !0);
|
|
4491
|
+
});
|
|
4492
|
+
});
|
|
4493
|
+
const o = t, s = ve({
|
|
4486
4494
|
effect: "light",
|
|
4487
4495
|
pure: !0,
|
|
4488
4496
|
trigger: "click",
|
|
@@ -4495,71 +4503,71 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4495
4503
|
}), m = w(!1), y = w(
|
|
4496
4504
|
n.search && a.value === "focus" && m.value
|
|
4497
4505
|
), x = w(n.disabled), S = w(n.mode === "tag"), _ = w(""), b = ve(
|
|
4498
|
-
(F = n == null ? void 0 : n.options) == null ? void 0 : F.filter((
|
|
4499
|
-
),
|
|
4506
|
+
(F = n == null ? void 0 : n.options) == null ? void 0 : F.filter((L) => L.selected === !0)
|
|
4507
|
+
), E = (L) => {
|
|
4500
4508
|
if (!y.value)
|
|
4501
4509
|
_.value = "";
|
|
4502
4510
|
else {
|
|
4503
|
-
const z = n.options.filter((
|
|
4511
|
+
const z = n.options.filter((A) => A.name.includes(L.target.value));
|
|
4504
4512
|
h.list = z;
|
|
4505
4513
|
}
|
|
4506
|
-
}, C = (
|
|
4514
|
+
}, C = (L) => {
|
|
4507
4515
|
if (n.teleport == "body") {
|
|
4508
|
-
const
|
|
4516
|
+
const A = L.target.getBoundingClientRect(), M = A.left, D = A.top + (document.documentElement.scrollTop || document.body.scrollTop);
|
|
4509
4517
|
f.value = {
|
|
4510
|
-
top: D +
|
|
4518
|
+
top: D + A.height + 5 + "px",
|
|
4511
4519
|
left: M + "px",
|
|
4512
|
-
width:
|
|
4520
|
+
width: A.width + "px"
|
|
4513
4521
|
};
|
|
4514
4522
|
}
|
|
4515
|
-
n.disabled || (m.value = !0,
|
|
4516
|
-
}, k = (
|
|
4523
|
+
n.disabled || (m.value = !0, L.stopPropagation(), a.value === "focus" ? a.value = "blur" : a.value = "focus");
|
|
4524
|
+
}, k = (L, z) => {
|
|
4517
4525
|
var M;
|
|
4518
4526
|
if (n.disabled)
|
|
4519
4527
|
return;
|
|
4520
4528
|
m.value = !1, z.stopPropagation(), (M = r.value) == null || M.focus();
|
|
4521
|
-
let
|
|
4529
|
+
let A = null;
|
|
4522
4530
|
if (n.type === "single")
|
|
4523
|
-
a.value = "blur", b[0] && b[0].value ===
|
|
4531
|
+
a.value = "blur", b[0] && b[0].value === L.value ? b.shift() : b[0] = L, A = L.value;
|
|
4524
4532
|
else {
|
|
4525
|
-
|
|
4526
|
-
const D = b.findIndex((W) => W.value ===
|
|
4527
|
-
D > -1 ? b.splice(D, 1) : b.push(
|
|
4528
|
-
|
|
4533
|
+
A || (A = []);
|
|
4534
|
+
const D = b.findIndex((W) => W.value === L.value);
|
|
4535
|
+
D > -1 ? b.splice(D, 1) : b.push(L), b.map((W) => {
|
|
4536
|
+
A.push(W.value);
|
|
4529
4537
|
});
|
|
4530
4538
|
}
|
|
4531
|
-
o("update:modelValue",
|
|
4539
|
+
o("update:modelValue", A), o("changeSelect", Ge(b)), d.value.close();
|
|
4532
4540
|
}, g = () => {
|
|
4533
|
-
var E;
|
|
4534
|
-
(E = r.value) == null || E.focus(), !y.value && a.value === "focus" && b.length > 0 && (b.pop(), o("changeSelect", Ge(b)));
|
|
4535
|
-
}, $ = (E) => {
|
|
4536
4541
|
var L;
|
|
4537
|
-
(L = r.value) == null || L.focus();
|
|
4538
|
-
|
|
4542
|
+
(L = r.value) == null || L.focus(), !y.value && a.value === "focus" && b.length > 0 && (b.pop(), o("changeSelect", Ge(b)));
|
|
4543
|
+
}, $ = (L) => {
|
|
4544
|
+
var A;
|
|
4545
|
+
(A = r.value) == null || A.focus();
|
|
4546
|
+
const z = b.findIndex((M) => M.value === L.value);
|
|
4539
4547
|
b.splice(z, 1), o("changeSelect", Ge(b));
|
|
4540
4548
|
}, V = () => {
|
|
4541
4549
|
a.value = "blur";
|
|
4542
4550
|
};
|
|
4543
4551
|
return me(
|
|
4544
4552
|
m,
|
|
4545
|
-
(
|
|
4546
|
-
y.value = n.search && a.value === "focus" &&
|
|
4553
|
+
(L) => {
|
|
4554
|
+
y.value = n.search && a.value === "focus" && L;
|
|
4547
4555
|
},
|
|
4548
4556
|
{ immediate: !0, deep: !0 }
|
|
4549
4557
|
), me(
|
|
4550
4558
|
b,
|
|
4551
|
-
(
|
|
4552
|
-
l.value =
|
|
4559
|
+
(L) => {
|
|
4560
|
+
l.value = L.map((z) => z == null ? void 0 : z.name).join(",");
|
|
4553
4561
|
},
|
|
4554
4562
|
{ immediate: !0, deep: !0 }
|
|
4555
4563
|
), _e(() => {
|
|
4556
|
-
me(a, (
|
|
4557
|
-
var z,
|
|
4558
|
-
|
|
4564
|
+
me(a, (L) => {
|
|
4565
|
+
var z, A;
|
|
4566
|
+
L === "focus" ? (z = r.value) == null || z.focus() : (A = r.value) == null || A.blur(), y.value = n.search && L === "focus" && m;
|
|
4559
4567
|
}), document.body.addEventListener("click", () => {
|
|
4560
4568
|
a.value = "blur";
|
|
4561
4569
|
});
|
|
4562
|
-
}), (
|
|
4570
|
+
}), (L, z) => (u(), p("div", {
|
|
4563
4571
|
ref_key: "selectRef",
|
|
4564
4572
|
ref: i
|
|
4565
4573
|
}, [
|
|
@@ -4572,11 +4580,11 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4572
4580
|
class: "abl-select-options-warpper",
|
|
4573
4581
|
style: R(v.value)
|
|
4574
4582
|
}, [
|
|
4575
|
-
h.list.length > 0 ? (u(!0), p(H, { key: 0 }, G(h.list, (
|
|
4576
|
-
class: O(["abl-select-options-item", b.some((M) => M.value ===
|
|
4577
|
-
key:
|
|
4578
|
-
onClick: (M) => k(
|
|
4579
|
-
}, N(
|
|
4583
|
+
h.list.length > 0 ? (u(!0), p(H, { key: 0 }, G(h.list, (A) => (u(), p("div", {
|
|
4584
|
+
class: O(["abl-select-options-item", b.some((M) => M.value === A.value) ? "abl-options-item-active" : ""]),
|
|
4585
|
+
key: A.name + A.value,
|
|
4586
|
+
onClick: (M) => k(A, M)
|
|
4587
|
+
}, N(A.name), 11, Da))), 128)) : (u(), p("div", Pa, " 暂无数据 "))
|
|
4580
4588
|
], 4)
|
|
4581
4589
|
]),
|
|
4582
4590
|
default: K(() => [
|
|
@@ -4590,14 +4598,14 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4590
4598
|
c("div", Oa, [
|
|
4591
4599
|
U(c("div", Ra, [
|
|
4592
4600
|
S.value ? (u(), p("div", Va, [
|
|
4593
|
-
(u(!0), p(H, null, G(b, (
|
|
4601
|
+
(u(!0), p(H, null, G(b, (A) => (u(), p("div", {
|
|
4594
4602
|
class: "abl-select-tag",
|
|
4595
|
-
key:
|
|
4603
|
+
key: A.value
|
|
4596
4604
|
}, [
|
|
4597
|
-
j(N(
|
|
4605
|
+
j(N(A.name) + " ", 1),
|
|
4598
4606
|
c("span", {
|
|
4599
4607
|
class: "abl-select-tag-close",
|
|
4600
|
-
onClick: P((M) => $(
|
|
4608
|
+
onClick: P((M) => $(A), ["stop"])
|
|
4601
4609
|
}, "x", 8, Ta)
|
|
4602
4610
|
]))), 128))
|
|
4603
4611
|
])) : (u(), p("span", Na, N(l.value), 1))
|
|
@@ -4605,13 +4613,13 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4605
4613
|
[Y, b.length && !y.value]
|
|
4606
4614
|
]),
|
|
4607
4615
|
U(c("input", {
|
|
4608
|
-
onBlur: z[0] || (z[0] = (
|
|
4616
|
+
onBlur: z[0] || (z[0] = (A) => V()),
|
|
4609
4617
|
type: "text",
|
|
4610
4618
|
class: O(["abl-select-input-focus", y.value ? "abl-select-input-search" : ""]),
|
|
4611
4619
|
ref_key: "inputFocus",
|
|
4612
4620
|
ref: r,
|
|
4613
|
-
"onUpdate:modelValue": z[1] || (z[1] = (
|
|
4614
|
-
onInput:
|
|
4621
|
+
"onUpdate:modelValue": z[1] || (z[1] = (A) => _.value = A),
|
|
4622
|
+
onInput: E,
|
|
4615
4623
|
placeholder: "请输入筛选条件"
|
|
4616
4624
|
}, null, 34), [
|
|
4617
4625
|
[en, _.value]
|
|
@@ -4628,7 +4636,7 @@ const Ba = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Ia = { class: "abl-
|
|
|
4628
4636
|
}, 16, ["disabled"])
|
|
4629
4637
|
], 512));
|
|
4630
4638
|
}
|
|
4631
|
-
}, Fa = /* @__PURE__ */ q(Ha, [["__scopeId", "data-v-
|
|
4639
|
+
}, Fa = /* @__PURE__ */ q(Ha, [["__scopeId", "data-v-4679b9c7"]]);
|
|
4632
4640
|
const Wa = { class: "abl-header" }, ja = { class: "abl-title" }, qa = { class: "abl-extra" }, Ua = { key: 0 }, Ka = ["colspan"], Ga = { key: 1 }, Ya = {
|
|
4633
4641
|
__name: "index",
|
|
4634
4642
|
props: {
|
|
@@ -4694,27 +4702,27 @@ const Wa = { class: "abl-header" }, ja = { class: "abl-title" }, qa = { class: "
|
|
|
4694
4702
|
const S = y.length;
|
|
4695
4703
|
let _ = [];
|
|
4696
4704
|
for (let b = 0; b < S; b++) {
|
|
4697
|
-
const
|
|
4705
|
+
const E = {
|
|
4698
4706
|
span: Math.min(y[b].dataset.span, x),
|
|
4699
4707
|
element: y[b]
|
|
4700
4708
|
};
|
|
4701
|
-
h(_) < x ? (
|
|
4709
|
+
h(_) < x ? (E.span = Math.min(E.span, x - h(_)), b === S - 1 && (E.span = x - h(_)), _.push(E), b === S - 1 && a.value.push(_)) : (a.value.push(_), _ = [E], b === S - 1 && (E.span = x, a.value.push(_)));
|
|
4702
4710
|
}
|
|
4703
4711
|
t.bordered ? le(() => {
|
|
4704
|
-
a.value.forEach((b,
|
|
4712
|
+
a.value.forEach((b, E) => {
|
|
4705
4713
|
b.forEach((C) => {
|
|
4706
4714
|
const k = Array.from(C.element.children), g = k[0].cloneNode(!0);
|
|
4707
4715
|
g.colSpan = 1, m(g, t.labelStyle), m(g, JSON.parse(C.element.dataset.labelStyle));
|
|
4708
4716
|
const $ = k[1].cloneNode(!0);
|
|
4709
|
-
$.colSpan = C.span * 2 - 1, m($, t.contentStyle), m($, JSON.parse(C.element.dataset.contentStyle)), r.value[
|
|
4717
|
+
$.colSpan = C.span * 2 - 1, m($, t.contentStyle), m($, JSON.parse(C.element.dataset.contentStyle)), r.value[E].appendChild(g), r.value[E].appendChild($);
|
|
4710
4718
|
});
|
|
4711
4719
|
});
|
|
4712
4720
|
}) : le(() => {
|
|
4713
|
-
y.forEach((b,
|
|
4721
|
+
y.forEach((b, E) => {
|
|
4714
4722
|
const C = Array.from(b.children), k = C[0];
|
|
4715
4723
|
m(k, t.labelStyle), m(k, JSON.parse(b.dataset.labelStyle));
|
|
4716
4724
|
const g = C[1];
|
|
4717
|
-
m(g, t.contentStyle), m(g, JSON.parse(b.dataset.contentStyle)), i.value[
|
|
4725
|
+
m(g, t.contentStyle), m(g, JSON.parse(b.dataset.contentStyle)), i.value[E].appendChild(b);
|
|
4718
4726
|
});
|
|
4719
4727
|
});
|
|
4720
4728
|
}
|
|
@@ -4763,13 +4771,13 @@ const Wa = { class: "abl-header" }, ja = { class: "abl-title" }, qa = { class: "
|
|
|
4763
4771
|
}))), 128)) : I("", !0)
|
|
4764
4772
|
])) : (u(), p("tbody", Ua, [
|
|
4765
4773
|
(u(!0), p(H, null, G(a.value, (S, _) => (u(), p("tr", { key: _ }, [
|
|
4766
|
-
(u(!0), p(H, null, G(S, (b,
|
|
4774
|
+
(u(!0), p(H, null, G(S, (b, E) => (u(), p("td", {
|
|
4767
4775
|
ref_for: !0,
|
|
4768
4776
|
ref_key: "cols",
|
|
4769
4777
|
ref: i,
|
|
4770
4778
|
class: "abl-item-td",
|
|
4771
4779
|
colspan: b.span,
|
|
4772
|
-
key:
|
|
4780
|
+
key: E
|
|
4773
4781
|
}, null, 8, Ka))), 128))
|
|
4774
4782
|
]))), 128))
|
|
4775
4783
|
]))
|