abl-ui 0.1.24 → 0.1.26
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 +103 -100
- 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
|
@@ -991,7 +991,7 @@ const $o = async (e, t, n) => {
|
|
|
991
991
|
} = ht(d, o, a), h = o, m = {}, g = 0;
|
|
992
992
|
for (let w = 0; w < r.length; w++) {
|
|
993
993
|
const {
|
|
994
|
-
name:
|
|
994
|
+
name: S,
|
|
995
995
|
fn: x
|
|
996
996
|
} = r[w], {
|
|
997
997
|
x: b,
|
|
@@ -1014,8 +1014,8 @@ const $o = async (e, t, n) => {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
v = b ?? v, f = A ?? f, m = {
|
|
1016
1016
|
...m,
|
|
1017
|
-
[
|
|
1018
|
-
...m[
|
|
1017
|
+
[S]: {
|
|
1018
|
+
...m[S],
|
|
1019
1019
|
...C
|
|
1020
1020
|
}
|
|
1021
1021
|
}, _ && g <= 50 && (g++, typeof _ == "object" && (_.placement && (h = _.placement), _.rects && (d = _.rects === !0 ? await i.getElementRects({
|
|
@@ -1051,8 +1051,8 @@ async function Et(e, t) {
|
|
|
1051
1051
|
elementContext: f = "floating",
|
|
1052
1052
|
altBoundary: h = !1,
|
|
1053
1053
|
padding: m = 0
|
|
1054
|
-
} = Re(t, e), g = At(m),
|
|
1055
|
-
element: (n = await (l.isElement == null ? void 0 : l.isElement(
|
|
1054
|
+
} = Re(t, e), g = At(m), S = r[h ? f === "floating" ? "reference" : "floating" : f], x = De(await l.getClippingRect({
|
|
1055
|
+
element: (n = await (l.isElement == null ? void 0 : l.isElement(S))) == null || n ? S : S.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(r.floating)),
|
|
1056
1056
|
boundary: d,
|
|
1057
1057
|
rootBoundary: v,
|
|
1058
1058
|
strategy: a
|
|
@@ -1100,10 +1100,10 @@ const ko = (e) => ({
|
|
|
1100
1100
|
const f = At(v), h = {
|
|
1101
1101
|
x: n,
|
|
1102
1102
|
y: o
|
|
1103
|
-
}, m = it(s), g = at(m), w = await i.getDimensions(d),
|
|
1104
|
-
let
|
|
1105
|
-
(!
|
|
1106
|
-
const O = C / 2 - _ / 2, F =
|
|
1103
|
+
}, m = it(s), g = at(m), w = await i.getDimensions(d), S = m === "y", x = S ? "top" : "left", b = S ? "bottom" : "right", A = S ? "clientHeight" : "clientWidth", C = l.reference[g] + l.reference[m] - h[m] - l.floating[g], _ = h[m] - l.reference[m], y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
1104
|
+
let k = y ? y[A] : 0;
|
|
1105
|
+
(!k || !await (i.isElement == null ? void 0 : i.isElement(y))) && (k = r.floating[A] || l.floating[g]);
|
|
1106
|
+
const O = C / 2 - _ / 2, F = k / 2 - w[g] / 2 - 1, E = Ce(f[x], F), z = Ce(f[b], F), L = E, M = k - w[g] - z, D = k / 2 - w[g] / 2 + O, W = Qe(L, D, M), X = !a.arrow && Oe(s) != null && D !== W && l.reference[g] / 2 - (D < L ? E : z) - w[g] / 2 < 0, J = X ? D < L ? D - L : D - M : 0;
|
|
1107
1107
|
return {
|
|
1108
1108
|
[m]: h[m] + J,
|
|
1109
1109
|
data: {
|
|
@@ -1136,22 +1136,22 @@ const ko = (e) => ({
|
|
|
1136
1136
|
fallbackStrategy: m = "bestFit",
|
|
1137
1137
|
fallbackAxisSideDirection: g = "none",
|
|
1138
1138
|
flipAlignment: w = !0,
|
|
1139
|
-
...
|
|
1139
|
+
...S
|
|
1140
1140
|
} = Re(e, t);
|
|
1141
1141
|
if ((n = l.arrow) != null && n.alignmentOffset)
|
|
1142
1142
|
return {};
|
|
1143
1143
|
const x = be(s), b = be(r) === r, A = await (a.isRTL == null ? void 0 : a.isRTL(d.floating)), C = h || (b || !w ? [Me(r)] : bo(r));
|
|
1144
1144
|
!h && g !== "none" && C.push(...wo(r, w, g, A));
|
|
1145
|
-
const _ = [r, ...C], y = await Et(t,
|
|
1145
|
+
const _ = [r, ...C], y = await Et(t, S), k = [];
|
|
1146
1146
|
let O = ((o = l.flip) == null ? void 0 : o.overflows) || [];
|
|
1147
|
-
if (v &&
|
|
1147
|
+
if (v && k.push(y[x]), f) {
|
|
1148
1148
|
const L = yo(s, i, A);
|
|
1149
|
-
|
|
1149
|
+
k.push(y[L[0]], y[L[1]]);
|
|
1150
1150
|
}
|
|
1151
1151
|
if (O = [...O, {
|
|
1152
1152
|
placement: s,
|
|
1153
|
-
overflows:
|
|
1154
|
-
}], !
|
|
1153
|
+
overflows: k
|
|
1154
|
+
}], !k.every((L) => L <= 0)) {
|
|
1155
1155
|
var F, E;
|
|
1156
1156
|
const L = (((F = l.flip) == null ? void 0 : F.index) || 0) + 1, M = _[L];
|
|
1157
1157
|
if (M)
|
|
@@ -1251,11 +1251,11 @@ const Lo = function(e) {
|
|
|
1251
1251
|
mainAxis: l = !0,
|
|
1252
1252
|
crossAxis: i = !1,
|
|
1253
1253
|
limiter: r = {
|
|
1254
|
-
fn: (
|
|
1254
|
+
fn: (S) => {
|
|
1255
1255
|
let {
|
|
1256
1256
|
x,
|
|
1257
1257
|
y: b
|
|
1258
|
-
} =
|
|
1258
|
+
} = S;
|
|
1259
1259
|
return {
|
|
1260
1260
|
x,
|
|
1261
1261
|
y: b
|
|
@@ -1269,11 +1269,11 @@ const Lo = function(e) {
|
|
|
1269
1269
|
}, v = await Et(t, a), f = Fe(be(s)), h = Lt(f);
|
|
1270
1270
|
let m = d[h], g = d[f];
|
|
1271
1271
|
if (l) {
|
|
1272
|
-
const
|
|
1272
|
+
const S = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", b = m + v[S], A = m - v[x];
|
|
1273
1273
|
m = Qe(b, m, A);
|
|
1274
1274
|
}
|
|
1275
1275
|
if (i) {
|
|
1276
|
-
const
|
|
1276
|
+
const S = f === "y" ? "top" : "left", x = f === "y" ? "bottom" : "right", b = g + v[S], A = g - v[x];
|
|
1277
1277
|
g = Qe(b, g, A);
|
|
1278
1278
|
}
|
|
1279
1279
|
const w = r.fn({
|
|
@@ -1429,8 +1429,8 @@ function _e(e, t, n, o) {
|
|
|
1429
1429
|
const h = ee(l), m = o && ae(o) ? ee(o) : o;
|
|
1430
1430
|
let g = h, w = g.frameElement;
|
|
1431
1431
|
for (; w && o && m !== g; ) {
|
|
1432
|
-
const
|
|
1433
|
-
a *=
|
|
1432
|
+
const S = $e(w), x = w.getBoundingClientRect(), b = ne(w), A = x.left + (w.clientLeft + parseFloat(b.paddingLeft)) * S.x, C = x.top + (w.clientTop + parseFloat(b.paddingTop)) * S.y;
|
|
1433
|
+
a *= S.x, d *= S.y, v *= S.x, f *= S.y, a += A, d += C, g = ee(w), w = g.frameElement;
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
return De({
|
|
@@ -1656,8 +1656,8 @@ function Uo(e, t) {
|
|
|
1656
1656
|
} = e.getBoundingClientRect();
|
|
1657
1657
|
if (r || t(), !f || !h)
|
|
1658
1658
|
return;
|
|
1659
|
-
const m = Te(v), g = Te(s.clientWidth - (d + f)), w = Te(s.clientHeight - (v + h)),
|
|
1660
|
-
rootMargin: -m + "px " + -g + "px " + -w + "px " + -
|
|
1659
|
+
const m = Te(v), g = Te(s.clientWidth - (d + f)), w = Te(s.clientHeight - (v + h)), S = Te(d), b = {
|
|
1660
|
+
rootMargin: -m + "px " + -g + "px " + -w + "px " + -S + "px",
|
|
1661
1661
|
threshold: ge(0, Ce(1, a)) || 1
|
|
1662
1662
|
};
|
|
1663
1663
|
let A = !0;
|
|
@@ -1709,10 +1709,10 @@ function Ko(e, t, n, o) {
|
|
|
1709
1709
|
})), n();
|
|
1710
1710
|
}), d && !a && m.observe(d), m.observe(t));
|
|
1711
1711
|
let g, w = a ? _e(e) : null;
|
|
1712
|
-
a &&
|
|
1713
|
-
function
|
|
1712
|
+
a && S();
|
|
1713
|
+
function S() {
|
|
1714
1714
|
const x = _e(e);
|
|
1715
|
-
w && (x.x !== w.x || x.y !== w.y || x.width !== w.width || x.height !== w.height) && n(), w = x, g = requestAnimationFrame(
|
|
1715
|
+
w && (x.x !== w.x || x.y !== w.y || x.width !== w.width || x.height !== w.height) && n(), w = x, g = requestAnimationFrame(S);
|
|
1716
1716
|
}
|
|
1717
1717
|
return n(), () => {
|
|
1718
1718
|
var x;
|
|
@@ -1861,7 +1861,7 @@ const es = ["data-side"], Mt = /* @__PURE__ */ Pe({
|
|
|
1861
1861
|
} = Qo({ hover: a }), {
|
|
1862
1862
|
x: g,
|
|
1863
1863
|
y: w,
|
|
1864
|
-
contentRef:
|
|
1864
|
+
contentRef: S,
|
|
1865
1865
|
middlewareData: x
|
|
1866
1866
|
} = Zo({ middleware: l, placement: i, strategy: r }, v), b = T(() => i.value.split("-")[0]), A = T(() => ({ left: g.value + "px", top: w.value + "px" })), C = T(() => {
|
|
1867
1867
|
if (!n.showArrow)
|
|
@@ -1895,7 +1895,7 @@ const es = ["data-side"], Mt = /* @__PURE__ */ Pe({
|
|
|
1895
1895
|
Z(f) ? (u(), p("div", {
|
|
1896
1896
|
key: 0,
|
|
1897
1897
|
ref_key: "contentRef",
|
|
1898
|
-
ref:
|
|
1898
|
+
ref: S,
|
|
1899
1899
|
class: R(["abl-popper", `is-${e.effect}`, e.popperClass]),
|
|
1900
1900
|
style: V(A.value),
|
|
1901
1901
|
"data-side": b.value,
|
|
@@ -2016,7 +2016,7 @@ const ts = ["innerHTML"], Dt = /* @__PURE__ */ Pe({
|
|
|
2016
2016
|
type: String,
|
|
2017
2017
|
default: ""
|
|
2018
2018
|
}
|
|
2019
|
-
}, i = Gt(), r = $(), a = (w,
|
|
2019
|
+
}, i = Gt(), r = $(), a = (w, S) => S.reduce((x, b) => (x[b] = w[b], x), {}), d = T(() => ({ ...i, ...a(n, Object.keys(l)) })), f = (() => {
|
|
2020
2020
|
const w = Yt();
|
|
2021
2021
|
return T(() => {
|
|
2022
2022
|
if (w != null && w.slots.default) {
|
|
@@ -2038,7 +2038,7 @@ const ts = ["innerHTML"], Dt = /* @__PURE__ */ Pe({
|
|
|
2038
2038
|
update: h,
|
|
2039
2039
|
open: m,
|
|
2040
2040
|
close: g
|
|
2041
|
-
}), (w,
|
|
2041
|
+
}), (w, S) => (u(), te(Mt, ye({
|
|
2042
2042
|
ref_key: "popperRef",
|
|
2043
2043
|
ref: r
|
|
2044
2044
|
}, d.value, { nowrap: Z(f) }), {
|
|
@@ -2601,7 +2601,7 @@ const Ns = /* @__PURE__ */ c("div", {
|
|
|
2601
2601
|
return E = Math.round(E * W), z = Math.round(z * W), (E + z) / W;
|
|
2602
2602
|
}, w = (E) => {
|
|
2603
2603
|
l.value[E] = !0;
|
|
2604
|
-
},
|
|
2604
|
+
}, S = (E) => {
|
|
2605
2605
|
i.value = (i.value + 1) % s.value;
|
|
2606
2606
|
}, x = (E) => {
|
|
2607
2607
|
i.value = (i.value - 1 + s.value) % s.value;
|
|
@@ -2615,7 +2615,7 @@ const Ns = /* @__PURE__ */ c("div", {
|
|
|
2615
2615
|
h.value += 90;
|
|
2616
2616
|
}, y = () => {
|
|
2617
2617
|
h.value = 0, r.value = 1, v.value = 0, f.value = 0;
|
|
2618
|
-
},
|
|
2618
|
+
}, k = (E) => {
|
|
2619
2619
|
console.log("e====", E);
|
|
2620
2620
|
const z = E.target, { top: L, left: M, right: D, bottom: W } = z.getBoundingClientRect(), X = document.documentElement.clientWidth, J = document.documentElement.clientHeight;
|
|
2621
2621
|
a.value = E.clientX, d.value = E.clientY;
|
|
@@ -2663,7 +2663,7 @@ const Ns = /* @__PURE__ */ c("div", {
|
|
|
2663
2663
|
class: "abl-image-preview__img",
|
|
2664
2664
|
style: V(`transform: scale3d(${r.value}, ${r.value}, 1) rotate(${h.value}deg);`),
|
|
2665
2665
|
onLoad: (D) => w(M),
|
|
2666
|
-
onMousedown: z[0] || (z[0] = P((D) =>
|
|
2666
|
+
onMousedown: z[0] || (z[0] = P((D) => k(D), ["prevent"])),
|
|
2667
2667
|
onClick: z[1] || (z[1] = P(() => {
|
|
2668
2668
|
}, ["stop"]))
|
|
2669
2669
|
}, null, 44, Ds),
|
|
@@ -2682,7 +2682,7 @@ const Ns = /* @__PURE__ */ c("div", {
|
|
|
2682
2682
|
}, Ws),
|
|
2683
2683
|
c("div", {
|
|
2684
2684
|
class: "abl-image-preview__btn abl-image-preview__next",
|
|
2685
|
-
onClick: P(
|
|
2685
|
+
onClick: P(S, ["stop"])
|
|
2686
2686
|
}, qs)
|
|
2687
2687
|
], 64)) : B("", !0),
|
|
2688
2688
|
c("div", {
|
|
@@ -3747,7 +3747,7 @@ const Il = /* @__PURE__ */ c("svg", {
|
|
|
3747
3747
|
document.removeEventListener("click", n);
|
|
3748
3748
|
}), t;
|
|
3749
3749
|
};
|
|
3750
|
-
const Ol = (e) => (ie("data-v-
|
|
3750
|
+
const Ol = (e) => (ie("data-v-345cb48d"), e = e(), re(), e), Vl = ["onClick"], Tl = {
|
|
3751
3751
|
focusable: "false",
|
|
3752
3752
|
"data-icon": "caret-up",
|
|
3753
3753
|
width: "1em",
|
|
@@ -3810,15 +3810,18 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3810
3810
|
setup(e, { emit: t }) {
|
|
3811
3811
|
var _;
|
|
3812
3812
|
const n = t, o = St(), s = typeof window < "u" && typeof document < "u", l = e, i = $([]);
|
|
3813
|
-
i.value = (_ = o.default()) == null ? void 0 : _.map((
|
|
3814
|
-
|
|
3815
|
-
|
|
3813
|
+
i.value = (_ = o.default()) == null ? void 0 : _.map((y) => {
|
|
3814
|
+
console.log("node===", y), console.log(y.type.__name);
|
|
3815
|
+
const { props: k } = y;
|
|
3816
|
+
if (k) {
|
|
3817
|
+
console.log("props", k);
|
|
3818
|
+
const { title: O, disabled: F } = k;
|
|
3816
3819
|
return {
|
|
3817
|
-
title:
|
|
3818
|
-
disabled:
|
|
3820
|
+
title: O,
|
|
3821
|
+
disabled: F
|
|
3819
3822
|
};
|
|
3820
3823
|
}
|
|
3821
|
-
});
|
|
3824
|
+
}), console.log("menuList.value", i.value);
|
|
3822
3825
|
const r = $(), a = $(), d = $(!1), v = $(0), f = $(""), h = $(!1), m = (y) => typeof y == "number" ? y + "px" : y;
|
|
3823
3826
|
me(
|
|
3824
3827
|
() => d.value,
|
|
@@ -3830,21 +3833,21 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3830
3833
|
immediate: !0
|
|
3831
3834
|
}
|
|
3832
3835
|
);
|
|
3833
|
-
const g = (y,
|
|
3834
|
-
if (!i.value[
|
|
3835
|
-
if (
|
|
3836
|
-
|
|
3837
|
-
a.value.children[
|
|
3836
|
+
const g = (y, k) => {
|
|
3837
|
+
if (!i.value[k].disabled) {
|
|
3838
|
+
if (k === f.value && l.closeOnClickSelf) {
|
|
3839
|
+
S(), setTimeout(() => {
|
|
3840
|
+
a.value.children[k].style.display = "none";
|
|
3838
3841
|
}, l.duration);
|
|
3839
3842
|
return;
|
|
3840
3843
|
}
|
|
3841
|
-
h.value = !0, w(
|
|
3844
|
+
h.value = !0, w(k);
|
|
3842
3845
|
}
|
|
3843
3846
|
}, w = async (y) => {
|
|
3844
|
-
v.value <= 0 && await x(), d.value = !0, f.value = y, console.log("index", y), console.log("childrenRef.value", a.value.children), Array.from(a.value.children).map((
|
|
3847
|
+
v.value <= 0 && await x(), d.value = !0, f.value = y, console.log("index", y), console.log("childrenRef.value", a.value.children), Array.from(a.value.children).map((k, O) => {
|
|
3845
3848
|
O === y ? a.value.children[O].style.display = "block" : a.value.children[O].style.display = "none";
|
|
3846
3849
|
}), n("open", f.value);
|
|
3847
|
-
},
|
|
3850
|
+
}, S = () => {
|
|
3848
3851
|
d.value = !1, f.value = 99999, setTimeout(() => {
|
|
3849
3852
|
h.value = !1;
|
|
3850
3853
|
}, 300);
|
|
@@ -3852,20 +3855,20 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3852
3855
|
var O;
|
|
3853
3856
|
if (!s)
|
|
3854
3857
|
return;
|
|
3855
|
-
const { top: y, bottom:
|
|
3856
|
-
|
|
3858
|
+
const { top: y, bottom: k } = (O = r == null ? void 0 : r.value) == null ? void 0 : O.getBoundingClientRect();
|
|
3859
|
+
k > 0 && (v.value = k - 1);
|
|
3857
3860
|
}, b = () => {
|
|
3858
|
-
l.closeOnClickMask &&
|
|
3861
|
+
l.closeOnClickMask && S();
|
|
3859
3862
|
}, A = de({
|
|
3860
3863
|
...Be(l),
|
|
3861
|
-
onClose:
|
|
3864
|
+
onClose: S,
|
|
3862
3865
|
current: f
|
|
3863
3866
|
}), C = Rl(() => {
|
|
3864
|
-
h.value &&
|
|
3867
|
+
h.value && S();
|
|
3865
3868
|
});
|
|
3866
3869
|
return ke(Pl, A), we(() => {
|
|
3867
3870
|
x();
|
|
3868
|
-
}), (y,
|
|
3871
|
+
}), (y, k) => (u(), p("div", {
|
|
3869
3872
|
class: "abl-dropdown",
|
|
3870
3873
|
ref_key: "root",
|
|
3871
3874
|
ref: C
|
|
@@ -3910,7 +3913,7 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3910
3913
|
}
|
|
3911
3914
|
]),
|
|
3912
3915
|
onClick: b,
|
|
3913
|
-
onTouchmove:
|
|
3916
|
+
onTouchmove: k[1] || (k[1] = P(() => {
|
|
3914
3917
|
}, ["prevent"]))
|
|
3915
3918
|
}, [
|
|
3916
3919
|
Q(oe, { name: "fade-mask" }, {
|
|
@@ -3924,7 +3927,7 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3924
3927
|
Q(oe, { name: "slide-top" }, {
|
|
3925
3928
|
default: K(() => [
|
|
3926
3929
|
U(c("div", {
|
|
3927
|
-
onTouchmove:
|
|
3930
|
+
onTouchmove: k[0] || (k[0] = P(() => {
|
|
3928
3931
|
}, ["prevent"])),
|
|
3929
3932
|
class: "abl-dropdown__content",
|
|
3930
3933
|
ref_key: "childrenRef",
|
|
@@ -3942,7 +3945,7 @@ const Ol = (e) => (ie("data-v-383b92e8"), e = e(), re(), e), Vl = ["onClick"], T
|
|
|
3942
3945
|
])
|
|
3943
3946
|
], 512));
|
|
3944
3947
|
}
|
|
3945
|
-
}, Fl = /* @__PURE__ */ q(Hl, [["__scopeId", "data-v-
|
|
3948
|
+
}, Fl = /* @__PURE__ */ q(Hl, [["__scopeId", "data-v-345cb48d"]]);
|
|
3946
3949
|
const Wl = (e) => (ie("data-v-046e593c"), e = e(), re(), e), jl = ["active"], ql = { class: "abl-dropdown-item__options" }, Ul = {
|
|
3947
3950
|
class: "icon",
|
|
3948
3951
|
style: { width: "1em", height: "1em", "vertical-align": "middle", fill: "currentColor", overflow: "hidden" },
|
|
@@ -4100,7 +4103,7 @@ const na = {
|
|
|
4100
4103
|
function w() {
|
|
4101
4104
|
d.value = o.clearable && v.value;
|
|
4102
4105
|
}
|
|
4103
|
-
function
|
|
4106
|
+
function S() {
|
|
4104
4107
|
d.value = !1;
|
|
4105
4108
|
}
|
|
4106
4109
|
return t({
|
|
@@ -4120,7 +4123,7 @@ const na = {
|
|
|
4120
4123
|
c("div", {
|
|
4121
4124
|
class: R(["abl-input__wrapper", { "is-focus": i.value }]),
|
|
4122
4125
|
onMouseenter: w,
|
|
4123
|
-
onMouseleave:
|
|
4126
|
+
onMouseleave: S
|
|
4124
4127
|
}, [
|
|
4125
4128
|
x.$slots.prefix || e.prefixIcon ? (u(), p("span", na, [
|
|
4126
4129
|
I(x.$slots, "prefix", {}, void 0, !0),
|
|
@@ -4322,8 +4325,8 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4322
4325
|
const _ = /\.(jpg|jpeg|png|gif|webp)$/i, y = /^data:image/;
|
|
4323
4326
|
return _.test(C) || y.test(C);
|
|
4324
4327
|
}, v = (C, _) => {
|
|
4325
|
-
var
|
|
4326
|
-
const y = (
|
|
4328
|
+
var k;
|
|
4329
|
+
const y = (k = C.dataTransfer) == null ? void 0 : k.files;
|
|
4327
4330
|
if (y != null && y.length) {
|
|
4328
4331
|
const O = y.length;
|
|
4329
4332
|
for (let F = 0; F < O && _ + F <= n.maxCount; F++)
|
|
@@ -4335,35 +4338,35 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4335
4338
|
}, h = (C, _) => {
|
|
4336
4339
|
const y = C.target.files;
|
|
4337
4340
|
if (y != null && y.length) {
|
|
4338
|
-
const
|
|
4339
|
-
for (let O = 0; O <
|
|
4341
|
+
const k = y.length;
|
|
4342
|
+
for (let O = 0; O < k && _ + O < n.maxCount; O++)
|
|
4340
4343
|
g(y[O], _ + O);
|
|
4341
4344
|
i.value[_].value = "";
|
|
4342
4345
|
}
|
|
4343
4346
|
}, m = t, g = function(C, _) {
|
|
4344
|
-
n.beforeUpload(C) ? (n.maxCount > s.value && s.value++, n.uploadMode === "base64" && (l.value[_] = !0, w(C, _)), n.uploadMode === "custom" && (l.value[_] = !0,
|
|
4347
|
+
n.beforeUpload(C) ? (n.maxCount > s.value && s.value++, n.uploadMode === "base64" && (l.value[_] = !0, w(C, _)), n.uploadMode === "custom" && (l.value[_] = !0, S(C, _))) : le(() => {
|
|
4345
4348
|
A(n.errorInfo);
|
|
4346
4349
|
});
|
|
4347
4350
|
}, w = (C, _) => {
|
|
4348
4351
|
var y = new FileReader();
|
|
4349
|
-
y.readAsDataURL(C), y.onloadstart = function(
|
|
4350
|
-
console.log("开始读取 onloadstart:",
|
|
4351
|
-
}, y.onabort = function(
|
|
4352
|
-
console.log("读取中止 onabort:",
|
|
4353
|
-
}, y.onerror = function(
|
|
4354
|
-
console.log("读取错误 onerror:",
|
|
4355
|
-
}, y.onprogress = function(
|
|
4356
|
-
|
|
4357
|
-
}, y.onload = function(
|
|
4352
|
+
y.readAsDataURL(C), y.onloadstart = function(k) {
|
|
4353
|
+
console.log("开始读取 onloadstart:", k);
|
|
4354
|
+
}, y.onabort = function(k) {
|
|
4355
|
+
console.log("读取中止 onabort:", k);
|
|
4356
|
+
}, y.onerror = function(k) {
|
|
4357
|
+
console.log("读取错误 onerror:", k);
|
|
4358
|
+
}, y.onprogress = function(k) {
|
|
4359
|
+
k.loaded === k.total && (l.value[_] = !1);
|
|
4360
|
+
}, y.onload = function(k) {
|
|
4358
4361
|
var O;
|
|
4359
4362
|
o.value.push({
|
|
4360
4363
|
name: C.name,
|
|
4361
|
-
url: (O =
|
|
4364
|
+
url: (O = k.target) == null ? void 0 : O.result
|
|
4362
4365
|
}), m("update:fileList", o.value), m("change", o.value);
|
|
4363
|
-
}, y.onloadend = function(
|
|
4364
|
-
console.log("读取结束 onloadend:",
|
|
4366
|
+
}, y.onloadend = function(k) {
|
|
4367
|
+
console.log("读取结束 onloadend:", k);
|
|
4365
4368
|
};
|
|
4366
|
-
},
|
|
4369
|
+
}, S = (C, _) => {
|
|
4367
4370
|
n.customRequest(C).then((y) => {
|
|
4368
4371
|
o.value.push(y), m("update:fileList", o.value), m("change", o.value);
|
|
4369
4372
|
}).catch((y) => {
|
|
@@ -4373,7 +4376,7 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4373
4376
|
});
|
|
4374
4377
|
}, x = (C, _) => {
|
|
4375
4378
|
if (d(_)) {
|
|
4376
|
-
const y = o.value.slice(0, C).filter((
|
|
4379
|
+
const y = o.value.slice(0, C).filter((k) => !d(k.url));
|
|
4377
4380
|
r.value[C - y.length].onPreview();
|
|
4378
4381
|
} else
|
|
4379
4382
|
window.open(_);
|
|
@@ -4396,8 +4399,8 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4396
4399
|
}, ["stop", "prevent"])),
|
|
4397
4400
|
onDragover: _[2] || (_[2] = P(() => {
|
|
4398
4401
|
}, ["stop", "prevent"])),
|
|
4399
|
-
onDrop: P((
|
|
4400
|
-
onClick: (
|
|
4402
|
+
onDrop: P((k) => e.disabled ? () => !1 : v(k, y - 1), ["stop", "prevent"]),
|
|
4403
|
+
onClick: (k) => e.disabled ? () => !1 : f(y - 1)
|
|
4401
4404
|
}, [
|
|
4402
4405
|
c("input", {
|
|
4403
4406
|
ref_for: !0,
|
|
@@ -4408,7 +4411,7 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4408
4411
|
}, ["stop"])),
|
|
4409
4412
|
accept: e.accept,
|
|
4410
4413
|
multiple: e.multiple,
|
|
4411
|
-
onChange: (
|
|
4414
|
+
onChange: (k) => h(k, y - 1),
|
|
4412
4415
|
style: { display: "none" }
|
|
4413
4416
|
}, null, 40, xa),
|
|
4414
4417
|
c("div", null, [
|
|
@@ -4448,12 +4451,12 @@ const ut = (e) => (ie("data-v-f9427f11"), e = e(), re(), e), ba = { class: "abl-
|
|
|
4448
4451
|
c("a", {
|
|
4449
4452
|
class: "m-icon",
|
|
4450
4453
|
title: "preview",
|
|
4451
|
-
onClick: (
|
|
4454
|
+
onClick: (k) => x(y - 1, o.value[y - 1].url)
|
|
4452
4455
|
}, Ia, 8, Aa),
|
|
4453
4456
|
U(c("a", {
|
|
4454
4457
|
class: "m-icon",
|
|
4455
4458
|
title: "delete",
|
|
4456
|
-
onClick: P((
|
|
4459
|
+
onClick: P((k) => b(y - 1), ["prevent", "stop"])
|
|
4457
4460
|
}, Ra, 8, za), [
|
|
4458
4461
|
[Y, !e.disabled]
|
|
4459
4462
|
])
|
|
@@ -4527,7 +4530,7 @@ const Ta = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Na = { class: "abl-
|
|
|
4527
4530
|
list: n == null ? void 0 : n.options
|
|
4528
4531
|
}), m = $(!1), g = $(
|
|
4529
4532
|
n.search && a.value === "focus" && m.value
|
|
4530
|
-
), w = $(n.disabled),
|
|
4533
|
+
), w = $(n.disabled), S = $(n.mode === "tag"), x = $(""), b = de(
|
|
4531
4534
|
(F = n == null ? void 0 : n.options) == null ? void 0 : F.filter((E) => E.selected === !0)
|
|
4532
4535
|
), A = (E) => {
|
|
4533
4536
|
if (!g.value)
|
|
@@ -4565,7 +4568,7 @@ const Ta = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Na = { class: "abl-
|
|
|
4565
4568
|
}, y = () => {
|
|
4566
4569
|
var E;
|
|
4567
4570
|
(E = r.value) == null || E.focus(), !g.value && a.value === "focus" && b.length > 0 && (b.pop(), o("changeSelect", Ge(b)));
|
|
4568
|
-
},
|
|
4571
|
+
}, k = (E) => {
|
|
4569
4572
|
var L;
|
|
4570
4573
|
(L = r.value) == null || L.focus();
|
|
4571
4574
|
const z = b.findIndex((M) => M.value === E.value);
|
|
@@ -4622,7 +4625,7 @@ const Ta = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Na = { class: "abl-
|
|
|
4622
4625
|
c("div", Na, [
|
|
4623
4626
|
c("div", Ma, [
|
|
4624
4627
|
U(c("div", Da, [
|
|
4625
|
-
|
|
4628
|
+
S.value ? (u(), p("div", Pa, [
|
|
4626
4629
|
(u(!0), p(H, null, G(b, (L) => (u(), p("div", {
|
|
4627
4630
|
class: "abl-select-tag",
|
|
4628
4631
|
key: L.value
|
|
@@ -4630,7 +4633,7 @@ const Ta = (e) => (ie("data-v-0824ca71"), e = e(), re(), e), Na = { class: "abl-
|
|
|
4630
4633
|
j(N(L.name) + " ", 1),
|
|
4631
4634
|
c("span", {
|
|
4632
4635
|
class: "abl-select-tag-close",
|
|
4633
|
-
onClick: P((M) =>
|
|
4636
|
+
onClick: P((M) => k(L), ["stop"])
|
|
4634
4637
|
}, "x", 8, Ha)
|
|
4635
4638
|
]))), 128))
|
|
4636
4639
|
])) : (u(), p("span", Fa, N(l.value), 1))
|
|
@@ -4724,22 +4727,22 @@ const Ga = { class: "abl-header" }, Ya = { class: "abl-title" }, Xa = { class: "
|
|
|
4724
4727
|
n.value = document.documentElement.clientWidth;
|
|
4725
4728
|
}
|
|
4726
4729
|
function f(g, w) {
|
|
4727
|
-
const
|
|
4730
|
+
const S = g.length;
|
|
4728
4731
|
let x = [];
|
|
4729
|
-
for (let b = 0; b <
|
|
4732
|
+
for (let b = 0; b < S; b++) {
|
|
4730
4733
|
const A = {
|
|
4731
4734
|
span: Math.min(g[b].dataset.span, w),
|
|
4732
4735
|
element: g[b]
|
|
4733
4736
|
};
|
|
4734
|
-
h(x) < w ? (A.span = Math.min(A.span, w - h(x)), b ===
|
|
4737
|
+
h(x) < w ? (A.span = Math.min(A.span, w - h(x)), b === S - 1 && (A.span = w - h(x)), x.push(A), b === S - 1 && a.value.push(x)) : (a.value.push(x), x = [A], b === S - 1 && (A.span = w, a.value.push(x)));
|
|
4735
4738
|
}
|
|
4736
4739
|
t.bordered ? le(() => {
|
|
4737
4740
|
a.value.forEach((b, A) => {
|
|
4738
4741
|
b.forEach((C) => {
|
|
4739
4742
|
const _ = Array.from(C.element.children), y = _[0].cloneNode(!0);
|
|
4740
4743
|
y.colSpan = 1, m(y, t.labelStyle), m(y, JSON.parse(C.element.dataset.labelStyle));
|
|
4741
|
-
const
|
|
4742
|
-
|
|
4744
|
+
const k = _[1].cloneNode(!0);
|
|
4745
|
+
k.colSpan = C.span * 2 - 1, m(k, t.contentStyle), m(k, JSON.parse(C.element.dataset.contentStyle)), r.value[A].appendChild(y), r.value[A].appendChild(k);
|
|
4743
4746
|
});
|
|
4744
4747
|
});
|
|
4745
4748
|
}) : le(() => {
|
|
@@ -4752,11 +4755,11 @@ const Ga = { class: "abl-header" }, Ya = { class: "abl-title" }, Xa = { class: "
|
|
|
4752
4755
|
});
|
|
4753
4756
|
}
|
|
4754
4757
|
function h(g) {
|
|
4755
|
-
return g.reduce((w,
|
|
4758
|
+
return g.reduce((w, S) => w + S.span, 0);
|
|
4756
4759
|
}
|
|
4757
4760
|
function m(g, w) {
|
|
4758
|
-
JSON.stringify(w) !== "{}" && Object.keys(w).forEach((
|
|
4759
|
-
g.style[
|
|
4761
|
+
JSON.stringify(w) !== "{}" && Object.keys(w).forEach((S) => {
|
|
4762
|
+
g.style[S] = w[S];
|
|
4760
4763
|
});
|
|
4761
4764
|
}
|
|
4762
4765
|
return (g, w) => (u(), p("div", {
|
|
@@ -4787,16 +4790,16 @@ const Ga = { class: "abl-header" }, Ya = { class: "abl-title" }, Xa = { class: "
|
|
|
4787
4790
|
}, [
|
|
4788
4791
|
c("table", null, [
|
|
4789
4792
|
e.bordered ? (u(), p("tbody", Qa, [
|
|
4790
|
-
d.value ? (u(!0), p(H, { key: 0 }, G(d.value, (
|
|
4793
|
+
d.value ? (u(!0), p(H, { key: 0 }, G(d.value, (S) => (u(), p("tr", {
|
|
4791
4794
|
ref_for: !0,
|
|
4792
4795
|
ref_key: "rows",
|
|
4793
4796
|
ref: r,
|
|
4794
4797
|
class: "tr-bordered",
|
|
4795
|
-
key:
|
|
4798
|
+
key: S
|
|
4796
4799
|
}))), 128)) : B("", !0)
|
|
4797
4800
|
])) : (u(), p("tbody", Ja, [
|
|
4798
|
-
(u(!0), p(H, null, G(a.value, (
|
|
4799
|
-
(u(!0), p(H, null, G(
|
|
4801
|
+
(u(!0), p(H, null, G(a.value, (S, x) => (u(), p("tr", { key: x }, [
|
|
4802
|
+
(u(!0), p(H, null, G(S, (b, A) => (u(), p("td", {
|
|
4800
4803
|
ref_for: !0,
|
|
4801
4804
|
ref_key: "cols",
|
|
4802
4805
|
ref: i,
|