@vtj/ui 0.8.88 → 0.8.89
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/dist/index.mjs
CHANGED
|
@@ -8,10 +8,10 @@ import { useRouter as gd, RouterView as Sb, useRoute as Sh, routeLocationKey as
|
|
|
8
8
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
9
9
|
* @name @vtj/ui
|
|
10
10
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
11
|
-
* @version 0.8.
|
|
11
|
+
* @version 0.8.89
|
|
12
12
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
13
13
|
*/
|
|
14
|
-
const NI = "0.8.
|
|
14
|
+
const NI = "0.8.89", Ob = {
|
|
15
15
|
default: 14,
|
|
16
16
|
small: 12,
|
|
17
17
|
large: 18
|
|
@@ -1401,7 +1401,7 @@ const r1 = ["src"], sc = /* @__PURE__ */ nt({
|
|
|
1401
1401
|
o,
|
|
1402
1402
|
s,
|
|
1403
1403
|
r
|
|
1404
|
-
), $ = t1(o, s, r, i), N = n1(o, s, r),
|
|
1404
|
+
), $ = t1(o, s, r, i), N = n1(o, s, r), z = o1(o, a);
|
|
1405
1405
|
id(async () => {
|
|
1406
1406
|
o.modelValue && (await te(), l && r("open", l));
|
|
1407
1407
|
});
|
|
@@ -1418,7 +1418,7 @@ const r1 = ["src"], sc = /* @__PURE__ */ nt({
|
|
|
1418
1418
|
submit: D,
|
|
1419
1419
|
cancel: P,
|
|
1420
1420
|
close: O,
|
|
1421
|
-
componentInstance:
|
|
1421
|
+
componentInstance: z
|
|
1422
1422
|
}), (de, he) => o.modelValue ? (ve(), Ye(Fr, {
|
|
1423
1423
|
key: 0,
|
|
1424
1424
|
to: "body"
|
|
@@ -2438,15 +2438,15 @@ function k1(e, t, n, o, r) {
|
|
|
2438
2438
|
}, D = () => {
|
|
2439
2439
|
x(r.value);
|
|
2440
2440
|
}, P = (K) => {
|
|
2441
|
-
const J = s.value.find((
|
|
2441
|
+
const J = s.value.find((B) => B.url === K.url || B.id === K.id);
|
|
2442
2442
|
J ? E(J) : (s.value.unshift(K), E(K));
|
|
2443
2443
|
}, $ = async (K) => {
|
|
2444
|
-
const { url: J = l.fullPath, icon:
|
|
2444
|
+
const { url: J = l.fullPath, icon: B, title: A } = K || {}, k = a[J], I = fh(), W = ph(J);
|
|
2445
2445
|
return {
|
|
2446
2446
|
id: I,
|
|
2447
2447
|
name: W,
|
|
2448
2448
|
url: J,
|
|
2449
|
-
icon:
|
|
2449
|
+
icon: B,
|
|
2450
2450
|
title: A || b(l.path)?.title || "新建页签",
|
|
2451
2451
|
closable: !0,
|
|
2452
2452
|
menu: K,
|
|
@@ -2456,17 +2456,17 @@ function k1(e, t, n, o, r) {
|
|
|
2456
2456
|
if (await ds.confirm("是否关闭页签", "提示", {
|
|
2457
2457
|
type: "warning"
|
|
2458
2458
|
}).catch(() => !1)) {
|
|
2459
|
-
if (s.value = s.value.filter((
|
|
2460
|
-
const
|
|
2461
|
-
x(
|
|
2459
|
+
if (s.value = s.value.filter((B) => B.id !== K.id), w.value === K.id) {
|
|
2460
|
+
const B = s.value[0];
|
|
2461
|
+
x(B || r.value);
|
|
2462
2462
|
}
|
|
2463
2463
|
return K;
|
|
2464
2464
|
}
|
|
2465
|
-
},
|
|
2466
|
-
const J = s.value.findIndex((
|
|
2465
|
+
}, z = (K) => {
|
|
2466
|
+
const J = s.value.findIndex((B) => B.id === K.id);
|
|
2467
2467
|
if (J >= 0) {
|
|
2468
|
-
const
|
|
2469
|
-
s.value.splice(J, 1, Object.assign(
|
|
2468
|
+
const B = s.value[J];
|
|
2469
|
+
s.value.splice(J, 1, Object.assign(B, K));
|
|
2470
2470
|
}
|
|
2471
2471
|
}, ae = async () => {
|
|
2472
2472
|
if (!await ds.confirm("是否关闭全部页签", "提示", {
|
|
@@ -2478,10 +2478,10 @@ function k1(e, t, n, o, r) {
|
|
|
2478
2478
|
if (!await ds.confirm("是否关闭其他页签", "提示", {
|
|
2479
2479
|
type: "warning"
|
|
2480
2480
|
}).catch(() => !1)) return;
|
|
2481
|
-
const J = s.value.filter((
|
|
2482
|
-
return s.value = s.value.filter((
|
|
2481
|
+
const J = s.value.filter((B) => B.id !== w.value);
|
|
2482
|
+
return s.value = s.value.filter((B) => B.id === w.value), J;
|
|
2483
2483
|
}, he = (K) => {
|
|
2484
|
-
const J = s.value.filter((
|
|
2484
|
+
const J = s.value.filter((B) => B.id !== K.id);
|
|
2485
2485
|
s.value = [K, ...J], E(K);
|
|
2486
2486
|
}, Z = async () => {
|
|
2487
2487
|
await te();
|
|
@@ -2489,8 +2489,8 @@ function k1(e, t, n, o, r) {
|
|
|
2489
2489
|
if (K)
|
|
2490
2490
|
w.value = r.value.id;
|
|
2491
2491
|
else {
|
|
2492
|
-
const
|
|
2493
|
-
P(
|
|
2492
|
+
const B = await $(J);
|
|
2493
|
+
P(B);
|
|
2494
2494
|
}
|
|
2495
2495
|
await te(), o.value = J || null;
|
|
2496
2496
|
};
|
|
@@ -2501,7 +2501,7 @@ function k1(e, t, n, o, r) {
|
|
|
2501
2501
|
currentTab: O,
|
|
2502
2502
|
changeTab: x,
|
|
2503
2503
|
removeTab: N,
|
|
2504
|
-
updateTab:
|
|
2504
|
+
updateTab: z,
|
|
2505
2505
|
addTab: P,
|
|
2506
2506
|
home: r,
|
|
2507
2507
|
tabValue: w,
|
|
@@ -2523,7 +2523,7 @@ function $1(e) {
|
|
|
2523
2523
|
const P = ph(D), $ = {
|
|
2524
2524
|
name: P,
|
|
2525
2525
|
setup() {
|
|
2526
|
-
const N = X(() => o[D] || document.body),
|
|
2526
|
+
const N = X(() => o[D] || document.body), z = X(() => !o[D]), ae = X(() => !n.value.includes(P));
|
|
2527
2527
|
return Qt(
|
|
2528
2528
|
Tb,
|
|
2529
2529
|
wr({ ...E })
|
|
@@ -2531,7 +2531,7 @@ function $1(e) {
|
|
|
2531
2531
|
Fr,
|
|
2532
2532
|
{
|
|
2533
2533
|
to: N.value,
|
|
2534
|
-
disabled:
|
|
2534
|
+
disabled: z.value
|
|
2535
2535
|
},
|
|
2536
2536
|
[h(x)]
|
|
2537
2537
|
) : null;
|
|
@@ -2619,9 +2619,9 @@ const LI = /* @__PURE__ */ nt({
|
|
|
2619
2619
|
activeHome: P,
|
|
2620
2620
|
removeAllTabs: $,
|
|
2621
2621
|
removeOtherTabs: N,
|
|
2622
|
-
dropdownTabs:
|
|
2622
|
+
dropdownTabs: z,
|
|
2623
2623
|
moveToShow: ae
|
|
2624
|
-
} = k1(n, o, u, m, r), { createView: de, openDialog: he, refresh: Z, exclude: K, cleanCache: J, closeDialogs:
|
|
2624
|
+
} = k1(n, o, u, m, r), { createView: de, openDialog: he, refresh: Z, exclude: K, cleanCache: J, closeDialogs: B } = $1({
|
|
2625
2625
|
tabs: x,
|
|
2626
2626
|
updateTab: E,
|
|
2627
2627
|
isCurrentTab: D,
|
|
@@ -2630,10 +2630,10 @@ const LI = /* @__PURE__ */ nt({
|
|
|
2630
2630
|
await O(ce) && await J([ce]);
|
|
2631
2631
|
}, k = async () => {
|
|
2632
2632
|
const ce = await $();
|
|
2633
|
-
ce && (
|
|
2633
|
+
ce && (B(ce), await J(ce));
|
|
2634
2634
|
}, I = async () => {
|
|
2635
2635
|
const ce = await N();
|
|
2636
|
-
ce && (
|
|
2636
|
+
ce && (B(ce), await J(ce));
|
|
2637
2637
|
}, W = (ce) => {
|
|
2638
2638
|
o("actionClick", ce);
|
|
2639
2639
|
}, q = (ce, ke) => {
|
|
@@ -2721,7 +2721,7 @@ const LI = /* @__PURE__ */ nt({
|
|
|
2721
2721
|
onRefresh: F(Z)
|
|
2722
2722
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2723
2723
|
ot(w1, {
|
|
2724
|
-
tabs: F(
|
|
2724
|
+
tabs: F(z),
|
|
2725
2725
|
actions: n.actions,
|
|
2726
2726
|
theme: n.theme,
|
|
2727
2727
|
onCloseOtherTabs: I,
|
|
@@ -5588,8 +5588,8 @@ function o_(e) {
|
|
|
5588
5588
|
const { showHeaderOverflow: s } = r, { showHeaderOverflow: c, minWidth: u } = n, m = f.isUndefined(c) || f.isNull(c) ? s : c, y = m === "title" || (m === !0 || m === "tooltip") || m === "ellipsis", _ = f.floor((f.toNumber(getComputedStyle(o).fontSize) || 14) * 1.6), w = su(o) + su(qr(o, ""));
|
|
5589
5589
|
let O = _ + w;
|
|
5590
5590
|
if (y) {
|
|
5591
|
-
const x = su(qr(o, "--title>.vxe-cell--checkbox")), E = Kl(qr(o, ">.vxe-cell--required-icon")), D = Kl(qr(o, ">.vxe-cell--edit-icon")), P = Kl(qr(o, ">.vxe-cell-title-prefix-icon")), $ = Kl(qr(o, ">.vxe-cell-title-suffix-icon")), N = Kl(qr(o, ">.vxe-cell--sort")),
|
|
5592
|
-
O += x + E + D + P + $ +
|
|
5591
|
+
const x = su(qr(o, "--title>.vxe-cell--checkbox")), E = Kl(qr(o, ">.vxe-cell--required-icon")), D = Kl(qr(o, ">.vxe-cell--edit-icon")), P = Kl(qr(o, ">.vxe-cell-title-prefix-icon")), $ = Kl(qr(o, ">.vxe-cell-title-suffix-icon")), N = Kl(qr(o, ">.vxe-cell--sort")), z = Kl(qr(o, ">.vxe-cell--filter"));
|
|
5592
|
+
O += x + E + D + P + $ + z + N;
|
|
5593
5593
|
}
|
|
5594
5594
|
if (u) {
|
|
5595
5595
|
const { refTableBody: x } = t.getRefMaps(), E = x.value, D = E ? E.$el : null;
|
|
@@ -6465,12 +6465,12 @@ const ci = nt({
|
|
|
6465
6465
|
confirmFilter: s,
|
|
6466
6466
|
resetFilter: u
|
|
6467
6467
|
}, y = (O, x) => {
|
|
6468
|
-
const { filterStore: E } = e, { column: D, multiple: P, maxHeight: $ } = E, { slots: N } = D,
|
|
6469
|
-
if (
|
|
6468
|
+
const { filterStore: E } = e, { column: D, multiple: P, maxHeight: $ } = E, { slots: N } = D, z = N ? N.filter : null, ae = Object.assign({}, o._currFilterParams, { $panel: b, $table: t });
|
|
6469
|
+
if (z)
|
|
6470
6470
|
return [
|
|
6471
6471
|
h("div", {
|
|
6472
6472
|
class: "vxe-table--filter-template"
|
|
6473
|
-
}, t.callSlot(
|
|
6473
|
+
}, t.callSlot(z, ae))
|
|
6474
6474
|
];
|
|
6475
6475
|
if (x && x.renderFilter)
|
|
6476
6476
|
return [
|
|
@@ -6529,16 +6529,16 @@ const ci = nt({
|
|
|
6529
6529
|
}))
|
|
6530
6530
|
];
|
|
6531
6531
|
}, _ = () => {
|
|
6532
|
-
const { filterStore: O } = e, { column: x, multiple: E } = O, D = l.value, P = i.value, $ = x.filterRender, N = $ ? at.renderer.get($.name) : null,
|
|
6532
|
+
const { filterStore: O } = e, { column: x, multiple: E } = O, D = l.value, P = i.value, $ = x.filterRender, N = $ ? at.renderer.get($.name) : null, z = !P && !O.isAllSelected && !O.isIndeterminate;
|
|
6533
6533
|
return E && (!N || N.showFilterFooter !== !1) ? [
|
|
6534
6534
|
h("div", {
|
|
6535
6535
|
class: "vxe-table--filter-footer"
|
|
6536
6536
|
}, [
|
|
6537
6537
|
h("button", {
|
|
6538
6538
|
class: {
|
|
6539
|
-
"is--disabled":
|
|
6539
|
+
"is--disabled": z
|
|
6540
6540
|
},
|
|
6541
|
-
disabled:
|
|
6541
|
+
disabled: z,
|
|
6542
6542
|
onClick: s
|
|
6543
6543
|
}, D.confirmButtonText || T.i18n("vxe.table.confirmFilter")),
|
|
6544
6544
|
h("button", {
|
|
@@ -6592,24 +6592,24 @@ const ci = nt({
|
|
|
6592
6592
|
column: m,
|
|
6593
6593
|
style: null
|
|
6594
6594
|
}), b.options.forEach(($) => {
|
|
6595
|
-
const { _checked: N, checked:
|
|
6596
|
-
$._checked =
|
|
6595
|
+
const { _checked: N, checked: z } = $;
|
|
6596
|
+
$._checked = z, !z && N !== z && P && P({ option: $, column: m, $table: e });
|
|
6597
6597
|
}), this.checkFilterOptions(), b.visible = !0, C.filter = !0, te(() => {
|
|
6598
|
-
const N = r.value.$el,
|
|
6598
|
+
const N = r.value.$el, z = l.value, ae = z ? z.$el : null;
|
|
6599
6599
|
let de = 0, he = 0, Z = null, K = null;
|
|
6600
6600
|
ae && (de = ae.offsetWidth, he = ae.offsetHeight, Z = ae.querySelector(".vxe-table--filter-header"), K = ae.querySelector(".vxe-table--filter-footer"));
|
|
6601
|
-
const J = de / 2,
|
|
6601
|
+
const J = de / 2, B = 10, A = N.clientWidth - de - B;
|
|
6602
6602
|
let k, I;
|
|
6603
6603
|
const W = {
|
|
6604
6604
|
top: `${y.offsetTop + y.offsetParent.offsetTop + y.offsetHeight + 8}px`
|
|
6605
6605
|
};
|
|
6606
6606
|
let q = null;
|
|
6607
6607
|
if (he >= N.clientHeight && (q = Math.max(60, N.clientHeight - (K ? K.offsetHeight : 0) - (Z ? Z.offsetHeight : 0))), m.fixed === "left" ? k = y.offsetLeft + y.offsetParent.offsetLeft - J : m.fixed === "right" ? I = y.offsetParent.offsetWidth - y.offsetLeft + (y.offsetParent.offsetParent.offsetWidth - y.offsetParent.offsetLeft) - m.renderWidth - J : k = y.offsetLeft + y.offsetParent.offsetLeft - J - N.scrollLeft, k) {
|
|
6608
|
-
const ce = _ + de - J +
|
|
6609
|
-
ce > 0 && (k -= ce), W.left = `${Math.min(A, Math.max(
|
|
6608
|
+
const ce = _ + de - J + B - w;
|
|
6609
|
+
ce > 0 && (k -= ce), W.left = `${Math.min(A, Math.max(B, k))}px`;
|
|
6610
6610
|
} else if (I) {
|
|
6611
|
-
const ce = _ + de - J +
|
|
6612
|
-
ce > 0 && (I += ce), W.right = `${Math.max(
|
|
6611
|
+
const ce = _ + de - J + B - w;
|
|
6612
|
+
ce > 0 && (I += ce), W.right = `${Math.max(B, I)}px`;
|
|
6613
6613
|
}
|
|
6614
6614
|
b.style = W, b.maxHeight = q;
|
|
6615
6615
|
});
|
|
@@ -6891,8 +6891,8 @@ const L_ = ["closeMenu"], B_ = {
|
|
|
6891
6891
|
$ ? b.preventDefault() : O && P && P.length && (_.options = P, e.preventEvent(b, "event.showMenu", _, () => {
|
|
6892
6892
|
if (!D || D(_)) {
|
|
6893
6893
|
b.preventDefault(), e.updateZindex();
|
|
6894
|
-
const { scrollTop: N, scrollLeft:
|
|
6895
|
-
let he = b.clientY + N, Z = b.clientX +
|
|
6894
|
+
const { scrollTop: N, scrollLeft: z, visibleHeight: ae, visibleWidth: de } = ol();
|
|
6895
|
+
let he = b.clientY + N, Z = b.clientX + z;
|
|
6896
6896
|
const K = () => {
|
|
6897
6897
|
r._currMenuParams = _, Object.assign(w, {
|
|
6898
6898
|
visible: !0,
|
|
@@ -6907,14 +6907,14 @@ const L_ = ["closeMenu"], B_ = {
|
|
|
6907
6907
|
}
|
|
6908
6908
|
}), te(() => {
|
|
6909
6909
|
const I = a.value.getRefMaps().refElem.value, W = I.clientHeight, q = I.clientWidth, { boundingTop: ce, boundingLeft: ke } = nr(I), xe = ce + W - ae, Ve = ke + q - de;
|
|
6910
|
-
xe > -10 && (w.style.top = `${Math.max(N + 2, he - W - 2)}px`), Ve > -10 && (w.style.left = `${Math.max(
|
|
6910
|
+
xe > -10 && (w.style.top = `${Math.max(N + 2, he - W - 2)}px`), Ve > -10 && (w.style.left = `${Math.max(z + 2, Z - q - 2)}px`);
|
|
6911
6911
|
});
|
|
6912
|
-
}, { keyboard: J, row:
|
|
6913
|
-
J &&
|
|
6914
|
-
const k = e.getCell(
|
|
6912
|
+
}, { keyboard: J, row: B, column: A } = _;
|
|
6913
|
+
J && B && A ? e.scrollToRow(B, A).then(() => {
|
|
6914
|
+
const k = e.getCell(B, A);
|
|
6915
6915
|
if (k) {
|
|
6916
6916
|
const { boundingTop: I, boundingLeft: W } = nr(k);
|
|
6917
|
-
he = I + N + Math.floor(k.offsetHeight / 2), Z = W +
|
|
6917
|
+
he = I + N + Math.floor(k.offsetHeight / 2), Z = W + z + Math.floor(k.offsetWidth / 2);
|
|
6918
6918
|
}
|
|
6919
6919
|
K();
|
|
6920
6920
|
}) : K();
|
|
@@ -6966,7 +6966,7 @@ const L_ = ["closeMenu"], B_ = {
|
|
|
6966
6966
|
* 快捷菜单事件处理
|
|
6967
6967
|
*/
|
|
6968
6968
|
handleGlobalContextmenuEvent(b) {
|
|
6969
|
-
const { mouseConfig: y, menuConfig: _ } = n, { editStore: w, ctxMenuStore: O } = o, { visibleColumn: x } = r, E = i.value, D = a.value, P = s.value, $ = u.value, N = l.value, { selected:
|
|
6969
|
+
const { mouseConfig: y, menuConfig: _ } = n, { editStore: w, ctxMenuStore: O } = o, { visibleColumn: x } = r, E = i.value, D = a.value, P = s.value, $ = u.value, N = l.value, { selected: z } = w, ae = ["header", "body", "footer"];
|
|
6970
6970
|
if (Ot(_)) {
|
|
6971
6971
|
if (O.visible && D && Rt(b, D.getRefMaps().refElem.value).flag) {
|
|
6972
6972
|
b.preventDefault();
|
|
@@ -6980,15 +6980,15 @@ const L_ = ["closeMenu"], B_ = {
|
|
|
6980
6980
|
he.row = Z.row, he.column = Z.column, C(b, de, he);
|
|
6981
6981
|
return;
|
|
6982
6982
|
}
|
|
6983
|
-
} else if (y && P.selected &&
|
|
6984
|
-
he.row =
|
|
6983
|
+
} else if (y && P.selected && z.row && z.column) {
|
|
6984
|
+
he.row = z.row, he.column = z.column, C(b, de, he);
|
|
6985
6985
|
return;
|
|
6986
6986
|
}
|
|
6987
6987
|
}
|
|
6988
6988
|
for (let de = 0; de < ae.length; de++) {
|
|
6989
6989
|
const he = ae[de], Z = Rt(b, N, `vxe-${he}--column`, (J) => J.parentNode.parentNode.parentNode.getAttribute("xid") === t), K = { type: he, $table: e, columns: x.slice(0), $event: b };
|
|
6990
6990
|
if (Z.flag) {
|
|
6991
|
-
const J = Z.targetElem,
|
|
6991
|
+
const J = Z.targetElem, B = e.getColumnNode(J), A = B ? B.item : null;
|
|
6992
6992
|
let k = `${he}-`;
|
|
6993
6993
|
if (A && Object.assign(K, { column: A, columnIndex: e.getColumnIndex(A), cell: J }), he === "body") {
|
|
6994
6994
|
const W = e.getRowNode(J.parentNode), q = W ? W.item : null;
|
|
@@ -7010,9 +7010,9 @@ const L_ = ["closeMenu"], B_ = {
|
|
|
7010
7010
|
b.preventDefault(), b.stopPropagation(), O.selected = y, O.selectChild = _, _ || (O.showChild = as(y), O.showChild && te(() => {
|
|
7011
7011
|
const x = w.nextElementSibling;
|
|
7012
7012
|
if (x) {
|
|
7013
|
-
const { boundingTop: E, boundingLeft: D, visibleHeight: P, visibleWidth: $ } = nr(w), N = E + w.offsetHeight,
|
|
7013
|
+
const { boundingTop: E, boundingLeft: D, visibleHeight: P, visibleWidth: $ } = nr(w), N = E + w.offsetHeight, z = D + w.offsetWidth;
|
|
7014
7014
|
let ae = "", de = "";
|
|
7015
|
-
|
|
7015
|
+
z + x.offsetWidth > $ - 10 && (ae = "auto", de = `${w.offsetWidth}px`);
|
|
7016
7016
|
let he = "", Z = "";
|
|
7017
7017
|
N + x.offsetHeight > P - 10 && (he = "auto", Z = "0"), x.style.left = ae, x.style.right = de, x.style.top = he, x.style.bottom = Z;
|
|
7018
7018
|
}
|
|
@@ -7065,11 +7065,11 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7065
7065
|
(D || P) && (x.mode === "row" ? O.forEach(($) => g(D, $)) : g(D, P));
|
|
7066
7066
|
}
|
|
7067
7067
|
function y(w, O) {
|
|
7068
|
-
const { tableFullTreeData: x, afterFullData: E, fullDataRowIdData: D, fullAllDataRowIdData: P } = o, $ = s.value, { rowField: N, parentField:
|
|
7068
|
+
const { tableFullTreeData: x, afterFullData: E, fullDataRowIdData: D, fullAllDataRowIdData: P } = o, $ = s.value, { rowField: N, parentField: z, mapChildrenField: ae } = $, de = $.children || $.childrenField, he = O ? "push" : "unshift";
|
|
7069
7069
|
w.forEach((Z) => {
|
|
7070
|
-
const K = Z[
|
|
7071
|
-
if (
|
|
7072
|
-
const { item: A } =
|
|
7070
|
+
const K = Z[z], J = Xe(e, Z), B = K ? f.findTree(x, (A) => K === A[N], { children: ae }) : null;
|
|
7071
|
+
if (B) {
|
|
7072
|
+
const { item: A } = B, k = P[Xe(e, A)], I = k ? k.level : 0;
|
|
7073
7073
|
let W = A[de], q = A[ae];
|
|
7074
7074
|
f.isArray(W) || (W = A[de] = []), f.isArray(q) || (q = A[de] = []), W[he](Z), q[he](Z);
|
|
7075
7075
|
const ce = { row: Z, rowid: J, seq: -1, index: -1, _index: -1, $index: -1, items: W, parent: A, level: I + 1 };
|
|
@@ -7082,16 +7082,16 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7082
7082
|
});
|
|
7083
7083
|
}
|
|
7084
7084
|
const _ = (w, O, x) => {
|
|
7085
|
-
const { treeConfig: E } = t, { mergeList: D, editStore: P } = n, { tableFullTreeData: $, afterFullData: N, tableFullData:
|
|
7085
|
+
const { treeConfig: E } = t, { mergeList: D, editStore: P } = n, { tableFullTreeData: $, afterFullData: N, tableFullData: z, fullDataRowIdData: ae, fullAllDataRowIdData: de } = o, he = s.value, { transform: Z, rowField: K, mapChildrenField: J } = he, B = he.children || he.childrenField;
|
|
7086
7086
|
f.isArray(w) || (w = [w]);
|
|
7087
|
-
const A = Kt(e.defineField(w.map((I) => Object.assign(E && Z ? { [J]: [], [
|
|
7087
|
+
const A = Kt(e.defineField(w.map((I) => Object.assign(E && Z ? { [J]: [], [B]: [] } : {}, I))));
|
|
7088
7088
|
if (f.eqNull(O))
|
|
7089
|
-
E && Z ? y(A, !1) : (N.unshift(...A),
|
|
7089
|
+
E && Z ? y(A, !1) : (N.unshift(...A), z.unshift(...A), D.forEach((I) => {
|
|
7090
7090
|
const { row: W } = I;
|
|
7091
7091
|
W > 0 && (I.row = W + A.length);
|
|
7092
7092
|
}));
|
|
7093
7093
|
else if (O === -1)
|
|
7094
|
-
E && Z ? y(A, !0) : (N.push(...A),
|
|
7094
|
+
E && Z ? y(A, !0) : (N.push(...A), z.push(...A), D.forEach((I) => {
|
|
7095
7095
|
const { row: W, rowspan: q } = I;
|
|
7096
7096
|
W + q > N.length && (I.rowspan = q + A.length);
|
|
7097
7097
|
}));
|
|
@@ -7107,7 +7107,7 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7107
7107
|
const j = { row: xe, rowid: je, seq: -1, index: -1, _index: -1, $index: -1, items: q, parent: W, level: ke + 1 };
|
|
7108
7108
|
ae[je] = j, de[je] = j;
|
|
7109
7109
|
}), W) {
|
|
7110
|
-
const xe = f.findTree($, (Ve) => O[K] === Ve[K], { children:
|
|
7110
|
+
const xe = f.findTree($, (Ve) => O[K] === Ve[K], { children: B });
|
|
7111
7111
|
if (xe) {
|
|
7112
7112
|
const Ve = xe.items;
|
|
7113
7113
|
let je = xe.index;
|
|
@@ -7122,7 +7122,7 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7122
7122
|
let I = -1;
|
|
7123
7123
|
if (f.isNumber(O) ? O < N.length && (I = O) : I = e.findRowIndexOf(N, O), x && (I = Math.min(N.length, I + 1)), I === -1)
|
|
7124
7124
|
throw new Error(Cn("vxe.error.unableInsert"));
|
|
7125
|
-
N.splice(I, 0, ...A),
|
|
7125
|
+
N.splice(I, 0, ...A), z.splice(e.findRowIndexOf(z, O), 0, ...A), D.forEach((W) => {
|
|
7126
7126
|
const { row: q, rowspan: ce } = W;
|
|
7127
7127
|
q > I ? W.row = q + A.length : q + ce > I && (W.rowspan = ce + A.length);
|
|
7128
7128
|
});
|
|
@@ -7166,7 +7166,7 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7166
7166
|
* 如果为空则删除所有
|
|
7167
7167
|
*/
|
|
7168
7168
|
remove(w) {
|
|
7169
|
-
const { treeConfig: O } = t, { mergeList: x, editStore: E, selectCheckboxMaps: D } = n, { tableFullTreeData: P, afterFullData: $, tableFullData: N } = o,
|
|
7169
|
+
const { treeConfig: O } = t, { mergeList: x, editStore: E, selectCheckboxMaps: D } = n, { tableFullTreeData: P, afterFullData: $, tableFullData: N } = o, z = a.value, ae = s.value, { transform: de, mapChildrenField: he } = ae, Z = ae.children || ae.childrenField, { actived: K, removeMaps: J, insertMaps: B } = E, { checkField: A } = z;
|
|
7170
7170
|
let k = [];
|
|
7171
7171
|
if (w ? f.isArray(w) || (w = [w]) : w = N, w.forEach((I) => {
|
|
7172
7172
|
if (!e.isInsertByRow(I)) {
|
|
@@ -7203,7 +7203,7 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7203
7203
|
}), $.splice(q, 1));
|
|
7204
7204
|
}), K.row && e.findRowIndexOf(w, K.row) > -1 && c.clearEdit(), w.forEach((I) => {
|
|
7205
7205
|
const W = Xe(e, I);
|
|
7206
|
-
|
|
7206
|
+
B[W] && delete B[W];
|
|
7207
7207
|
}), e.updateFooter(), e.cacheRowMap(), e.handleTableData(O && de), O && de || e.updateAfterDataIndex(), e.checkSelectionStatus(), n.scrollYLoad && e.updateScrollYSpace(), te().then(() => (e.updateCellAreas(), e.recalculate())).then(() => ({ row: k.length ? k[k.length - 1] : null, rows: k }));
|
|
7208
7208
|
},
|
|
7209
7209
|
/**
|
|
@@ -7369,25 +7369,25 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7369
7369
|
* 处理激活编辑
|
|
7370
7370
|
*/
|
|
7371
7371
|
handleActived(w, O) {
|
|
7372
|
-
const { editConfig: x, mouseConfig: E } = t, { editStore: D, tableColumn: P } = n, $ = i.value, { mode: N } = $, { actived:
|
|
7372
|
+
const { editConfig: x, mouseConfig: E } = t, { editStore: D, tableColumn: P } = n, $ = i.value, { mode: N } = $, { actived: z, focused: ae } = D, { row: de, column: he } = w, { editRender: Z } = he, K = w.cell || e.getCell(de, he), J = $.beforeEditMethod || $.activeMethod;
|
|
7373
7373
|
if (w.cell = K, K && Ot(x) && Ot(Z) && !e.hasPendingByRow(de)) {
|
|
7374
|
-
if (
|
|
7375
|
-
let
|
|
7374
|
+
if (z.row !== de || N === "cell" && z.column !== he) {
|
|
7375
|
+
let B = "edit-disabled";
|
|
7376
7376
|
if (!J || J(Object.assign(Object.assign({}, w), { $table: e, $grid: e.xegrid }))) {
|
|
7377
|
-
E && (c.clearSelected(), e.clearCellAreas && (e.clearCellAreas(), e.clearCopyCellArea())), e.closeTooltip(),
|
|
7377
|
+
E && (c.clearSelected(), e.clearCellAreas && (e.clearCellAreas(), e.clearCopyCellArea())), e.closeTooltip(), z.column && c.clearEdit(O), B = "edit-activated", he.renderHeight = K.offsetHeight, z.args = w, z.row = de, z.column = he, N === "row" ? P.forEach((k) => m(de, k)) : m(de, he);
|
|
7378
7378
|
const A = $.afterEditMethod;
|
|
7379
7379
|
te(() => {
|
|
7380
7380
|
u.handleFocus(w, O), A && A(Object.assign(Object.assign({}, w), { $table: e, $grid: e.xegrid }));
|
|
7381
7381
|
});
|
|
7382
7382
|
}
|
|
7383
|
-
e.dispatchEvent(
|
|
7383
|
+
e.dispatchEvent(B, {
|
|
7384
7384
|
row: de,
|
|
7385
7385
|
rowIndex: e.getRowIndex(de),
|
|
7386
7386
|
$rowIndex: e.getVMRowIndex(de),
|
|
7387
7387
|
column: he,
|
|
7388
7388
|
columnIndex: e.getColumnIndex(he),
|
|
7389
7389
|
$columnIndex: e.getVMColumnIndex(he)
|
|
7390
|
-
}, O),
|
|
7390
|
+
}, O), B === "edit-activated" && e.dispatchEvent("edit-actived", {
|
|
7391
7391
|
row: de,
|
|
7392
7392
|
rowIndex: e.getRowIndex(de),
|
|
7393
7393
|
$rowIndex: e.getVMRowIndex(de),
|
|
@@ -7396,12 +7396,12 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7396
7396
|
$columnIndex: e.getVMColumnIndex(he)
|
|
7397
7397
|
}, O);
|
|
7398
7398
|
} else {
|
|
7399
|
-
const { column:
|
|
7400
|
-
if (E && (c.clearSelected(), e.clearCellAreas && (e.clearCellAreas(), e.clearCopyCellArea())),
|
|
7401
|
-
const { model: A } =
|
|
7402
|
-
A.update && Cr(de,
|
|
7399
|
+
const { column: B } = z;
|
|
7400
|
+
if (E && (c.clearSelected(), e.clearCellAreas && (e.clearCellAreas(), e.clearCopyCellArea())), B !== he) {
|
|
7401
|
+
const { model: A } = B;
|
|
7402
|
+
A.update && Cr(de, B, A.value), e.clearValidate && e.clearValidate(de, he);
|
|
7403
7403
|
}
|
|
7404
|
-
he.renderHeight = K.offsetHeight,
|
|
7404
|
+
he.renderHeight = K.offsetHeight, z.args = w, z.column = he, setTimeout(() => {
|
|
7405
7405
|
u.handleFocus(w, O);
|
|
7406
7406
|
});
|
|
7407
7407
|
}
|
|
@@ -7416,12 +7416,12 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7416
7416
|
const { row: O, column: x, cell: E } = w, { editRender: D } = x;
|
|
7417
7417
|
if (Ot(D)) {
|
|
7418
7418
|
const P = cs.get(D.name);
|
|
7419
|
-
let { autofocus: $, autoselect: N } = D,
|
|
7420
|
-
if (!$ && P && ($ = P.autofocus), !N && P && (N = P.autoselect), f.isFunction($) ?
|
|
7419
|
+
let { autofocus: $, autoselect: N } = D, z;
|
|
7420
|
+
if (!$ && P && ($ = P.autofocus), !N && P && (N = P.autoselect), f.isFunction($) ? z = $.call(this, w) : $ && (z = E.querySelector($), z && z.focus()), z) {
|
|
7421
7421
|
if (N)
|
|
7422
|
-
|
|
7422
|
+
z.select();
|
|
7423
7423
|
else if (bo.msie) {
|
|
7424
|
-
const ae =
|
|
7424
|
+
const ae = z.createTextRange();
|
|
7425
7425
|
ae.collapse(!1), ae.select();
|
|
7426
7426
|
}
|
|
7427
7427
|
} else
|
|
@@ -7432,8 +7432,8 @@ const H_ = ["insert", "insertAt", "insertNextAt", "remove", "removeCheckboxRow",
|
|
|
7432
7432
|
* 处理选中源
|
|
7433
7433
|
*/
|
|
7434
7434
|
handleSelected(w, O) {
|
|
7435
|
-
const { mouseConfig: x } = t, { editStore: E } = n, D = l.value, P = i.value, { actived: $, selected: N } = E, { row:
|
|
7436
|
-
return de && (N.row !==
|
|
7435
|
+
const { mouseConfig: x } = t, { editStore: E } = n, D = l.value, P = i.value, { actived: $, selected: N } = E, { row: z, column: ae } = w, de = x && D.selected;
|
|
7436
|
+
return de && (N.row !== z || N.column !== ae) && ($.row !== z || P.mode === "cell" && $.column !== ae) && (c.clearEdit(O), c.clearSelected(), e.clearCellAreas && (e.clearCellAreas(), e.clearCopyCellArea()), N.args = w, N.row = z, N.column = ae, de && u.addCellSelectedClass(), e.focus(), O && e.dispatchEvent("cell-selected", w, O)), te();
|
|
7437
7437
|
},
|
|
7438
7438
|
addCellSelectedClass() {
|
|
7439
7439
|
const { editStore: w } = n, { selected: O } = w, { row: x, column: E } = O;
|
|
@@ -7591,7 +7591,7 @@ const zn = nt({
|
|
|
7591
7591
|
q && (W && (W.dataset.active = "N"), i.showPanel = !1, setTimeout(() => {
|
|
7592
7592
|
(!W || W.dataset.active !== "Y") && (i.animatVisible = !1);
|
|
7593
7593
|
}, 350), b.dispatchEvent("dropdown-click", { name: ce.getAttribute("name"), $event: k }, k));
|
|
7594
|
-
},
|
|
7594
|
+
}, z = () => {
|
|
7595
7595
|
const k = u.value;
|
|
7596
7596
|
k && (k.dataset.active = "Y", i.animatVisible = !0, setTimeout(() => {
|
|
7597
7597
|
k.dataset.active === "Y" && (i.showPanel = !0, E(), D(), setTimeout(() => {
|
|
@@ -7601,7 +7601,7 @@ const zn = nt({
|
|
|
7601
7601
|
}, ae = (k) => {
|
|
7602
7602
|
const I = u.value;
|
|
7603
7603
|
I && (I.dataset.active = "Y", i.inited || (i.inited = !0), a.showTime = setTimeout(() => {
|
|
7604
|
-
I.dataset.active === "Y" ?
|
|
7604
|
+
I.dataset.active === "Y" ? z() : i.animatVisible = !1;
|
|
7605
7605
|
}, 250)), he(k);
|
|
7606
7606
|
}, de = (k) => {
|
|
7607
7607
|
K(), Z(k);
|
|
@@ -7618,7 +7618,7 @@ const zn = nt({
|
|
|
7618
7618
|
}, 100)) : (i.animatVisible = !1, i.showPanel = !1);
|
|
7619
7619
|
}, J = () => {
|
|
7620
7620
|
K();
|
|
7621
|
-
},
|
|
7621
|
+
}, B = () => {
|
|
7622
7622
|
const { content: k, icon: I, loading: W } = e, q = [];
|
|
7623
7623
|
return W ? q.push(h("i", {
|
|
7624
7624
|
class: ["vxe-button--loading-icon", T.icon.BUTTON_LOADING]
|
|
@@ -7676,7 +7676,7 @@ const zn = nt({
|
|
|
7676
7676
|
onMouseenter: ae,
|
|
7677
7677
|
onMouseleave: de,
|
|
7678
7678
|
onClick: P
|
|
7679
|
-
},
|
|
7679
|
+
}, B().concat([
|
|
7680
7680
|
h("i", {
|
|
7681
7681
|
class: `vxe-button--dropdown-arrow ${T.icon.BUTTON_DROPDOWN}`
|
|
7682
7682
|
})
|
|
@@ -7699,7 +7699,7 @@ const zn = nt({
|
|
|
7699
7699
|
class: "vxe-button--dropdown-wrapper",
|
|
7700
7700
|
onMousedown: $,
|
|
7701
7701
|
onClick: N,
|
|
7702
|
-
onMouseenter:
|
|
7702
|
+
onMouseenter: z,
|
|
7703
7703
|
onMouseleave: J
|
|
7704
7704
|
}, ke && !j ? [] : n.dropdowns({}))
|
|
7705
7705
|
] : [])
|
|
@@ -7721,7 +7721,7 @@ const zn = nt({
|
|
|
7721
7721
|
onClick: P,
|
|
7722
7722
|
onMouseenter: he,
|
|
7723
7723
|
onMouseleave: Z
|
|
7724
|
-
},
|
|
7724
|
+
}, B());
|
|
7725
7725
|
};
|
|
7726
7726
|
return g.renderVN = A, g;
|
|
7727
7727
|
},
|
|
@@ -7887,16 +7887,16 @@ const zn = nt({
|
|
|
7887
7887
|
}, N = (se) => {
|
|
7888
7888
|
const ie = "cancel";
|
|
7889
7889
|
C.dispatchEvent(ie, { type: ie }, se), D(ie);
|
|
7890
|
-
},
|
|
7890
|
+
}, z = (se) => {
|
|
7891
7891
|
const ie = T.version, ue = f.toStringJSON(localStorage.getItem(se) || "");
|
|
7892
7892
|
return ue && ue._v === ie ? ue : { _v: ie };
|
|
7893
7893
|
}, ae = () => {
|
|
7894
7894
|
const { id: se, remember: ie, storage: ue, storageKey: ye } = e;
|
|
7895
|
-
return !!(se && ie && ue &&
|
|
7895
|
+
return !!(se && ie && ue && z(ye)[se]);
|
|
7896
7896
|
}, de = () => {
|
|
7897
7897
|
const { id: se, remember: ie, storage: ue, storageKey: ye } = e;
|
|
7898
7898
|
if (se && ie && ue) {
|
|
7899
|
-
const Se =
|
|
7899
|
+
const Se = z(ye)[se];
|
|
7900
7900
|
if (Se) {
|
|
7901
7901
|
const we = y(), [ze, Je, Qe, Ke, Pe, Fe, ee, me] = Se.split(",");
|
|
7902
7902
|
ze && (we.style.left = `${ze}px`), Je && (we.style.top = `${Je}px`), Qe && (we.style.width = `${Qe}px`), Ke && (we.style.height = `${Ke}px`), Pe && Fe && (i.zoomLocat = {
|
|
@@ -7912,7 +7912,7 @@ const zn = nt({
|
|
|
7912
7912
|
}, Z = () => {
|
|
7913
7913
|
const { id: se, remember: ie, storage: ue, storageKey: ye } = e, { zoomLocat: Se } = i;
|
|
7914
7914
|
if (se && ie && ue) {
|
|
7915
|
-
const we = y(), ze =
|
|
7915
|
+
const we = y(), ze = z(ye);
|
|
7916
7916
|
ze[se] = [
|
|
7917
7917
|
we.style.left,
|
|
7918
7918
|
we.style.top,
|
|
@@ -7957,7 +7957,7 @@ const zn = nt({
|
|
|
7957
7957
|
setTimeout(() => O(), 20);
|
|
7958
7958
|
}), Je ? (i.firstOpen = !1, ae() ? de() : ze && te(() => K())) : ze && te(() => K());
|
|
7959
7959
|
})), te();
|
|
7960
|
-
},
|
|
7960
|
+
}, B = (se) => {
|
|
7961
7961
|
const ie = a.value;
|
|
7962
7962
|
e.maskClosable && se.target === ie && D("mask");
|
|
7963
7963
|
}, A = (se) => {
|
|
@@ -8172,7 +8172,7 @@ const zn = nt({
|
|
|
8172
8172
|
zIndex: i.modalZindex,
|
|
8173
8173
|
top: Fe ? `${Fe}px` : null
|
|
8174
8174
|
},
|
|
8175
|
-
onClick:
|
|
8175
|
+
onClick: B
|
|
8176
8176
|
}, [
|
|
8177
8177
|
h("div", {
|
|
8178
8178
|
ref: s,
|
|
@@ -8332,7 +8332,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
8332
8332
|
}), O = X(() => ["number", "integer", "float"].indexOf(e.type) > -1), x = X(() => f.getSize(s.inputValue)), E = X(() => {
|
|
8333
8333
|
const M = x.value;
|
|
8334
8334
|
return e.maxlength && M > f.toNumber(e.maxlength);
|
|
8335
|
-
}), D = X(() => w.value || ["date", "week", "month", "quarter", "year"].indexOf(e.type) > -1), P = X(() => e.type === "password"), $ = X(() => e.type === "search"), N = X(() => f.toInteger(e.digits) || 1),
|
|
8335
|
+
}), D = X(() => w.value || ["date", "week", "month", "quarter", "year"].indexOf(e.type) > -1), P = X(() => e.type === "password"), $ = X(() => e.type === "search"), N = X(() => f.toInteger(e.digits) || 1), z = X(() => {
|
|
8336
8336
|
const { type: M } = e, oe = N.value, ge = e.step;
|
|
8337
8337
|
return M === "integer" ? f.toInteger(ge) || 1 : M === "float" ? f.toNumber(ge) || 1 / Math.pow(10, oe) : f.toNumber(ge) || 1;
|
|
8338
8338
|
}), ae = X(() => {
|
|
@@ -8347,7 +8347,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
8347
8347
|
}), J = X(() => {
|
|
8348
8348
|
const M = K.value, oe = A.value;
|
|
8349
8349
|
return M.map((ge) => f.toDateString(ge, oe));
|
|
8350
|
-
}),
|
|
8350
|
+
}), B = X(() => {
|
|
8351
8351
|
const M = K.value, oe = ke.value;
|
|
8352
8352
|
return M.map((ge) => f.toDateString(ge, oe)).join(", ");
|
|
8353
8353
|
}), A = X(() => {
|
|
@@ -8595,7 +8595,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
8595
8595
|
s.datePanelValue = Ge, s.datePanelLabel = dt;
|
|
8596
8596
|
}, Vt = () => {
|
|
8597
8597
|
const M = D.value, { inputValue: oe } = s;
|
|
8598
|
-
M && (H(oe), s.inputValue = e.multiple ?
|
|
8598
|
+
M && (H(oe), s.inputValue = e.multiple ? B.value : s.datePanelLabel);
|
|
8599
8599
|
}, _t = () => {
|
|
8600
8600
|
const { type: M } = e, { inputValue: oe } = s, ge = D.value, Ae = N.value;
|
|
8601
8601
|
if (ge)
|
|
@@ -8605,7 +8605,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
8605
8605
|
oe !== et && Ee(et, { type: "init" });
|
|
8606
8606
|
}
|
|
8607
8607
|
}, Tt = (M) => e.max === null || f.toNumber(M) <= f.toNumber(e.max), gt = (M) => e.min === null || f.toNumber(M) >= f.toNumber(e.min), Bt = () => {
|
|
8608
|
-
s.inputValue = e.multiple ?
|
|
8608
|
+
s.inputValue = e.multiple ? B.value : s.datePanelLabel;
|
|
8609
8609
|
}, Mt = (M) => {
|
|
8610
8610
|
const oe = f.getWhatMonth(M, 0, "first");
|
|
8611
8611
|
f.isEqual(oe, s.selectMonth) || (s.selectMonth = oe);
|
|
@@ -8669,7 +8669,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
8669
8669
|
}, an = (M) => {
|
|
8670
8670
|
y.dispatchEvent("search-click", {}, M);
|
|
8671
8671
|
}, En = (M, oe) => {
|
|
8672
|
-
const { min: ge, max: Ae, type: et } = e, { inputValue: Ge } = s, dt =
|
|
8672
|
+
const { min: ge, max: Ae, type: et } = e, { inputValue: Ge } = s, dt = z.value, d = et === "integer" ? f.toInteger(Jl(Ge)) : f.toNumber(Jl(Ge)), p = M ? f.add(d, dt) : f.subtract(d, dt);
|
|
8673
8673
|
let v;
|
|
8674
8674
|
gt(p) ? Tt(p) ? v = p : v = Ae : v = ge, We(U(v), oe);
|
|
8675
8675
|
};
|
|
@@ -9294,7 +9294,7 @@ const br = 12, G_ = 20, Y_ = 8, kr = nt({
|
|
|
9294
9294
|
currentDate: null
|
|
9295
9295
|
}), _t();
|
|
9296
9296
|
}), tt(ke, () => {
|
|
9297
|
-
D.value && (H(s.datePanelValue), s.inputValue = e.multiple ?
|
|
9297
|
+
D.value && (H(s.datePanelValue), s.inputValue = e.multiple ? B.value : s.datePanelLabel);
|
|
9298
9298
|
}), te(() => {
|
|
9299
9299
|
St.on(b, "mousewheel", oa), St.on(b, "mousedown", na), St.on(b, "keydown", Tc), St.on(b, "blur", Hl);
|
|
9300
9300
|
}), pn(() => {
|
|
@@ -9504,8 +9504,8 @@ const Nl = nt({
|
|
|
9504
9504
|
const w = X(() => e.optionProps || {}), O = X(() => e.optionGroupProps || {}), x = X(() => w.value.label || "label"), E = X(() => w.value.value || "value"), D = X(() => O.value.label || "label"), P = X(() => O.value.options || "options"), $ = X(() => {
|
|
9505
9505
|
const { modelValue: U, multiple: Q, max: Ee } = e;
|
|
9506
9506
|
return Q && Ee ? (U ? U.length : 0) >= f.toNumber(Ee) : !1;
|
|
9507
|
-
}), N = X(() => Object.assign({}, T.select.optionConfig, e.optionConfig)),
|
|
9508
|
-
const { fullOptionList: Q, fullGroupList: Ee } = s, We =
|
|
9507
|
+
}), N = X(() => Object.assign({}, T.select.optionConfig, e.optionConfig)), z = X(() => s.fullGroupList.some((U) => U.options && U.options.length)), ae = X(() => f.toNumber(e.multiCharOverflow)), de = (U, Q) => U && (f.isString(U) && (U = n[U] || null), f.isFunction(U)) ? Xt(U(Q)) : [], he = (U) => {
|
|
9508
|
+
const { fullOptionList: Q, fullGroupList: Ee } = s, We = z.value, Ue = E.value;
|
|
9509
9509
|
if (We)
|
|
9510
9510
|
for (let Ze = 0; Ze < Ee.length; Ze++) {
|
|
9511
9511
|
const lt = Ee[Ze];
|
|
@@ -9533,14 +9533,14 @@ const Nl = nt({
|
|
|
9533
9533
|
}).join(", ");
|
|
9534
9534
|
}
|
|
9535
9535
|
return Ee ? Z(U) : K(U);
|
|
9536
|
-
}),
|
|
9537
|
-
const Q = U[
|
|
9536
|
+
}), B = () => N.value.keyField || e.optionId || "_X_OPTION_KEY", A = (U) => {
|
|
9537
|
+
const Q = U[B()];
|
|
9538
9538
|
return Q ? encodeURIComponent(Q) : "";
|
|
9539
9539
|
}, k = () => {
|
|
9540
|
-
const { filterable: U, filterMethod: Q } = e, { fullOptionList: Ee, fullGroupList: We, searchValue: Ue } = s, Ze =
|
|
9540
|
+
const { filterable: U, filterMethod: Q } = e, { fullOptionList: Ee, fullGroupList: We, searchValue: Ue } = s, Ze = z.value, lt = D.value, st = x.value;
|
|
9541
9541
|
return Ze ? U && Q ? s.visibleGroupList = We.filter((ut) => Xr(ut) && Q({ group: ut, option: null, searchValue: Ue })) : U ? s.visibleGroupList = We.filter((ut) => Xr(ut) && (!Ue || `${ut[lt]}`.indexOf(Ue) > -1)) : s.visibleGroupList = We.filter(Xr) : U && Q ? s.visibleOptionList = Ee.filter((ut) => Xr(ut) && Q({ group: null, option: ut, searchValue: Ue })) : U ? s.visibleOptionList = Ee.filter((ut) => Xr(ut) && (!Ue || `${ut[st]}`.indexOf(Ue) > -1)) : s.visibleOptionList = Ee.filter(Xr), te();
|
|
9542
9542
|
}, I = () => {
|
|
9543
|
-
const { fullOptionList: U, fullGroupList: Q } = s, Ee = P.value, We =
|
|
9543
|
+
const { fullOptionList: U, fullGroupList: Q } = s, Ee = P.value, We = B(), Ue = (Ze) => {
|
|
9544
9544
|
A(Ze) || (Ze[We] = q_());
|
|
9545
9545
|
};
|
|
9546
9546
|
Q.length ? Q.forEach((Ze) => {
|
|
@@ -9617,7 +9617,7 @@ const Nl = nt({
|
|
|
9617
9617
|
s.isActivated = Rt(U, We).flag || Rt(U, Ue).flag, Ee && !s.isActivated && je();
|
|
9618
9618
|
}
|
|
9619
9619
|
}, se = (U, Q) => {
|
|
9620
|
-
const { visibleOptionList: Ee, visibleGroupList: We } = s, Ue =
|
|
9620
|
+
const { visibleOptionList: Ee, visibleGroupList: We } = s, Ue = z.value, Ze = E.value, lt = P.value;
|
|
9621
9621
|
let st, ut, rt, mt;
|
|
9622
9622
|
if (Ue)
|
|
9623
9623
|
for (let Pt = 0; Pt < We.length; Pt++) {
|
|
@@ -9690,7 +9690,7 @@ const Nl = nt({
|
|
|
9690
9690
|
const { $event: Q } = U;
|
|
9691
9691
|
Q.preventDefault(), s.visiblePanel ? je() : Ve();
|
|
9692
9692
|
}, Fe = (U, Q, Ee) => !!(Q.disabled || Ee && Ee.disabled || $.value && !U), ee = (U, Q) => {
|
|
9693
|
-
const { optionKey: Ee, modelValue: We, multiple: Ue } = e, { currentValue: Ze } = s, lt = N.value, st = x.value, ut = E.value, rt =
|
|
9693
|
+
const { optionKey: Ee, modelValue: We, multiple: Ue } = e, { currentValue: Ze } = s, lt = N.value, st = x.value, ut = E.value, rt = z.value, { useKey: mt } = lt, Pt = n.option;
|
|
9694
9694
|
return U.map((H, Vt) => {
|
|
9695
9695
|
const { slots: _t, className: Tt } = H, gt = H[ut], Bt = Ue ? We && We.indexOf(gt) > -1 : We === gt, Mt = !rt || Xr(H), Gt = Fe(Bt, H, Q), Ft = A(H), zt = _t ? _t.default : null, en = { option: H, group: null, $select: y };
|
|
9696
9696
|
return Mt ? h("div", {
|
|
@@ -9735,7 +9735,7 @@ const Nl = nt({
|
|
|
9735
9735
|
]);
|
|
9736
9736
|
});
|
|
9737
9737
|
}, De = () => {
|
|
9738
|
-
const { visibleGroupList: U, visibleOptionList: Q, searchLoading: Ee } = s, We =
|
|
9738
|
+
const { visibleGroupList: U, visibleOptionList: Q, searchLoading: Ee } = s, We = z.value;
|
|
9739
9739
|
if (Ee)
|
|
9740
9740
|
return [
|
|
9741
9741
|
h("div", {
|
|
@@ -9916,34 +9916,34 @@ const Nl = nt({
|
|
|
9916
9916
|
const { defaultOptions: $ } = e;
|
|
9917
9917
|
return !$.original && ["xlsx"].indexOf($.type) > -1;
|
|
9918
9918
|
}), g = ($) => {
|
|
9919
|
-
const { storeData: N } = e,
|
|
9920
|
-
if (
|
|
9921
|
-
const { parent: ae } =
|
|
9919
|
+
const { storeData: N } = e, z = f.findTree(N.columns, (ae) => ae === $);
|
|
9920
|
+
if (z && z.parent) {
|
|
9921
|
+
const { parent: ae } = z;
|
|
9922
9922
|
ae.children && ae.children.length && (ae.checked = ae.children.every((de) => de.checked), ae.halfChecked = !ae.checked && ae.children.some((de) => de.checked || de.halfChecked), g(ae));
|
|
9923
9923
|
}
|
|
9924
9924
|
}, C = () => {
|
|
9925
9925
|
const { storeData: $ } = e, N = $.columns;
|
|
9926
|
-
r.isAll = N.every((
|
|
9926
|
+
r.isAll = N.every((z) => z.disabled || z.checked), r.isIndeterminate = !r.isAll && N.some((z) => !z.disabled && (z.checked || z.halfChecked));
|
|
9927
9927
|
}, b = ($) => {
|
|
9928
9928
|
const N = !$.checked;
|
|
9929
|
-
f.eachTree([$], (
|
|
9930
|
-
|
|
9929
|
+
f.eachTree([$], (z) => {
|
|
9930
|
+
z.checked = N, z.halfChecked = !1;
|
|
9931
9931
|
}), g($), C();
|
|
9932
9932
|
}, y = () => {
|
|
9933
9933
|
const { storeData: $ } = e, N = !r.isAll;
|
|
9934
|
-
f.eachTree($.columns, (
|
|
9935
|
-
|
|
9934
|
+
f.eachTree($.columns, (z) => {
|
|
9935
|
+
z.disabled || (z.checked = N, z.halfChecked = !1);
|
|
9936
9936
|
}), r.isAll = N, C();
|
|
9937
9937
|
}, _ = () => {
|
|
9938
9938
|
te(() => {
|
|
9939
|
-
const $ = i.value, N = a.value,
|
|
9939
|
+
const $ = i.value, N = a.value, z = l.value, ae = $ || N || z;
|
|
9940
9940
|
ae && ae.focus();
|
|
9941
9941
|
}), C();
|
|
9942
9942
|
}, w = () => {
|
|
9943
|
-
const { storeData: $, defaultOptions: N } = e, { hasMerge:
|
|
9943
|
+
const { storeData: $, defaultOptions: N } = e, { hasMerge: z, columns: ae } = $, de = s.value, he = u.value, Z = f.searchTree(ae, (K) => K.checked, { children: "children", mapChildren: "childNodes", original: !0 });
|
|
9944
9944
|
return Object.assign({}, N, {
|
|
9945
9945
|
columns: Z,
|
|
9946
|
-
isMerge:
|
|
9946
|
+
isMerge: z && he && de ? N.isMerge : !1
|
|
9947
9947
|
});
|
|
9948
9948
|
}, O = () => {
|
|
9949
9949
|
const { storeData: $ } = e, N = o.value;
|
|
@@ -9963,10 +9963,10 @@ const Nl = nt({
|
|
|
9963
9963
|
$.isPrint ? O() : x();
|
|
9964
9964
|
};
|
|
9965
9965
|
return () => {
|
|
9966
|
-
const { defaultOptions: $, storeData: N } = e, { isAll:
|
|
9966
|
+
const { defaultOptions: $, storeData: N } = e, { isAll: z, isIndeterminate: ae } = r, { hasTree: de, hasMerge: he, isPrint: Z, hasColgroup: K } = N, { isHeader: J } = $, B = [], A = s.value, k = c.value, I = u.value, W = m.value;
|
|
9967
9967
|
return f.eachTree(N.columns, (q) => {
|
|
9968
9968
|
const ce = vn(q.getTitle(), 1), ke = q.children && q.children.length, xe = q.checked, Ve = q.halfChecked;
|
|
9969
|
-
|
|
9969
|
+
B.push(h("li", {
|
|
9970
9970
|
class: ["vxe-export--panel-column-option", `level--${q.level}`, {
|
|
9971
9971
|
"is--group": ke,
|
|
9972
9972
|
"is--checked": xe,
|
|
@@ -10082,14 +10082,14 @@ const Nl = nt({
|
|
|
10082
10082
|
}, [
|
|
10083
10083
|
h("li", {
|
|
10084
10084
|
class: ["vxe-export--panel-column-option", {
|
|
10085
|
-
"is--checked":
|
|
10085
|
+
"is--checked": z,
|
|
10086
10086
|
"is--indeterminate": ae
|
|
10087
10087
|
}],
|
|
10088
10088
|
title: T.i18n("vxe.table.allTitle"),
|
|
10089
10089
|
onClick: y
|
|
10090
10090
|
}, [
|
|
10091
10091
|
h("span", {
|
|
10092
|
-
class: ["vxe-checkbox--icon", ae ? T.icon.TABLE_CHECKBOX_INDETERMINATE :
|
|
10092
|
+
class: ["vxe-checkbox--icon", ae ? T.icon.TABLE_CHECKBOX_INDETERMINATE : z ? T.icon.TABLE_CHECKBOX_CHECKED : T.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
10093
10093
|
}),
|
|
10094
10094
|
h("span", {
|
|
10095
10095
|
class: "vxe-checkbox--label"
|
|
@@ -10098,7 +10098,7 @@ const Nl = nt({
|
|
|
10098
10098
|
]),
|
|
10099
10099
|
h("ul", {
|
|
10100
10100
|
class: "vxe-export--panel-column-body"
|
|
10101
|
-
},
|
|
10101
|
+
}, B)
|
|
10102
10102
|
])
|
|
10103
10103
|
])
|
|
10104
10104
|
]),
|
|
@@ -10972,7 +10972,7 @@ const sM = ["exportData", "importByFile", "importData", "saveFile", "readFile",
|
|
|
10972
10972
|
}
|
|
10973
10973
|
const Ke = !j && le ? `<script>(function(){var a=document.querySelector(".${ze}");if(a){a.indeterminate=true}})()<\/script>` : "";
|
|
10974
10974
|
return Qe.push("</table>", Ke), Me ? Qe.join("") : e0(A, Qe.join(""));
|
|
10975
|
-
},
|
|
10975
|
+
}, z = (A, k, I) => {
|
|
10976
10976
|
let W = [
|
|
10977
10977
|
'<?xml version="1.0"?>',
|
|
10978
10978
|
'<?mso-application progid="Excel.Sheet"?>',
|
|
@@ -11011,7 +11011,7 @@ const sM = ["exportData", "importByFile", "importData", "saveFile", "readFile",
|
|
|
11011
11011
|
case "html":
|
|
11012
11012
|
return N(A, k, I);
|
|
11013
11013
|
case "xml":
|
|
11014
|
-
return
|
|
11014
|
+
return z(A, k, I);
|
|
11015
11015
|
}
|
|
11016
11016
|
return "";
|
|
11017
11017
|
}, de = (A, k) => {
|
|
@@ -11139,7 +11139,7 @@ const sM = ["exportData", "importByFile", "importData", "saveFile", "readFile",
|
|
|
11139
11139
|
}), Object.assign(pe, {
|
|
11140
11140
|
mode: be.length ? "selected" : "current"
|
|
11141
11141
|
}, ie), ye.indexOf(pe.mode) === -1 && (pe.mode = ye[0]), ue.indexOf(pe.type) === -1 && (pe.type = ue[0]), ce.export = !0, te();
|
|
11142
|
-
},
|
|
11142
|
+
}, B = {
|
|
11143
11143
|
/**
|
|
11144
11144
|
* 导出文件,支持 csv/html/xml/txt
|
|
11145
11145
|
* 如果是树表格,则默认是导出所有节点
|
|
@@ -11256,7 +11256,7 @@ const sM = ["exportData", "importByFile", "importData", "saveFile", "readFile",
|
|
|
11256
11256
|
print: !0
|
|
11257
11257
|
});
|
|
11258
11258
|
return I.sheetName || (I.sheetName = document.title), new Promise((W) => {
|
|
11259
|
-
I.content ? W(Zu(e, I, I.content)) : W(
|
|
11259
|
+
I.content ? W(Zu(e, I, I.content)) : W(B.exportData(I).then(({ content: q }) => Zu(e, I, q)));
|
|
11260
11260
|
});
|
|
11261
11261
|
},
|
|
11262
11262
|
openImport(A) {
|
|
@@ -11291,7 +11291,7 @@ const sM = ["exportData", "importByFile", "importData", "saveFile", "readFile",
|
|
|
11291
11291
|
J(Object.assign({}, k, A), !0);
|
|
11292
11292
|
}
|
|
11293
11293
|
};
|
|
11294
|
-
return
|
|
11294
|
+
return B;
|
|
11295
11295
|
},
|
|
11296
11296
|
setupGrid(e) {
|
|
11297
11297
|
return e.extendTableMethods(sM);
|
|
@@ -11357,16 +11357,16 @@ const dM = {
|
|
|
11357
11357
|
const w = r.value, { elemStore: O } = o, x = C.clientX, E = C.clientY, D = O[`${y.fixed || "main"}-body-wrapper`] || O["main-body-wrapper"], P = D ? D.value : null;
|
|
11358
11358
|
if (!P)
|
|
11359
11359
|
return;
|
|
11360
|
-
const $ = P.querySelector(".vxe-table--checkbox-range"), N = document.onmousemove,
|
|
11360
|
+
const $ = P.querySelector(".vxe-table--checkbox-range"), N = document.onmousemove, z = document.onmouseup, ae = _.parentNode, de = e.getCheckboxRecords();
|
|
11361
11361
|
let he = [];
|
|
11362
|
-
const Z = 1, K = uM(C.target, P), J = K.offsetTop + C.offsetY,
|
|
11362
|
+
const Z = 1, K = uM(C.target, P), J = K.offsetTop + C.offsetY, B = K.offsetLeft + C.offsetX, A = P.scrollTop, k = ae.offsetHeight;
|
|
11363
11363
|
let I = null, W = !1, q = 1;
|
|
11364
11364
|
const ce = (je, pe) => {
|
|
11365
11365
|
e.dispatchEvent(`checkbox-range-${je}`, { records: e.getCheckboxRecords(), reserves: e.getCheckboxReserveRecords() }, pe);
|
|
11366
11366
|
}, ke = (je) => {
|
|
11367
11367
|
const { clientX: pe, clientY: j } = je, le = pe - x, fe = j - E + (P.scrollTop - A);
|
|
11368
|
-
let be = Math.abs(fe), Me = Math.abs(le), se = J, ie =
|
|
11369
|
-
fe < Z ? (se += fe, se < Z && (se = Z, be = J)) : be = Math.min(be, P.scrollHeight - J - Z), le < Z ? (ie += le, Me >
|
|
11368
|
+
let be = Math.abs(fe), Me = Math.abs(le), se = J, ie = B;
|
|
11369
|
+
fe < Z ? (se += fe, se < Z && (se = Z, be = J)) : be = Math.min(be, P.scrollHeight - J - Z), le < Z ? (ie += le, Me > B && (ie = Z, Me = B)) : Me = Math.min(Me, P.clientWidth - B - Z), $.style.height = `${be}px`, $.style.width = `${Me}px`, $.style.left = `${ie}px`, $.style.top = `${se}px`, $.style.display = "block";
|
|
11370
11370
|
const ue = c(b, ae, fe < Z ? -be : be);
|
|
11371
11371
|
be > 10 && ue.length !== he.length && (he = ue, je.ctrlKey ? ue.forEach((ye) => {
|
|
11372
11372
|
e.handleSelectRow({ row: ye }, de.indexOf(ye) === -1);
|
|
@@ -11386,7 +11386,7 @@ const dM = {
|
|
|
11386
11386
|
const { clientY: pe } = je, { boundingTop: j } = nr(P);
|
|
11387
11387
|
pe < j ? (W = !1, q = j - pe, I || Ve(je)) : pe > j + P.clientHeight ? (W = !0, q = pe - j - P.clientHeight, I || Ve(je)) : I && xe(), ke(je);
|
|
11388
11388
|
}, document.onmouseup = (je) => {
|
|
11389
|
-
xe(), go(w, "drag--range"), $.removeAttribute("style"), document.onmousemove = N, document.onmouseup =
|
|
11389
|
+
xe(), go(w, "drag--range"), $.removeAttribute("style"), document.onmousemove = N, document.onmouseup = z, ce("end", je);
|
|
11390
11390
|
}, ce("start", C);
|
|
11391
11391
|
}
|
|
11392
11392
|
}, m = (C, b) => {
|
|
@@ -11400,8 +11400,8 @@ const dM = {
|
|
|
11400
11400
|
moveTabSelected(C, b, y) {
|
|
11401
11401
|
const { editConfig: _ } = t, { afterFullData: w, visibleColumn: O } = o, x = l.value;
|
|
11402
11402
|
let E, D, P;
|
|
11403
|
-
const $ = Object.assign({}, C), N = e.getVTRowIndex($.row),
|
|
11404
|
-
y.preventDefault(), b ?
|
|
11403
|
+
const $ = Object.assign({}, C), N = e.getVTRowIndex($.row), z = e.getVTColumnIndex($.column);
|
|
11404
|
+
y.preventDefault(), b ? z <= 0 ? N > 0 && (D = N - 1, E = w[D], P = O.length - 1) : P = z - 1 : z >= O.length - 1 ? N < w.length - 1 && (D = N + 1, E = w[D], P = 0) : P = z + 1;
|
|
11405
11405
|
const ae = O[P];
|
|
11406
11406
|
ae && (E ? ($.rowIndex = D, $.row = E) : $.rowIndex = N, $.columnIndex = P, $.column = ae, $.cell = e.getCell($.row, $.column), _ ? (x.trigger === "click" || x.trigger === "dblclick") && (x.mode === "row" ? e.handleActived($, y) : e.scrollToRow($.row, $.column).then(() => e.handleSelected($, y))) : e.scrollToRow($.row, $.column).then(() => e.handleSelected($, y)));
|
|
11407
11407
|
},
|
|
@@ -11505,7 +11505,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11505
11505
|
}
|
|
11506
11506
|
return y;
|
|
11507
11507
|
}, C = (y, _, w) => {
|
|
11508
|
-
const O = {}, { editRules: x, treeConfig: E } = t, { afterFullData: D, visibleColumn: P } = o, $ = i.value, N = $.children || $.childrenField,
|
|
11508
|
+
const O = {}, { editRules: x, treeConfig: E } = t, { afterFullData: D, visibleColumn: P } = o, $ = i.value, N = $.children || $.childrenField, z = l.value;
|
|
11509
11509
|
let ae;
|
|
11510
11510
|
y === !0 ? ae = D : y && (f.isFunction(y) ? _ = y : ae = f.isArray(y) ? y : [y]), ae || (e.getInsertRecords ? ae = e.getInsertRecords().concat(e.getUpdateRecords()) : ae = []);
|
|
11511
11511
|
const de = [];
|
|
@@ -11514,9 +11514,9 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11514
11514
|
if (x) {
|
|
11515
11515
|
const Z = e.getColumns(), K = (J) => {
|
|
11516
11516
|
if (w || !u) {
|
|
11517
|
-
const
|
|
11517
|
+
const B = [];
|
|
11518
11518
|
Z.forEach((A) => {
|
|
11519
|
-
(w || !u) && f.has(x, A.property) &&
|
|
11519
|
+
(w || !u) && f.has(x, A.property) && B.push(c.validCellRules("all", J, A).catch(({ rule: k, rules: I }) => {
|
|
11520
11520
|
const W = {
|
|
11521
11521
|
rule: k,
|
|
11522
11522
|
rules: I,
|
|
@@ -11535,7 +11535,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11535
11535
|
}, O[A.property].push(W), !w)
|
|
11536
11536
|
return u = !0, Promise.reject(W);
|
|
11537
11537
|
}));
|
|
11538
|
-
}), de.push(Promise.all(
|
|
11538
|
+
}), de.push(Promise.all(B));
|
|
11539
11539
|
}
|
|
11540
11540
|
};
|
|
11541
11541
|
return E ? f.eachTree(ae, K, { children: N }) : ae.forEach(K), Promise.all(de).then(() => {
|
|
@@ -11545,15 +11545,15 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11545
11545
|
return Promise.reject(O[J[0]][0]);
|
|
11546
11546
|
_ && _();
|
|
11547
11547
|
});
|
|
11548
|
-
}).catch((J) => new Promise((
|
|
11548
|
+
}).catch((J) => new Promise((B, A) => {
|
|
11549
11549
|
const k = () => {
|
|
11550
11550
|
te(() => {
|
|
11551
|
-
_ ? (_(O),
|
|
11551
|
+
_ ? (_(O), B()) : T.validToReject === "obsolete" ? A(O) : B(O);
|
|
11552
11552
|
});
|
|
11553
11553
|
}, I = () => {
|
|
11554
11554
|
J.cell = e.getCell(J.row, J.column), Iv(J.cell), m(J).then(k);
|
|
11555
11555
|
};
|
|
11556
|
-
if (
|
|
11556
|
+
if (z.autoPos === !1)
|
|
11557
11557
|
k();
|
|
11558
11558
|
else {
|
|
11559
11559
|
const W = J.row, q = J.column, ce = D.indexOf(W), ke = P.indexOf(q), xe = ce > 0 ? D[ce - 1] : W, Ve = ke > 0 ? P[ke - 1] : q;
|
|
@@ -11587,19 +11587,19 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11587
11587
|
if (E.length && D.length)
|
|
11588
11588
|
P = Object.assign({}, w), E.forEach(($) => {
|
|
11589
11589
|
D.forEach((N) => {
|
|
11590
|
-
const
|
|
11591
|
-
P[
|
|
11590
|
+
const z = `${Xe(e, $)}:${N.id}`;
|
|
11591
|
+
P[z] && delete P[z];
|
|
11592
11592
|
});
|
|
11593
11593
|
});
|
|
11594
11594
|
else if (E.length) {
|
|
11595
11595
|
const $ = E.map((N) => `${Xe(e, N)}`);
|
|
11596
|
-
f.each(w, (N,
|
|
11597
|
-
$.indexOf(
|
|
11596
|
+
f.each(w, (N, z) => {
|
|
11597
|
+
$.indexOf(z.split(":")[0]) > -1 && (P[z] = N);
|
|
11598
11598
|
});
|
|
11599
11599
|
} else if (D.length) {
|
|
11600
11600
|
const $ = D.map((N) => `${N.id}`);
|
|
11601
|
-
f.each(w, (N,
|
|
11602
|
-
$.indexOf(
|
|
11601
|
+
f.each(w, (N, z) => {
|
|
11602
|
+
$.indexOf(z.split(":")[1]) > -1 && (P[z] = N);
|
|
11603
11603
|
});
|
|
11604
11604
|
}
|
|
11605
11605
|
return n.validErrorMaps = P, te();
|
|
@@ -11630,13 +11630,13 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11630
11630
|
const $ = f.get(x, E);
|
|
11631
11631
|
if ($) {
|
|
11632
11632
|
const N = f.isUndefined(O) ? f.get(_, E) : O;
|
|
11633
|
-
$.forEach((
|
|
11634
|
-
const { type: ae, trigger: de, required: he, validator: Z } =
|
|
11633
|
+
$.forEach((z) => {
|
|
11634
|
+
const { type: ae, trigger: de, required: he, validator: Z } = z;
|
|
11635
11635
|
if (y === "all" || !de || y === de)
|
|
11636
11636
|
if (Z) {
|
|
11637
11637
|
const K = {
|
|
11638
11638
|
cellValue: N,
|
|
11639
|
-
rule:
|
|
11639
|
+
rule: z,
|
|
11640
11640
|
rules: $,
|
|
11641
11641
|
row: _,
|
|
11642
11642
|
rowIndex: e.getRowIndex(_),
|
|
@@ -11648,17 +11648,17 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11648
11648
|
};
|
|
11649
11649
|
let J;
|
|
11650
11650
|
if (f.isString(Z)) {
|
|
11651
|
-
const
|
|
11652
|
-
|
|
11651
|
+
const B = at.validators.get(Z);
|
|
11652
|
+
B && B.cellValidatorMethod && (J = B.cellValidatorMethod(K));
|
|
11653
11653
|
} else
|
|
11654
11654
|
J = Z(K);
|
|
11655
|
-
J && (f.isError(J) ? (u = !0, D.push(new ti({ type: "custom", trigger: de, content: J.message, rule: new ti(
|
|
11656
|
-
u = !0, D.push(new ti({ type: "custom", trigger: de, content:
|
|
11655
|
+
J && (f.isError(J) ? (u = !0, D.push(new ti({ type: "custom", trigger: de, content: J.message, rule: new ti(z) }))) : J.catch && P.push(J.catch((B) => {
|
|
11656
|
+
u = !0, D.push(new ti({ type: "custom", trigger: de, content: B && B.message ? B.message : z.content || z.message, rule: new ti(z) }));
|
|
11657
11657
|
})));
|
|
11658
11658
|
} else {
|
|
11659
11659
|
const K = ae === "array", J = f.isArray(N);
|
|
11660
|
-
let
|
|
11661
|
-
K || J ?
|
|
11660
|
+
let B = !0;
|
|
11661
|
+
K || J ? B = !J || !N.length : f.isString(N) ? B = zo(N.trim()) : B = zo(N), (he ? B || b(z, N) : !B && b(z, N)) && (u = !0, D.push(new ti(z)));
|
|
11662
11662
|
}
|
|
11663
11663
|
});
|
|
11664
11664
|
}
|
|
@@ -11688,9 +11688,9 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11688
11688
|
if (c.hasCellRules(y, P, $))
|
|
11689
11689
|
return c.validCellRules(y, P, $).then(() => {
|
|
11690
11690
|
E.mode === "row" && s.clearValidate(P, $);
|
|
11691
|
-
}).catch(({ rule:
|
|
11692
|
-
if (!
|
|
11693
|
-
const ae = { rule:
|
|
11691
|
+
}).catch(({ rule: z }) => {
|
|
11692
|
+
if (!z.trigger || y === z.trigger) {
|
|
11693
|
+
const ae = { rule: z, row: P, column: $, cell: N };
|
|
11694
11694
|
return c.showValidTooltip(ae), Promise.reject(ae);
|
|
11695
11695
|
}
|
|
11696
11696
|
return Promise.resolve();
|
|
@@ -11702,7 +11702,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11702
11702
|
* 弹出校验错误提示
|
|
11703
11703
|
*/
|
|
11704
11704
|
showValidTooltip(y) {
|
|
11705
|
-
const { height: _ } = t, { tableData: w, validStore: O, validErrorMaps: x } = n, { rule: E, row: D, column: P, cell: $ } = y, N = l.value,
|
|
11705
|
+
const { height: _ } = t, { tableData: w, validStore: O, validErrorMaps: x } = n, { rule: E, row: D, column: P, cell: $ } = y, N = l.value, z = r.value, ae = E.content;
|
|
11706
11706
|
return O.visible = !0, N.msgMode === "single" ? n.validErrorMaps = {
|
|
11707
11707
|
[`${Xe(e, D)}:${P.id}`]: {
|
|
11708
11708
|
column: P,
|
|
@@ -11717,7 +11717,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11717
11717
|
rule: E,
|
|
11718
11718
|
content: ae
|
|
11719
11719
|
}
|
|
11720
|
-
}), e.dispatchEvent("valid-error", y, null),
|
|
11720
|
+
}), e.dispatchEvent("valid-error", y, null), z && z && (N.message === "tooltip" || N.message === "default" && !_ && w.length < 2) ? z.open($, ae) : te();
|
|
11721
11721
|
}
|
|
11722
11722
|
}, Object.assign(Object.assign({}, s), c);
|
|
11723
11723
|
},
|
|
@@ -11774,9 +11774,9 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11774
11774
|
const m = () => {
|
|
11775
11775
|
const { tipTarget: $, tipStore: N } = i;
|
|
11776
11776
|
if ($) {
|
|
11777
|
-
const { scrollTop:
|
|
11778
|
-
let k = Z, I = he -
|
|
11779
|
-
k = Math.max(J, Z + Math.floor(($.offsetWidth - A) / 2)), k + A + J > ae + de && (k = ae + de - A - J), he -
|
|
11777
|
+
const { scrollTop: z, scrollLeft: ae, visibleWidth: de } = ol(), { top: he, left: Z } = nr($), K = a.value, J = 6, B = K.offsetHeight, A = K.offsetWidth;
|
|
11778
|
+
let k = Z, I = he - B - J;
|
|
11779
|
+
k = Math.max(J, Z + Math.floor(($.offsetWidth - A) / 2)), k + A + J > ae + de && (k = ae + de - A - J), he - B < z + J && (N.placement = "bottom", I = he + $.offsetHeight + J), N.style.top = `${I}px`, N.style.left = `${k}px`, N.arrowStyle.left = `${Z - k + $.offsetWidth / 2}px`;
|
|
11780
11780
|
}
|
|
11781
11781
|
}, g = ($) => {
|
|
11782
11782
|
$ !== i.visible && (i.visible = $, i.isUpdate = !0, o("update:modelValue", $));
|
|
@@ -11787,17 +11787,17 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11787
11787
|
}, y = () => {
|
|
11788
11788
|
u.open();
|
|
11789
11789
|
}, _ = () => {
|
|
11790
|
-
const { trigger: $, enterable: N, leaveDelay:
|
|
11790
|
+
const { trigger: $, enterable: N, leaveDelay: z } = e;
|
|
11791
11791
|
i.tipActive = !1, N && $ === "hover" ? setTimeout(() => {
|
|
11792
11792
|
i.tipActive || u.close();
|
|
11793
|
-
},
|
|
11793
|
+
}, z) : u.close();
|
|
11794
11794
|
}, w = () => {
|
|
11795
11795
|
i.tipActive = !0;
|
|
11796
11796
|
}, O = () => {
|
|
11797
|
-
const { trigger: $, enterable: N, leaveDelay:
|
|
11797
|
+
const { trigger: $, enterable: N, leaveDelay: z } = e;
|
|
11798
11798
|
i.tipActive = !1, N && $ === "hover" && setTimeout(() => {
|
|
11799
11799
|
i.tipActive || u.close();
|
|
11800
|
-
},
|
|
11800
|
+
}, z);
|
|
11801
11801
|
}, x = () => {
|
|
11802
11802
|
const { tipStore: $ } = i, N = a.value;
|
|
11803
11803
|
return N && (N.parentNode || document.body.appendChild(N)), g(!0), C(), $.placement = "top", $.style = { width: "auto", left: 0, top: 0, zIndex: e.zIndex || i.tipZindex }, $.arrowStyle = { left: "50%" }, u.updatePlacement();
|
|
@@ -11805,8 +11805,8 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11805
11805
|
i.tipActive && x();
|
|
11806
11806
|
}, e.enterDelay, { leading: !1, trailing: !0 });
|
|
11807
11807
|
u = {
|
|
11808
|
-
dispatchEvent($, N,
|
|
11809
|
-
o($, Object.assign({ $tooltip: c, $event:
|
|
11808
|
+
dispatchEvent($, N, z) {
|
|
11809
|
+
o($, Object.assign({ $tooltip: c, $event: z }, N));
|
|
11810
11810
|
},
|
|
11811
11811
|
open($, N) {
|
|
11812
11812
|
return u.toVisible($ || i.target, N);
|
|
@@ -11820,8 +11820,8 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11820
11820
|
},
|
|
11821
11821
|
toVisible($, N) {
|
|
11822
11822
|
if ($) {
|
|
11823
|
-
const { trigger:
|
|
11824
|
-
if (i.tipActive = !0, i.tipTarget = $, N && (i.tipContent = N), ae &&
|
|
11823
|
+
const { trigger: z, enterDelay: ae } = e;
|
|
11824
|
+
if (i.tipActive = !0, i.tipTarget = $, N && (i.tipContent = N), ae && z === "hover")
|
|
11825
11825
|
E();
|
|
11826
11826
|
else
|
|
11827
11827
|
return x();
|
|
@@ -11847,7 +11847,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11847
11847
|
i.isUpdate || (e.modelValue ? u.open() : u.close()), i.isUpdate = !1;
|
|
11848
11848
|
}), un(() => {
|
|
11849
11849
|
te(() => {
|
|
11850
|
-
const { trigger: $, content: N, modelValue:
|
|
11850
|
+
const { trigger: $, content: N, modelValue: z } = e, ae = a.value;
|
|
11851
11851
|
if (ae) {
|
|
11852
11852
|
const de = ae.parentNode;
|
|
11853
11853
|
if (de) {
|
|
@@ -11855,23 +11855,23 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11855
11855
|
K > 1 && (de.insertBefore(Z, ae), i.target || (i.target = Z));
|
|
11856
11856
|
}), de.removeChild(ae);
|
|
11857
11857
|
const { target: he } = i;
|
|
11858
|
-
he && ($ === "hover" ? (he.onmouseenter = y, he.onmouseleave = _) : $ === "click" && (he.onclick = b)),
|
|
11858
|
+
he && ($ === "hover" ? (he.onmouseenter = y, he.onmouseleave = _) : $ === "click" && (he.onclick = b)), z && u.open();
|
|
11859
11859
|
}
|
|
11860
11860
|
}
|
|
11861
11861
|
});
|
|
11862
11862
|
}), ad(() => {
|
|
11863
|
-
const { trigger: $ } = e, { target: N } = i,
|
|
11864
|
-
if (N && ($ === "hover" ? (N.onmouseenter = null, N.onmouseleave = null) : $ === "click" && (N.onclick = null)),
|
|
11865
|
-
const ae =
|
|
11866
|
-
ae && ae.removeChild(
|
|
11863
|
+
const { trigger: $ } = e, { target: N } = i, z = a.value;
|
|
11864
|
+
if (N && ($ === "hover" ? (N.onmouseenter = null, N.onmouseleave = null) : $ === "click" && (N.onclick = null)), z) {
|
|
11865
|
+
const ae = z.parentNode;
|
|
11866
|
+
ae && ae.removeChild(z);
|
|
11867
11867
|
}
|
|
11868
11868
|
});
|
|
11869
11869
|
const D = () => {
|
|
11870
|
-
const { useHTML: $ } = e, { tipContent: N } = i,
|
|
11871
|
-
return
|
|
11870
|
+
const { useHTML: $ } = e, { tipContent: N } = i, z = n.content;
|
|
11871
|
+
return z ? h("div", {
|
|
11872
11872
|
key: 1,
|
|
11873
11873
|
class: "vxe-table--tooltip-content"
|
|
11874
|
-
}, Xt(
|
|
11874
|
+
}, Xt(z({}))) : $ ? h("div", {
|
|
11875
11875
|
key: 2,
|
|
11876
11876
|
class: "vxe-table--tooltip-content",
|
|
11877
11877
|
innerHTML: N
|
|
@@ -11880,9 +11880,9 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11880
11880
|
class: "vxe-table--tooltip-content"
|
|
11881
11881
|
}, vn(N));
|
|
11882
11882
|
}, P = () => {
|
|
11883
|
-
const { popupClassName: $, theme: N, isArrow:
|
|
11884
|
-
let
|
|
11885
|
-
return ae && (
|
|
11883
|
+
const { popupClassName: $, theme: N, isArrow: z, enterable: ae } = e, { tipActive: de, visible: he, tipStore: Z } = i, K = n.default, J = l.value;
|
|
11884
|
+
let B;
|
|
11885
|
+
return ae && (B = {
|
|
11886
11886
|
onMouseenter: w,
|
|
11887
11887
|
onMouseleave: O
|
|
11888
11888
|
}), h("div", Object.assign({ ref: a, class: ["vxe-table--tooltip-wrapper", `theme--${N}`, $ ? f.isFunction($) ? $({ $tooltip: c }) : $ : "", {
|
|
@@ -11890,9 +11890,9 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11890
11890
|
[`placement--${Z.placement}`]: Z.placement,
|
|
11891
11891
|
"is--enterable": ae,
|
|
11892
11892
|
"is--visible": he,
|
|
11893
|
-
"is--arrow":
|
|
11893
|
+
"is--arrow": z,
|
|
11894
11894
|
"is--active": de
|
|
11895
|
-
}], style: Z.style },
|
|
11895
|
+
}], style: Z.style }, B), [
|
|
11896
11896
|
D(),
|
|
11897
11897
|
h("div", {
|
|
11898
11898
|
class: "vxe-table--tooltip-arrow",
|
|
@@ -11917,66 +11917,66 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11917
11917
|
setup(e) {
|
|
11918
11918
|
const t = xt("$xetable", {}), { reactData: n } = t, { computeCustomOpts: o, computeColumnOpts: r, computeIsMaxFixedColumn: l } = t.getComputeMaps(), i = Ce(), a = Ce(), s = Ce(), c = Ce();
|
|
11919
11919
|
let u;
|
|
11920
|
-
const m = (
|
|
11920
|
+
const m = (B) => {
|
|
11921
11921
|
const { customStore: A } = e;
|
|
11922
|
-
A.activeWrapper = !0, t.customOpenEvent(
|
|
11923
|
-
}, g = (
|
|
11922
|
+
A.activeWrapper = !0, t.customOpenEvent(B);
|
|
11923
|
+
}, g = (B) => {
|
|
11924
11924
|
const { customStore: A } = e;
|
|
11925
11925
|
A.activeWrapper = !1, setTimeout(() => {
|
|
11926
|
-
!A.activeBtn && !A.activeWrapper && t.customColseEvent(
|
|
11926
|
+
!A.activeBtn && !A.activeWrapper && t.customColseEvent(B);
|
|
11927
11927
|
}, 300);
|
|
11928
|
-
}, C = (
|
|
11929
|
-
|
|
11930
|
-
}, b = (
|
|
11931
|
-
t.closeCustom(), t.emitCustomEvent("cancel",
|
|
11932
|
-
}, y = (
|
|
11933
|
-
t.resetColumn(!0), t.closeCustom(), t.emitCustomEvent("reset",
|
|
11934
|
-
}, _ = (
|
|
11928
|
+
}, C = (B) => {
|
|
11929
|
+
z(), t.closeCustom(), t.emitCustomEvent("confirm", B);
|
|
11930
|
+
}, b = (B) => {
|
|
11931
|
+
t.closeCustom(), t.emitCustomEvent("cancel", B);
|
|
11932
|
+
}, y = (B) => {
|
|
11933
|
+
t.resetColumn(!0), t.closeCustom(), t.emitCustomEvent("reset", B);
|
|
11934
|
+
}, _ = (B) => {
|
|
11935
11935
|
at.modal ? at.modal.confirm({
|
|
11936
11936
|
content: T.i18n("vxe.custom.cstmConfirmRestore"),
|
|
11937
11937
|
className: "vxe-table--ignore-clear",
|
|
11938
11938
|
escClosable: !0
|
|
11939
11939
|
}).then((A) => {
|
|
11940
|
-
A === "confirm" && y(
|
|
11941
|
-
}) : y(
|
|
11942
|
-
}, w = (
|
|
11943
|
-
const { customColumnList: A } = n, k = f.findTree(A, (I) => I ===
|
|
11940
|
+
A === "confirm" && y(B);
|
|
11941
|
+
}) : y(B);
|
|
11942
|
+
}, w = (B) => {
|
|
11943
|
+
const { customColumnList: A } = n, k = f.findTree(A, (I) => I === B);
|
|
11944
11944
|
if (k && k.parent) {
|
|
11945
11945
|
const { parent: I } = k;
|
|
11946
11946
|
I.children && I.children.length && (I.visible = I.children.every((W) => W.visible), I.halfVisible = !I.visible && I.children.some((W) => W.visible || W.halfVisible), w(I));
|
|
11947
11947
|
}
|
|
11948
|
-
}, O = (
|
|
11949
|
-
const A = !
|
|
11950
|
-
f.eachTree([
|
|
11948
|
+
}, O = (B) => {
|
|
11949
|
+
const A = !B.visible, k = o.value;
|
|
11950
|
+
f.eachTree([B], (I) => {
|
|
11951
11951
|
I.visible = A, I.halfVisible = !1;
|
|
11952
|
-
}), w(
|
|
11953
|
-
}, x = (
|
|
11952
|
+
}), w(B), k.immediate && t.handleCustom(), t.checkCustomStatus();
|
|
11953
|
+
}, x = (B, A) => {
|
|
11954
11954
|
const k = l.value;
|
|
11955
|
-
|
|
11956
|
-
}, E = (
|
|
11957
|
-
l.value || t.setColumnFixed(
|
|
11955
|
+
B.fixed === A ? t.clearColumnFixed(B) : (!k || B.fixed) && t.setColumnFixed(B, A);
|
|
11956
|
+
}, E = (B) => {
|
|
11957
|
+
l.value || t.setColumnFixed(B, B.fixed);
|
|
11958
11958
|
}, D = () => {
|
|
11959
|
-
const { customStore:
|
|
11959
|
+
const { customStore: B } = e, { customColumnList: A } = n, k = o.value, { checkMethod: I } = k, W = !B.isAll;
|
|
11960
11960
|
f.eachTree(A, (q) => {
|
|
11961
11961
|
(!I || I({ column: q })) && (q.visible = W, q.halfVisible = !1);
|
|
11962
|
-
}),
|
|
11963
|
-
}, P = (
|
|
11964
|
-
const I =
|
|
11962
|
+
}), B.isAll = W, t.checkCustomStatus();
|
|
11963
|
+
}, P = (B) => {
|
|
11964
|
+
const I = B.currentTarget.parentNode.parentNode, W = I.getAttribute("colid"), q = t.getColumnById(W);
|
|
11965
11965
|
I.draggable = !0, c.value = q, Er(I, "active--drag-origin");
|
|
11966
|
-
}, $ = (
|
|
11967
|
-
const I =
|
|
11966
|
+
}, $ = (B) => {
|
|
11967
|
+
const I = B.currentTarget.parentNode.parentNode, W = s.value;
|
|
11968
11968
|
I.draggable = !1, c.value = null, go(I, "active--drag-origin"), W && (W.style.display = "");
|
|
11969
|
-
}, N = (
|
|
11969
|
+
}, N = (B) => {
|
|
11970
11970
|
const A = new Image();
|
|
11971
|
-
|
|
11972
|
-
},
|
|
11973
|
-
const { customColumnList:
|
|
11974
|
-
|
|
11971
|
+
B.dataTransfer && B.dataTransfer.setDragImage(A, 0, 0);
|
|
11972
|
+
}, z = () => {
|
|
11973
|
+
const { customColumnList: B } = n;
|
|
11974
|
+
B.forEach((A, k) => {
|
|
11975
11975
|
const I = k + 1;
|
|
11976
11976
|
A.renderSortNumber = I;
|
|
11977
11977
|
});
|
|
11978
|
-
}, ae = (
|
|
11979
|
-
const { customColumnList: A } = n, k =
|
|
11978
|
+
}, ae = (B) => {
|
|
11979
|
+
const { customColumnList: A } = n, k = B.currentTarget, I = s.value;
|
|
11980
11980
|
if (u) {
|
|
11981
11981
|
if (u !== k) {
|
|
11982
11982
|
const W = u.getAttribute("drag-pos"), q = k.getAttribute("colid"), ce = t.getColumnById(q);
|
|
@@ -11991,25 +11991,25 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
11991
11991
|
}
|
|
11992
11992
|
u.draggable = !1, u.removeAttribute("drag-pos"), go(u, "active--drag-target");
|
|
11993
11993
|
}
|
|
11994
|
-
c.value = null, k.draggable = !1, k.removeAttribute("drag-pos"), I && (I.style.display = ""), go(k, "active--drag-target"), go(k, "active--drag-origin"),
|
|
11995
|
-
}, de = (
|
|
11996
|
-
const A =
|
|
11994
|
+
c.value = null, k.draggable = !1, k.removeAttribute("drag-pos"), I && (I.style.display = ""), go(k, "active--drag-target"), go(k, "active--drag-origin"), z();
|
|
11995
|
+
}, de = (B) => {
|
|
11996
|
+
const A = B.currentTarget;
|
|
11997
11997
|
u !== A && go(u, "active--drag-target");
|
|
11998
11998
|
const k = A.getAttribute("colid"), I = t.getColumnById(k);
|
|
11999
11999
|
if (I && I.level === 1) {
|
|
12000
|
-
|
|
12001
|
-
const q =
|
|
12000
|
+
B.preventDefault();
|
|
12001
|
+
const q = B.clientY - A.getBoundingClientRect().y < A.clientHeight / 2 ? "top" : "bottom";
|
|
12002
12002
|
Er(A, "active--drag-target"), A.setAttribute("drag-pos", q), u = A;
|
|
12003
12003
|
}
|
|
12004
|
-
he(
|
|
12005
|
-
}, he = (
|
|
12004
|
+
he(B);
|
|
12005
|
+
}, he = (B) => {
|
|
12006
12006
|
const A = s.value, k = a.value;
|
|
12007
12007
|
if (k && A) {
|
|
12008
12008
|
const I = k.parentNode, W = I.getBoundingClientRect();
|
|
12009
|
-
A.style.display = "block", A.style.top = `${Math.min(I.clientHeight - I.scrollTop - A.clientHeight,
|
|
12009
|
+
A.style.display = "block", A.style.top = `${Math.min(I.clientHeight - I.scrollTop - A.clientHeight, B.clientY - W.y)}px`, A.style.left = `${Math.min(I.clientWidth - I.scrollLeft - A.clientWidth - 16, B.clientX - W.x)}px`;
|
|
12010
12010
|
}
|
|
12011
12011
|
}, Z = () => {
|
|
12012
|
-
const { customStore:
|
|
12012
|
+
const { customStore: B } = e, { customColumnList: A } = n, k = o.value, { maxHeight: I } = B, { checkMethod: W, visibleMethod: q, trigger: ce } = k, ke = l.value, xe = [], Ve = {};
|
|
12013
12013
|
ce === "hover" && (Ve.onMouseenter = m, Ve.onMouseleave = g), f.eachTree(A, (j, le, fe, be, Me) => {
|
|
12014
12014
|
if (q ? q({ column: j }) : !0) {
|
|
12015
12015
|
const ie = j.visible, ue = j.halfVisible, ye = j.children && j.children.length, Se = vn(j.getTitle(), 1), we = W ? !W({ column: j }) : !1;
|
|
@@ -12064,12 +12064,12 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
12064
12064
|
]));
|
|
12065
12065
|
}
|
|
12066
12066
|
});
|
|
12067
|
-
const je =
|
|
12067
|
+
const je = B.isAll, pe = B.isIndeterminate;
|
|
12068
12068
|
return h("div", {
|
|
12069
12069
|
ref: i,
|
|
12070
12070
|
key: "simple",
|
|
12071
12071
|
class: ["vxe-table-custom-wrapper", {
|
|
12072
|
-
"is--active":
|
|
12072
|
+
"is--active": B.visible
|
|
12073
12073
|
}]
|
|
12074
12074
|
}, [
|
|
12075
12075
|
h("ul", {
|
|
@@ -12112,7 +12112,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
12112
12112
|
]) : null
|
|
12113
12113
|
]);
|
|
12114
12114
|
}, K = () => {
|
|
12115
|
-
const { customStore:
|
|
12115
|
+
const { customStore: B } = e, { customColumnList: A } = n, k = o.value, { checkMethod: I, visibleMethod: W } = k, q = r.value, ce = l.value, ke = [];
|
|
12116
12116
|
return f.eachTree(A, (xe, Ve, je, pe, j) => {
|
|
12117
12117
|
if (W ? W({ column: xe }) : !0) {
|
|
12118
12118
|
const fe = xe.visible, be = xe.halfVisible, Me = vn(xe.getTitle(), 1), se = xe.children && xe.children.length, ie = I ? !I({ column: xe }) : !1;
|
|
@@ -12190,7 +12190,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
12190
12190
|
}), h(rl, {
|
|
12191
12191
|
key: "popup",
|
|
12192
12192
|
className: "vxe-table-custom-popup-wrapper vxe-table--ignore-clear",
|
|
12193
|
-
modelValue:
|
|
12193
|
+
modelValue: B.visible,
|
|
12194
12194
|
title: T.i18n("vxe.custom.cstmTitle"),
|
|
12195
12195
|
width: "40vw",
|
|
12196
12196
|
minWidth: 520,
|
|
@@ -12203,7 +12203,7 @@ const pM = ["fullValidate", "validate", "clearValidate"], mM = {
|
|
|
12203
12203
|
escClosable: !0,
|
|
12204
12204
|
destroyOnClose: !0,
|
|
12205
12205
|
"onUpdate:modelValue"(xe) {
|
|
12206
|
-
|
|
12206
|
+
B.visible = xe;
|
|
12207
12207
|
}
|
|
12208
12208
|
}, {
|
|
12209
12209
|
default: () => h("div", {
|
|
@@ -12497,20 +12497,20 @@ const bt = {
|
|
|
12497
12497
|
*/
|
|
12498
12498
|
renderTreeIcon(e, t) {
|
|
12499
12499
|
const { $table: n, isHidden: o } = e, { reactData: r } = n, { computeTreeOpts: l } = n.getComputeMaps(), { treeExpandedMaps: i, treeExpandLazyLoadedMaps: a } = r, s = l.value, { row: c, column: u, level: m } = e, { slots: g } = u, { indent: C, lazy: b, trigger: y, iconLoaded: _, showIcon: w, iconOpen: O, iconClose: x } = s, E = s.children || s.childrenField, D = s.hasChild || s.hasChildField, P = c[E], $ = g ? g.icon : null;
|
|
12500
|
-
let N = !1,
|
|
12500
|
+
let N = !1, z = !1, ae = !1;
|
|
12501
12501
|
const de = {};
|
|
12502
12502
|
if ($)
|
|
12503
12503
|
return n.callSlot($, e);
|
|
12504
12504
|
if (!o) {
|
|
12505
12505
|
const he = Xe(n, c);
|
|
12506
|
-
|
|
12506
|
+
z = !!i[he], b && (ae = !!a[he], N = c[D]);
|
|
12507
12507
|
}
|
|
12508
12508
|
return (!y || y === "default") && (de.onClick = (he) => {
|
|
12509
12509
|
he.stopPropagation(), n.triggerTreeExpandEvent(he, e);
|
|
12510
12510
|
}), [
|
|
12511
12511
|
h("div", {
|
|
12512
12512
|
class: ["vxe-cell--tree-node", {
|
|
12513
|
-
"is--active":
|
|
12513
|
+
"is--active": z
|
|
12514
12514
|
}],
|
|
12515
12515
|
style: {
|
|
12516
12516
|
paddingLeft: `${m * C}px`
|
|
@@ -12519,7 +12519,7 @@ const bt = {
|
|
|
12519
12519
|
w && (P && P.length || N) ? [
|
|
12520
12520
|
h("div", Object.assign({ class: "vxe-tree--btn-wrapper" }, de), [
|
|
12521
12521
|
h("i", {
|
|
12522
|
-
class: ["vxe-tree--node-btn", ae ? _ || T.icon.TABLE_TREE_LOADED :
|
|
12522
|
+
class: ["vxe-tree--node-btn", ae ? _ || T.icon.TABLE_TREE_LOADED : z ? O || T.icon.TABLE_TREE_OPEN : x || T.icon.TABLE_TREE_CLOSE]
|
|
12523
12523
|
})
|
|
12524
12524
|
])
|
|
12525
12525
|
] : null,
|
|
@@ -12621,12 +12621,12 @@ const bt = {
|
|
|
12621
12621
|
const E = !b || b({ row: n });
|
|
12622
12622
|
let D = !!C, P;
|
|
12623
12623
|
if (!r) {
|
|
12624
|
-
const
|
|
12625
|
-
x = !!s[
|
|
12624
|
+
const z = Xe(t, n);
|
|
12625
|
+
x = !!s[z], P = {
|
|
12626
12626
|
onClick(ae) {
|
|
12627
12627
|
!D && E && (ae.stopPropagation(), t.triggerCheckRowEvent(ae, e, !x));
|
|
12628
12628
|
}
|
|
12629
|
-
}, C && (D = !C({ row: n })), a && (O = !!c[
|
|
12629
|
+
}, C && (D = !C({ row: n })), a && (O = !!c[z]);
|
|
12630
12630
|
}
|
|
12631
12631
|
const $ = Object.assign(Object.assign({}, e), { checked: x, disabled: D, visible: E, indeterminate: O });
|
|
12632
12632
|
if (w)
|
|
@@ -12664,10 +12664,10 @@ const bt = {
|
|
|
12664
12664
|
const N = Object.assign(Object.assign({}, e), { checked: E, disabled: P, visible: D, indeterminate: x });
|
|
12665
12665
|
if (O)
|
|
12666
12666
|
return t.callSlot(O, N);
|
|
12667
|
-
const
|
|
12668
|
-
return D && (
|
|
12667
|
+
const z = [];
|
|
12668
|
+
return D && (z.push(h("span", {
|
|
12669
12669
|
class: ["vxe-checkbox--icon", x ? T.icon.TABLE_CHECKBOX_INDETERMINATE : E ? T.icon.TABLE_CHECKBOX_CHECKED : T.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
12670
|
-
})), (w || m) &&
|
|
12670
|
+
})), (w || m) && z.push(h("span", {
|
|
12671
12671
|
class: "vxe-checkbox--label"
|
|
12672
12672
|
}, w ? t.callSlot(w, N) : f.get(n, m)))), [
|
|
12673
12673
|
h("span", Object.assign({ class: ["vxe-cell--checkbox", {
|
|
@@ -12675,7 +12675,7 @@ const bt = {
|
|
|
12675
12675
|
"is--disabled": P,
|
|
12676
12676
|
"is--indeterminate": y && !E ? n[y] : x,
|
|
12677
12677
|
"is--hidden": !D
|
|
12678
|
-
}] }, $),
|
|
12678
|
+
}] }, $), z)
|
|
12679
12679
|
];
|
|
12680
12680
|
},
|
|
12681
12681
|
renderTreeSelectionCellByProp(e) {
|
|
@@ -13030,7 +13030,7 @@ const os = "body", TM = {
|
|
|
13030
13030
|
fixedType: { type: String, default: null }
|
|
13031
13031
|
},
|
|
13032
13032
|
setup(e) {
|
|
13033
|
-
const t = xt("$xetable", {}), n = xt("xesize", null), { xID: o, props: r, context: l, reactData: i, internalData: a } = t, { refTableHeader: s, refTableBody: c, refTableFooter: u, refTableLeftBody: m, refTableRightBody: g, refValidTooltip: C } = t.getRefMaps(), { computeEditOpts: b, computeMouseOpts: y, computeSYOpts: _, computeEmptyOpts: w, computeKeyboardOpts: O, computeTooltipOpts: x, computeRadioOpts: E, computeExpandOpts: D, computeTreeOpts: P, computeCheckboxOpts: $, computeValidOpts: N, computeRowOpts:
|
|
13033
|
+
const t = xt("$xetable", {}), n = xt("xesize", null), { xID: o, props: r, context: l, reactData: i, internalData: a } = t, { refTableHeader: s, refTableBody: c, refTableFooter: u, refTableLeftBody: m, refTableRightBody: g, refValidTooltip: C } = t.getRefMaps(), { computeEditOpts: b, computeMouseOpts: y, computeSYOpts: _, computeEmptyOpts: w, computeKeyboardOpts: O, computeTooltipOpts: x, computeRadioOpts: E, computeExpandOpts: D, computeTreeOpts: P, computeCheckboxOpts: $, computeValidOpts: N, computeRowOpts: z, computeColumnOpts: ae } = t.getComputeMaps(), de = Ce(), he = Ce(), Z = Ce(), K = Ce(), J = Ce(), B = Ce(), A = Ce(), k = () => {
|
|
13034
13034
|
if (n) {
|
|
13035
13035
|
const ye = n.value;
|
|
13036
13036
|
if (ye)
|
|
@@ -13072,7 +13072,7 @@ const os = "body", TM = {
|
|
|
13072
13072
|
])
|
|
13073
13073
|
] : [];
|
|
13074
13074
|
}, ke = (ye, Se, we, ze, Je, Qe, Ke, Pe, Fe, ee, me, De) => {
|
|
13075
|
-
const { columnKey: $e, height: U, showOverflow: Q, cellClassName: Ee, cellStyle: We, align: Ue, spanMethod: Ze, mouseConfig: lt, editConfig: st, editRules: ut, tooltipConfig: rt } = r, { tableData: mt, overflowX: Pt, scrollYLoad: H, currentColumn: Vt, mergeList: _t, editStore: Tt, isAllOverflow: gt, validErrorMaps: Bt } = i, { afterFullData: Mt } = a, Gt = N.value, Ft = $.value, zt = b.value, en = x.value, an =
|
|
13075
|
+
const { columnKey: $e, height: U, showOverflow: Q, cellClassName: Ee, cellStyle: We, align: Ue, spanMethod: Ze, mouseConfig: lt, editConfig: st, editRules: ut, tooltipConfig: rt } = r, { tableData: mt, overflowX: Pt, scrollYLoad: H, currentColumn: Vt, mergeList: _t, editStore: Tt, isAllOverflow: gt, validErrorMaps: Bt } = i, { afterFullData: Mt } = a, Gt = N.value, Ft = $.value, zt = b.value, en = x.value, an = z.value, En = _.value, mn = ae.value, { type: hn, cellRender: Dn, editRender: tn, align: on, showOverflow: rn, className: bn, treeNode: Nn, slots: yn } = Fe, { actived: Qn } = Tt, { rHeight: Eo } = En, { height: No } = an, dl = tn || Dn, Br = dl ? at.renderer.get(dl.name) : null, zl = Br ? Br.cellClassName : "", fl = Br ? Br.cellStyle : "", eo = en.showAll, Mn = t.getColumnIndex(Fe), So = t.getVTColumnIndex(Fe), To = Ot(tn);
|
|
13076
13076
|
let Po = we ? Fe.fixed !== we : Fe.fixed && Pt;
|
|
13077
13077
|
const pr = f.isUndefined(rn) || f.isNull(rn) ? Q : rn;
|
|
13078
13078
|
let qo = pr === "ellipsis";
|
|
@@ -13162,7 +13162,7 @@ const os = "body", TM = {
|
|
|
13162
13162
|
height: ko && (Eo || No) ? `${Eo || No}px` : ""
|
|
13163
13163
|
}, f.isFunction(fl) ? fl(Tn) : fl, f.isFunction(We) ? We(Tn) : We) }), Xo), mr);
|
|
13164
13164
|
}, xe = (ye, Se, we) => {
|
|
13165
|
-
const { stripe: ze, rowKey: Je, highlightHoverRow: Qe, rowClassName: Ke, rowStyle: Pe, showOverflow: Fe, editConfig: ee, treeConfig: me } = r, { hasFixedColumn: De, treeExpandedMaps: $e, scrollYLoad: U, rowExpandedMaps: Q, expandColumn: Ee, selectRadioRow: We, pendingRowMaps: Ue, pendingRowList: Ze } = i, { fullAllDataRowIdData: lt } = a, st = $.value, ut = E.value, rt = P.value, mt = b.value, Pt =
|
|
13165
|
+
const { stripe: ze, rowKey: Je, highlightHoverRow: Qe, rowClassName: Ke, rowStyle: Pe, showOverflow: Fe, editConfig: ee, treeConfig: me } = r, { hasFixedColumn: De, treeExpandedMaps: $e, scrollYLoad: U, rowExpandedMaps: Q, expandColumn: Ee, selectRadioRow: We, pendingRowMaps: Ue, pendingRowList: Ze } = i, { fullAllDataRowIdData: lt } = a, st = $.value, ut = E.value, rt = P.value, mt = b.value, Pt = z.value, { transform: H } = rt, Vt = rt.children || rt.childrenField, _t = [];
|
|
13166
13166
|
return Se.forEach((Tt, gt) => {
|
|
13167
13167
|
const Bt = {};
|
|
13168
13168
|
let Mt = gt;
|
|
@@ -13224,7 +13224,7 @@ const os = "body", TM = {
|
|
|
13224
13224
|
Ya(we), Ya(ze), i.lastScrollTime = Date.now();
|
|
13225
13225
|
}, 300));
|
|
13226
13226
|
}, pe = (ye) => {
|
|
13227
|
-
const { fixedType: Se } = e, { highlightHoverRow: we } = r, { scrollXLoad: ze, scrollYLoad: Je } = i, { elemStore: Qe, lastScrollTop: Ke, lastScrollLeft: Pe } = a, Fe =
|
|
13227
|
+
const { fixedType: Se } = e, { highlightHoverRow: we } = r, { scrollXLoad: ze, scrollYLoad: Je } = i, { elemStore: Qe, lastScrollTop: Ke, lastScrollLeft: Pe } = a, Fe = z.value, ee = s.value, me = c.value, De = u.value, $e = m.value, U = g.value, Q = C.value, Ee = de.value, We = ee ? ee.$el : null, Ue = De ? De.$el : null, Ze = me.$el, lt = $e ? $e.$el : null, st = U ? U.$el : null, ut = Qe["main-body-ySpace"], rt = ut ? ut.value : null, mt = Qe["main-body-xSpace"], Pt = mt ? mt.value : null, H = Je && rt ? rt.clientHeight : Ze.clientHeight, Vt = ze && Pt ? Pt.clientWidth : Ze.clientWidth;
|
|
13228
13228
|
let _t = Ee.scrollTop;
|
|
13229
13229
|
const Tt = Ze.scrollLeft, gt = Tt !== Pe, Bt = _t !== Ke;
|
|
13230
13230
|
a.lastScrollTop = _t, a.lastScrollLeft = Tt, i.lastScrollTime = Date.now(), (Fe.isHover || we) && t.clearHoverRow(), lt && Se === "left" ? (_t = lt.scrollTop, je(Se, _t, Ze, st)) : st && Se === "right" ? (_t = st.scrollTop, je(Se, _t, Ze, lt)) : (gt && (We && (We.scrollLeft = Ze.scrollLeft), Ue && (Ue.scrollLeft = Ze.scrollLeft)), (lt || st) && (t.checkScrolling(), Bt && je(Se, _t, lt, st))), ze && gt && t.triggerScrollXEvent(ye), Je && Bt && t.triggerScrollYEvent(ye), gt && Q && Q.reactData.visible && Q.updatePlacement(), t.dispatchEvent("scroll", {
|
|
@@ -13265,7 +13265,7 @@ const os = "body", TM = {
|
|
|
13265
13265
|
};
|
|
13266
13266
|
ut();
|
|
13267
13267
|
}, ie = (ye) => {
|
|
13268
|
-
const { deltaY: Se, deltaX: we } = ye, { highlightHoverRow: ze } = r, { scrollYLoad: Je } = i, { lastScrollTop: Qe, lastScrollLeft: Ke } = a, Pe =
|
|
13268
|
+
const { deltaY: Se, deltaX: we } = ye, { highlightHoverRow: ze } = r, { scrollYLoad: Je } = i, { lastScrollTop: Qe, lastScrollLeft: Ke } = a, Pe = z.value, Fe = c.value, ee = de.value, me = Fe.$el, De = Se, $e = we, U = De < 0;
|
|
13269
13269
|
if (U ? ee.scrollTop <= 0 : ee.scrollTop >= ee.scrollHeight - ee.clientHeight)
|
|
13270
13270
|
return;
|
|
13271
13271
|
const Q = ee.scrollTop + De, Ee = me.scrollLeft + $e, We = Ee !== Ke, Ue = Q !== Qe;
|
|
@@ -13274,7 +13274,7 @@ const os = "body", TM = {
|
|
|
13274
13274
|
return un(() => {
|
|
13275
13275
|
te(() => {
|
|
13276
13276
|
const { fixedType: ye } = e, { elemStore: Se } = a, we = `${ye || "main"}-body-`, ze = de.value;
|
|
13277
|
-
Se[`${we}wrapper`] = de, Se[`${we}table`] = he, Se[`${we}colgroup`] = Z, Se[`${we}list`] = K, Se[`${we}xSpace`] = J, Se[`${we}ySpace`] =
|
|
13277
|
+
Se[`${we}wrapper`] = de, Se[`${we}table`] = he, Se[`${we}colgroup`] = Z, Se[`${we}list`] = K, Se[`${we}xSpace`] = J, Se[`${we}ySpace`] = B, Se[`${we}emptyBlock`] = A, ze && (ze.onscroll = pe, ze._onscroll = pe);
|
|
13278
13278
|
});
|
|
13279
13279
|
}), ad(() => {
|
|
13280
13280
|
const ye = de.value;
|
|
@@ -13300,7 +13300,7 @@ const os = "body", TM = {
|
|
|
13300
13300
|
class: "vxe-body--x-space"
|
|
13301
13301
|
}),
|
|
13302
13302
|
h("div", {
|
|
13303
|
-
ref:
|
|
13303
|
+
ref: B,
|
|
13304
13304
|
class: "vxe-body--y-space"
|
|
13305
13305
|
}),
|
|
13306
13306
|
h("table", {
|
|
@@ -13381,11 +13381,11 @@ const os = "body", TM = {
|
|
|
13381
13381
|
const { isGroup: P } = r;
|
|
13382
13382
|
g.value = P ? t_(e.tableGroupColumn) : [];
|
|
13383
13383
|
}, E = (P, $) => {
|
|
13384
|
-
const { column: N } = $, { fixedType:
|
|
13384
|
+
const { column: N } = $, { fixedType: z } = e, ae = a.value, de = s.value, he = c.value, Z = u.value, { clientX: K } = P, J = C.value, B = P.target, A = $.cell = B.parentNode;
|
|
13385
13385
|
let k = 0;
|
|
13386
|
-
const I = ae.$el, W = QD(
|
|
13386
|
+
const I = ae.$el, W = QD(B, J), q = B.clientWidth, ce = Math.floor(q / 2), ke = o_($) - ce;
|
|
13387
13387
|
let xe = W.left - A.clientWidth + q + ke, Ve = W.left + ce;
|
|
13388
|
-
const je = document.onmousemove, pe = document.onmouseup, j =
|
|
13388
|
+
const je = document.onmousemove, pe = document.onmouseup, j = z === "left", le = z === "right", fe = i.value;
|
|
13389
13389
|
let be = 0;
|
|
13390
13390
|
if (j || le) {
|
|
13391
13391
|
const se = j ? "nextElementSibling" : "previousElementSibling";
|
|
@@ -13398,7 +13398,7 @@ const os = "body", TM = {
|
|
|
13398
13398
|
se.stopPropagation(), se.preventDefault();
|
|
13399
13399
|
const ie = se.clientX - K;
|
|
13400
13400
|
let ue = Ve + ie;
|
|
13401
|
-
const ye =
|
|
13401
|
+
const ye = z ? 0 : I.scrollLeft;
|
|
13402
13402
|
j ? ue = Math.min(ue, (he ? he.offsetLeft : I.clientWidth) - be - ke) : le ? (xe = (de ? de.clientWidth : 0) + be + ke, ue = Math.min(ue, Ve + A.clientWidth - ke)) : xe = Math.max(I.scrollLeft, xe), k = Math.max(ue, xe), Z.style.left = `${k - ye}px`;
|
|
13403
13403
|
};
|
|
13404
13404
|
r._isResize = !0, Er(fe, "drag--resize"), Z.style.display = "block", document.onmousemove = Me, document.onmouseup = function(se) {
|
|
@@ -13411,16 +13411,16 @@ const os = "body", TM = {
|
|
|
13411
13411
|
};
|
|
13412
13412
|
return tt(() => e.tableColumn, x), un(() => {
|
|
13413
13413
|
te(() => {
|
|
13414
|
-
const { fixedType: P } = e, { internalData: $ } = t, { elemStore: N } = $,
|
|
13415
|
-
N[`${
|
|
13414
|
+
const { fixedType: P } = e, { internalData: $ } = t, { elemStore: N } = $, z = `${P || "main"}-header-`;
|
|
13415
|
+
N[`${z}wrapper`] = C, N[`${z}table`] = b, N[`${z}colgroup`] = y, N[`${z}list`] = _, N[`${z}xSpace`] = w, N[`${z}repair`] = O, x();
|
|
13416
13416
|
});
|
|
13417
13417
|
}), pn(() => {
|
|
13418
|
-
const { fixedType: P } = e, { internalData: $ } = t, { elemStore: N } = $,
|
|
13419
|
-
N[`${
|
|
13418
|
+
const { fixedType: P } = e, { internalData: $ } = t, { elemStore: N } = $, z = `${P || "main"}-header-`;
|
|
13419
|
+
N[`${z}wrapper`] = null, N[`${z}table`] = null, N[`${z}colgroup`] = null, N[`${z}list`] = null, N[`${z}xSpace`] = null, N[`${z}repair`] = null;
|
|
13420
13420
|
}), () => {
|
|
13421
|
-
const { fixedType: P, fixedColumn: $, tableColumn: N } = e, { resizable:
|
|
13421
|
+
const { fixedType: P, fixedColumn: $, tableColumn: N } = e, { resizable: z, border: ae, columnKey: de, headerRowClassName: he, headerCellClassName: Z, headerRowStyle: K, headerCellStyle: J, showHeaderOverflow: B, headerAlign: A, align: k, mouseConfig: I } = o, { isGroup: W, currentColumn: q, scrollXLoad: ce, overflowX: ke, scrollbarWidth: xe } = r, { visibleColumn: Ve } = l, je = m.value;
|
|
13422
13422
|
let pe = g.value, j = N;
|
|
13423
|
-
return W ? j = Ve : (P && (ce ||
|
|
13423
|
+
return W ? j = Ve : (P && (ce || B) && (j = $), pe = [j]), h("div", {
|
|
13424
13424
|
ref: C,
|
|
13425
13425
|
class: ["vxe-table--header-wrapper", P ? `fixed-${P}--wrapper` : "body--wrapper"],
|
|
13426
13426
|
xid: n
|
|
@@ -13459,7 +13459,7 @@ const os = "body", TM = {
|
|
|
13459
13459
|
class: ["vxe-header--row", he ? f.isFunction(he) ? he({ $table: t, $rowIndex: fe, fixed: P, type: mu }) : he : ""],
|
|
13460
13460
|
style: K ? f.isFunction(K) ? K({ $table: t, $rowIndex: fe, fixed: P, type: mu }) : K : null
|
|
13461
13461
|
}, le.map((be, Me) => {
|
|
13462
|
-
const { type: se, showHeaderOverflow: ie, headerAlign: ue, align: ye, headerClassName: Se } = be, we = be.children && be.children.length, ze = P ? be.fixed !== P && !we : !!be.fixed && ke, Je = f.isUndefined(ie) || f.isNull(ie) ?
|
|
13462
|
+
const { type: se, showHeaderOverflow: ie, headerAlign: ue, align: ye, headerClassName: Se } = be, we = be.children && be.children.length, ze = P ? be.fixed !== P && !we : !!be.fixed && ke, Je = f.isUndefined(ie) || f.isNull(ie) ? B : ie, Qe = ue || ye || A || k;
|
|
13463
13463
|
let Ke = Je === "ellipsis";
|
|
13464
13464
|
const Pe = Je === "title", Fe = Je === !0 || Je === "tooltip";
|
|
13465
13465
|
let ee = Pe || Fe || Ke;
|
|
@@ -13496,7 +13496,7 @@ const os = "body", TM = {
|
|
|
13496
13496
|
/**
|
|
13497
13497
|
* 列宽拖动
|
|
13498
13498
|
*/
|
|
13499
|
-
!ze && !we && (f.isBoolean(be.resizable) ? be.resizable : je.resizable ||
|
|
13499
|
+
!ze && !we && (f.isBoolean(be.resizable) ? be.resizable : je.resizable || z) ? h("div", {
|
|
13500
13500
|
class: ["vxe-resizable", {
|
|
13501
13501
|
"is--line": !ae || ae === "none"
|
|
13502
13502
|
}],
|
|
@@ -13541,8 +13541,8 @@ const Nm = nt({
|
|
|
13541
13541
|
},
|
|
13542
13542
|
setup(e) {
|
|
13543
13543
|
const t = xt("$xetable", {}), { xID: n, props: o, reactData: r, internalData: l } = t, { refTableHeader: i, refTableBody: a, refValidTooltip: s } = t.getRefMaps(), { computeTooltipOpts: c, computeColumnOpts: u } = t.getComputeMaps(), m = Ce(), g = Ce(), C = Ce(), b = Ce(), y = Ce(), _ = (O) => {
|
|
13544
|
-
const { fixedType: x } = e, { scrollXLoad: E } = r, { lastScrollLeft: D } = l, P = s.value, $ = i.value, N = a.value,
|
|
13545
|
-
l.lastScrollLeft = he, r.lastScrollTime = Date.now(),
|
|
13544
|
+
const { fixedType: x } = e, { scrollXLoad: E } = r, { lastScrollLeft: D } = l, P = s.value, $ = i.value, N = a.value, z = $ ? $.$el : null, ae = m.value, de = N.$el, he = ae.scrollLeft, Z = he !== D;
|
|
13545
|
+
l.lastScrollLeft = he, r.lastScrollTime = Date.now(), z && (z.scrollLeft = he), de && (de.scrollLeft = he), E && Z && t.triggerScrollXEvent(O), Z && P && P.reactData.visible && P.updatePlacement(), t.dispatchEvent("scroll", { type: hu, fixed: x, scrollTop: de.scrollTop, scrollLeft: he, isX: Z, isY: !1 }, O);
|
|
13546
13546
|
};
|
|
13547
13547
|
return un(() => {
|
|
13548
13548
|
te(() => {
|
|
@@ -13554,8 +13554,8 @@ const Nm = nt({
|
|
|
13554
13554
|
x[`${E}wrapper`] = null, x[`${E}table`] = null, x[`${E}colgroup`] = null, x[`${E}list`] = null, x[`${E}xSpace`] = null;
|
|
13555
13555
|
}), () => {
|
|
13556
13556
|
let { fixedType: O, fixedColumn: x, tableColumn: E, footerTableData: D } = e;
|
|
13557
|
-
const { footerRowClassName: P, footerCellClassName: $, footerRowStyle: N, footerCellStyle:
|
|
13558
|
-
return O && (!r.expandColumn && (
|
|
13557
|
+
const { footerRowClassName: P, footerCellClassName: $, footerRowStyle: N, footerCellStyle: z, footerAlign: ae, footerSpanMethod: de, align: he, columnKey: Z, showFooterOverflow: K } = o, { visibleColumn: J } = l, { scrollXLoad: B, overflowX: A, scrollbarWidth: k, currentColumn: I, mergeFooterList: W } = r, q = c.value, ce = u.value;
|
|
13558
|
+
return O && (!r.expandColumn && (B || K) && (!W.length || !de) ? E = x : E = J), h("div", {
|
|
13559
13559
|
ref: m,
|
|
13560
13560
|
class: ["vxe-table--footer-wrapper", O ? `fixed-${O}--wrapper` : "body--wrapper"],
|
|
13561
13561
|
xid: n,
|
|
@@ -13618,7 +13618,7 @@ const Nm = nt({
|
|
|
13618
13618
|
type: hu,
|
|
13619
13619
|
data: D
|
|
13620
13620
|
};
|
|
13621
|
-
if (
|
|
13621
|
+
if (B && !Ke && (ze = Ke = !0), (Je || Qe || ie) && (Fe.onMouseenter = (U) => {
|
|
13622
13622
|
Je ? Hd(U.currentTarget, pe) : (Qe || ie) && t.triggerFooterTooltipEvent(U, $e);
|
|
13623
13623
|
}), (Qe || ie) && (Fe.onMouseleave = (U) => {
|
|
13624
13624
|
(Qe || ie) && t.handleTargetLeaveEvent(U);
|
|
@@ -13647,7 +13647,7 @@ const Nm = nt({
|
|
|
13647
13647
|
"fixed--hidden": ye,
|
|
13648
13648
|
"col--ellipsis": Ke,
|
|
13649
13649
|
"col--current": I === pe
|
|
13650
|
-
}, Qr(se, $e), Qr($, $e)] }, Pe), { style:
|
|
13650
|
+
}, Qr(se, $e), Qr($, $e)] }, Pe), { style: z ? f.isFunction(z) ? z($e) : z : null }), Fe), { key: Z || ce.useKey ? pe.id : j }), [
|
|
13651
13651
|
h("div", {
|
|
13652
13652
|
class: ["vxe-cell", {
|
|
13653
13653
|
"c--title": Je,
|
|
@@ -14193,7 +14193,7 @@ const Nm = nt({
|
|
|
14193
14193
|
isActivated: !1
|
|
14194
14194
|
};
|
|
14195
14195
|
let u = {}, m = {};
|
|
14196
|
-
const g = Ce(), C = Ce(), b = Ce(), y = Ce(), _ = Ce(), w = Ce(), O = Ce(), x = Ce(), E = Ce(), D = Ce(), P = Ce(), $ = Ce(), N = Ce(),
|
|
14196
|
+
const g = Ce(), C = Ce(), b = Ce(), y = Ce(), _ = Ce(), w = Ce(), O = Ce(), x = Ce(), E = Ce(), D = Ce(), P = Ce(), $ = Ce(), N = Ce(), z = Ce(), ae = Ce(), de = Ce(), he = Ce(), Z = Ce(), K = Ce(), J = Ce(), B = xt("$xegrid", null);
|
|
14197
14197
|
let A;
|
|
14198
14198
|
const k = X(() => Object.assign({}, T.table.validConfig, e.validConfig)), I = X(() => Object.assign({}, T.table.scrollX, e.scrollX)), W = X(() => Object.assign({}, T.table.scrollY, e.scrollY)), q = X(() => ({
|
|
14199
14199
|
default: 48,
|
|
@@ -14256,7 +14256,7 @@ const Nm = nt({
|
|
|
14256
14256
|
refTableLeftHeader: P,
|
|
14257
14257
|
refTableLeftBody: $,
|
|
14258
14258
|
refTableLeftFooter: N,
|
|
14259
|
-
refTableRightHeader:
|
|
14259
|
+
refTableRightHeader: z,
|
|
14260
14260
|
refTableRightBody: ae,
|
|
14261
14261
|
refTableRightFooter: de,
|
|
14262
14262
|
refLeftContainer: he,
|
|
@@ -14308,7 +14308,7 @@ const Nm = nt({
|
|
|
14308
14308
|
internalData: c,
|
|
14309
14309
|
getRefMaps: () => mt,
|
|
14310
14310
|
getComputeMaps: () => Pt,
|
|
14311
|
-
xegrid:
|
|
14311
|
+
xegrid: B
|
|
14312
14312
|
}, Vt = (d, p, v) => {
|
|
14313
14313
|
const S = f.get(d, v), R = f.get(p, v);
|
|
14314
14314
|
return zo(S) && zo(R) ? !0 : f.isString(S) || f.isNumber(S) ? "" + S == "" + R : f.isEqual(S, R);
|
|
@@ -14990,7 +14990,7 @@ const Nm = nt({
|
|
|
14990
14990
|
let ra;
|
|
14991
14991
|
u = {
|
|
14992
14992
|
dispatchEvent(d, p, v) {
|
|
14993
|
-
o(d, Object.assign({ $table: H, $grid:
|
|
14993
|
+
o(d, Object.assign({ $table: H, $grid: B, $event: v }, p));
|
|
14994
14994
|
},
|
|
14995
14995
|
/**
|
|
14996
14996
|
* 重置表格的一切数据状态
|
|
@@ -16006,7 +16006,7 @@ const Nm = nt({
|
|
|
16006
16006
|
updateFooter() {
|
|
16007
16007
|
const { showFooter: d, footerData: p, footerMethod: v } = e, { visibleColumn: S, afterFullData: R } = c;
|
|
16008
16008
|
let V = [];
|
|
16009
|
-
return d && p && p.length ? V = p.slice(0) : d && v && (V = S.length ? v({ columns: S, data: R, $table: H, $grid:
|
|
16009
|
+
return d && p && p.length ? V = p.slice(0) : d && v && (V = S.length ? v({ columns: S, data: R, $table: H, $grid: B }) : []), s.footerTableData = V, te();
|
|
16010
16010
|
},
|
|
16011
16011
|
/**
|
|
16012
16012
|
* 更新列状态 updateStatus({ row, column }, cellValue)
|
|
@@ -16119,11 +16119,11 @@ const Nm = nt({
|
|
|
16119
16119
|
!Rt(d, Y).flag) && setTimeout(() => H.clearEdit(d));
|
|
16120
16120
|
})));
|
|
16121
16121
|
}
|
|
16122
|
-
} else V && !Rt(d, Y).flag && !(
|
|
16122
|
+
} else V && !Rt(d, Y).flag && !(B && Rt(d, B.getRefMaps().refElem.value).flag) && !(Re && Rt(d, Re.getRefMaps().refElem.value).flag) && !(A && Rt(d, A.getRefMaps().refElem.value).flag) && (H.clearSelected && H.clearSelected(), ne.autoClear && H.clearCellAreas && (Rt(d, document.body, "vxe-table--ignore-areas-clear").flag || m.preventEvent(d, "event.clearAreas", {}, () => {
|
|
16123
16123
|
H.clearCellAreas(), H.clearCopyCellArea();
|
|
16124
16124
|
})));
|
|
16125
16125
|
H.closeMenu && v.visible && Re && !Rt(d, Re.getRefMaps().refElem.value).flag && H.closeMenu();
|
|
16126
|
-
const He = Rt(d,
|
|
16126
|
+
const He = Rt(d, B ? B.getRefMaps().refElem.value : Y).flag;
|
|
16127
16127
|
!He && L && re.autoClear && (s.validErrorMaps = {}), c.isActivated = He;
|
|
16128
16128
|
}, $c = () => {
|
|
16129
16129
|
u.closeFilter(), H.closeMenu && H.closeMenu();
|
|
@@ -16216,14 +16216,14 @@ const Nm = nt({
|
|
|
16216
16216
|
const { editMethod: Rn } = Te;
|
|
16217
16217
|
if (Oe.column && Oe.row && Ot(Oe.column.editRender)) {
|
|
16218
16218
|
const no = _e.beforeEditMethod || _e.activeMethod;
|
|
16219
|
-
if (!no || no(Object.assign(Object.assign({}, Oe.args), { $table: H, $grid:
|
|
16219
|
+
if (!no || no(Object.assign(Object.assign({}, Oe.args), { $table: H, $grid: B }))) {
|
|
16220
16220
|
Rn ? Rn({
|
|
16221
16221
|
row: Oe.row,
|
|
16222
16222
|
rowIndex: u.getRowIndex(Oe.row),
|
|
16223
16223
|
column: Oe.column,
|
|
16224
16224
|
columnIndex: u.getColumnIndex(Oe.column),
|
|
16225
16225
|
$table: H,
|
|
16226
|
-
$grid:
|
|
16226
|
+
$grid: B
|
|
16227
16227
|
}) : (Cr(Oe.row, Oe.column, null), H.handleActived(Oe.args, d));
|
|
16228
16228
|
const In = _e.afterEditMethod;
|
|
16229
16229
|
In && te(() => {
|
|
@@ -16233,7 +16233,7 @@ const Nm = nt({
|
|
|
16233
16233
|
column: Oe.column,
|
|
16234
16234
|
columnIndex: u.getColumnIndex(Oe.column),
|
|
16235
16235
|
$table: H,
|
|
16236
|
-
$grid:
|
|
16236
|
+
$grid: B
|
|
16237
16237
|
});
|
|
16238
16238
|
});
|
|
16239
16239
|
}
|
|
@@ -16274,8 +16274,8 @@ const Nm = nt({
|
|
|
16274
16274
|
updateAfterDataIndex: rn,
|
|
16275
16275
|
callSlot(d, p) {
|
|
16276
16276
|
if (d) {
|
|
16277
|
-
if (
|
|
16278
|
-
return
|
|
16277
|
+
if (B)
|
|
16278
|
+
return B.callSlot(d, p);
|
|
16279
16279
|
if (f.isFunction(d))
|
|
16280
16280
|
return Xt(d(p));
|
|
16281
16281
|
}
|
|
@@ -16286,8 +16286,8 @@ const Nm = nt({
|
|
|
16286
16286
|
*/
|
|
16287
16287
|
getParentElem() {
|
|
16288
16288
|
const d = g.value;
|
|
16289
|
-
if (
|
|
16290
|
-
const p =
|
|
16289
|
+
if (B) {
|
|
16290
|
+
const p = B.getRefMaps().refElem.value;
|
|
16291
16291
|
return p ? p.parentNode : null;
|
|
16292
16292
|
}
|
|
16293
16293
|
return d ? d.parentNode : null;
|
|
@@ -16299,7 +16299,7 @@ const Nm = nt({
|
|
|
16299
16299
|
const { height: d } = e, p = g.value;
|
|
16300
16300
|
if (p) {
|
|
16301
16301
|
const v = p.parentNode, S = d === "auto" ? Yu(v) : 0;
|
|
16302
|
-
return Math.floor(
|
|
16302
|
+
return Math.floor(B ? B.getParentHeight() : f.toNumber(getComputedStyle(v).height) - S);
|
|
16303
16303
|
}
|
|
16304
16304
|
return 0;
|
|
16305
16305
|
},
|
|
@@ -16309,7 +16309,7 @@ const Nm = nt({
|
|
|
16309
16309
|
* 如果存在表尾合计滚动条,则需要排除滚动条高度
|
|
16310
16310
|
*/
|
|
16311
16311
|
getExcludeHeight() {
|
|
16312
|
-
return
|
|
16312
|
+
return B ? B.getExcludeHeight() : 0;
|
|
16313
16313
|
},
|
|
16314
16314
|
/**
|
|
16315
16315
|
* 定义行数据中的列属性,如果不存在则定义
|
|
@@ -16467,7 +16467,7 @@ const Nm = nt({
|
|
|
16467
16467
|
let V = at.interceptor.get(p);
|
|
16468
16468
|
!V.length && p === "event.clearEdit" && (V = at.interceptor.get("event.clearActived"));
|
|
16469
16469
|
let L;
|
|
16470
|
-
return V.some((Y) => Y(Object.assign({ $grid:
|
|
16470
|
+
return V.some((Y) => Y(Object.assign({ $grid: B, $table: H, $event: d }, v)) === !1) || S && (L = S()), R && R(), L;
|
|
16471
16471
|
},
|
|
16472
16472
|
checkSelectionStatus() {
|
|
16473
16473
|
const { treeConfig: d } = e, { selectCheckboxMaps: p, treeIndeterminateMaps: v } = s, { afterFullData: S } = c, R = j.value, { checkField: V, checkStrictly: L, checkMethod: Y } = R, G = R.indeterminateField || R.halfField;
|
|
@@ -16835,7 +16835,7 @@ const Nm = nt({
|
|
|
16835
16835
|
class: `vxe-table--fixed-${d}-wrapper`
|
|
16836
16836
|
}, [
|
|
16837
16837
|
p ? h(Fm, {
|
|
16838
|
-
ref: G ? P :
|
|
16838
|
+
ref: G ? P : z,
|
|
16839
16839
|
fixedType: d,
|
|
16840
16840
|
tableData: S,
|
|
16841
16841
|
tableColumn: R,
|
|
@@ -17109,7 +17109,7 @@ const Nm = nt({
|
|
|
17109
17109
|
icon: co.icon,
|
|
17110
17110
|
text: co.text
|
|
17111
17111
|
}, cn ? {
|
|
17112
|
-
default: () => cn({ $table: H, $grid:
|
|
17112
|
+
default: () => cn({ $table: H, $grid: B })
|
|
17113
17113
|
} : {}),
|
|
17114
17114
|
/**
|
|
17115
17115
|
* 自定义列
|
|
@@ -17265,7 +17265,7 @@ const hi = nt({
|
|
|
17265
17265
|
}, N = (j) => {
|
|
17266
17266
|
const { currentPage: le } = e, fe = b.value;
|
|
17267
17267
|
le < fe && _(Math.min(fe, le + 1), j);
|
|
17268
|
-
},
|
|
17268
|
+
}, z = (j) => {
|
|
17269
17269
|
const le = O.value;
|
|
17270
17270
|
_(Math.max(e.currentPage - le.length, 1), j);
|
|
17271
17271
|
}, ae = (j) => {
|
|
@@ -17302,14 +17302,14 @@ const hi = nt({
|
|
|
17302
17302
|
h("i", {
|
|
17303
17303
|
class: ["vxe-pager--btn-icon", e.iconPrevPage || T.icon.PAGER_PREV_PAGE]
|
|
17304
17304
|
})
|
|
17305
|
-
]),
|
|
17305
|
+
]), B = (j) => h(j || "button", {
|
|
17306
17306
|
class: ["vxe-pager--jump-prev", {
|
|
17307
17307
|
"is--fixed": !j,
|
|
17308
17308
|
"is--disabled": e.currentPage <= 1
|
|
17309
17309
|
}],
|
|
17310
17310
|
type: "button",
|
|
17311
17311
|
title: T.i18n("vxe.pager.prevJumpTitle"),
|
|
17312
|
-
onClick:
|
|
17312
|
+
onClick: z
|
|
17313
17313
|
}, [
|
|
17314
17314
|
j ? h("i", {
|
|
17315
17315
|
class: ["vxe-pager--jump-more-icon", e.iconJumpMore || T.icon.PAGER_JUMP_MORE]
|
|
@@ -17370,7 +17370,7 @@ const hi = nt({
|
|
|
17370
17370
|
class: "vxe-pager--num-btn",
|
|
17371
17371
|
type: "button",
|
|
17372
17372
|
onClick: (ze) => y(ze, 1)
|
|
17373
|
-
}, 1),
|
|
17373
|
+
}, 1), B("span")), se.forEach((ze, Je) => {
|
|
17374
17374
|
const Qe = we + Je;
|
|
17375
17375
|
Qe <= Me && be.push(h("button", {
|
|
17376
17376
|
key: Qe,
|
|
@@ -17445,7 +17445,7 @@ const hi = nt({
|
|
|
17445
17445
|
return N(), te();
|
|
17446
17446
|
},
|
|
17447
17447
|
prevJump() {
|
|
17448
|
-
return
|
|
17448
|
+
return z(), te();
|
|
17449
17449
|
},
|
|
17450
17450
|
nextJump() {
|
|
17451
17451
|
return ae(), te();
|
|
@@ -17453,7 +17453,7 @@ const hi = nt({
|
|
|
17453
17453
|
}, g = {
|
|
17454
17454
|
handlePrevPage: $,
|
|
17455
17455
|
handleNextPage: N,
|
|
17456
|
-
handlePrevJump:
|
|
17456
|
+
handlePrevJump: z,
|
|
17457
17457
|
handleNextJump: ae
|
|
17458
17458
|
}, Object.assign(u, m, g), tt(() => e.currentPage, (j) => {
|
|
17459
17459
|
a.inpCurrPage = j;
|
|
@@ -17469,7 +17469,7 @@ const hi = nt({
|
|
|
17469
17469
|
ue = K;
|
|
17470
17470
|
break;
|
|
17471
17471
|
case "PrevJump":
|
|
17472
|
-
ue =
|
|
17472
|
+
ue = B;
|
|
17473
17473
|
break;
|
|
17474
17474
|
case "PrevPage":
|
|
17475
17475
|
ue = J;
|
|
@@ -17592,7 +17592,7 @@ const gi = nt({
|
|
|
17592
17592
|
g && (g.triggerCustomEvent ? g.triggerCustomEvent(pe) : Cn("vxe.error.reqModule", ["VxeTableCustomModule"]));
|
|
17593
17593
|
}, N = ({ $event: pe }) => {
|
|
17594
17594
|
g ? g.customOpenEvent(pe) : Cn("vxe.error.reqModule", ["VxeTableCustomModule"]);
|
|
17595
|
-
},
|
|
17595
|
+
}, z = ({ $event: pe }) => {
|
|
17596
17596
|
const { customStore: j } = g.reactData;
|
|
17597
17597
|
j.activeBtn = !1, setTimeout(() => {
|
|
17598
17598
|
!j.activeBtn && !j.activeWrapper && g.customColseEvent(pe);
|
|
@@ -17638,7 +17638,7 @@ const gi = nt({
|
|
|
17638
17638
|
P() && g.openImport();
|
|
17639
17639
|
}, J = () => {
|
|
17640
17640
|
P() && g.openExport();
|
|
17641
|
-
},
|
|
17641
|
+
}, B = () => {
|
|
17642
17642
|
P() && g.openPrint();
|
|
17643
17643
|
}, A = (pe, j) => {
|
|
17644
17644
|
const { dropdowns: le } = pe, fe = [];
|
|
@@ -17747,7 +17747,7 @@ const gi = nt({
|
|
|
17747
17747
|
circle: !0,
|
|
17748
17748
|
icon: pe.icon || T.icon.TOOLBAR_TOOLS_PRINT,
|
|
17749
17749
|
title: T.i18n("vxe.toolbar.print"),
|
|
17750
|
-
onClick:
|
|
17750
|
+
onClick: B
|
|
17751
17751
|
});
|
|
17752
17752
|
}, ke = () => {
|
|
17753
17753
|
const pe = b.value;
|
|
@@ -17769,7 +17769,7 @@ const gi = nt({
|
|
|
17769
17769
|
}) : Be();
|
|
17770
17770
|
}, Ve = () => {
|
|
17771
17771
|
const pe = x.value, j = D.value, le = {};
|
|
17772
|
-
return j === "manual" || (j === "hover" ? (le.onMouseenter = N, le.onMouseleave =
|
|
17772
|
+
return j === "manual" || (j === "hover" ? (le.onMouseenter = N, le.onMouseleave = z) : le.onClick = $), h(yr, Object.assign({ key: "custom", circle: !0, icon: pe.icon || T.icon.TOOLBAR_TOOLS_CUSTOM, title: T.i18n("vxe.toolbar.custom"), className: "vxe-toolbar-custom-target" }, le));
|
|
17773
17773
|
};
|
|
17774
17774
|
u = {
|
|
17775
17775
|
dispatchEvent(pe, j, le) {
|
|
@@ -17948,7 +17948,7 @@ const m0 = nt({
|
|
|
17948
17948
|
const t = xt("$xeform", {}), n = { itemConfig: e.itemConfig };
|
|
17949
17949
|
return Qt("$xeformiteminfo", n), Qt("$xeformgather", null), {
|
|
17950
17950
|
renderVN: () => {
|
|
17951
|
-
const { reactData: l } = t, { data: i, rules: a, span: s, align: c, titleAlign: u, titleWidth: m, titleColon: g, titleAsterisk: C, titleOverflow: b, vertical: y } = t.props, { computeValidOpts: _ } = t.getComputeMaps(), w = e.itemConfig, { collapseAll: O } = l, x = _.value, { slots: E, title: D, visible: P, folding: $, field: N, collapseNode:
|
|
17951
|
+
const { reactData: l } = t, { data: i, rules: a, span: s, align: c, titleAlign: u, titleWidth: m, titleColon: g, titleAsterisk: C, titleOverflow: b, vertical: y } = t.props, { computeValidOpts: _ } = t.getComputeMaps(), w = e.itemConfig, { collapseAll: O } = l, x = _.value, { slots: E, title: D, visible: P, folding: $, field: N, collapseNode: z, itemRender: ae, showError: de, errRule: he, className: Z, titleOverflow: K, vertical: J, children: B, showTitle: A, contentClassName: k, contentStyle: I, titleClassName: W, titleStyle: q } = w, ce = Ot(ae) ? at.renderer.get(ae.name) : null, ke = ce ? ce.itemClassName : "", xe = ce ? ce.itemStyle : null, Ve = ce ? ce.itemContentClassName : "", je = ce ? ce.itemContentStyle : null, pe = ce ? ce.itemTitleClassName : "", j = ce ? ce.itemTitleStyle : null, le = E ? E.default : null, fe = E ? E.title : null, be = w.span || s, Me = w.align || c, se = f.eqNull(w.titleAlign) ? u : w.titleAlign, ie = f.eqNull(w.titleWidth) ? m : w.titleWidth, ue = f.eqNull(w.titleColon) ? g : w.titleColon, ye = f.eqNull(w.titleAsterisk) ? C : w.titleAsterisk, Se = f.isUndefined(K) || f.isNull(K) ? b : K, we = f.isUndefined(J) || f.isNull(J) ? y : J, ze = Se === "ellipsis", Je = Se === "title", Qe = Se === !0 || Se === "tooltip", Ke = Je || Qe || ze, Pe = { data: i, field: N, property: N, item: w, $form: t, $grid: t.xegrid };
|
|
17952
17952
|
if (P === !1)
|
|
17953
17953
|
return Be();
|
|
17954
17954
|
let Fe = !1;
|
|
@@ -17956,8 +17956,8 @@ const m0 = nt({
|
|
|
17956
17956
|
const $e = a[N];
|
|
17957
17957
|
$e && (Fe = $e.some((U) => U.required));
|
|
17958
17958
|
}
|
|
17959
|
-
if (
|
|
17960
|
-
const $e =
|
|
17959
|
+
if (B && B.length > 0) {
|
|
17960
|
+
const $e = B.map((U, Q) => h(m0, {
|
|
17961
17961
|
key: Q,
|
|
17962
17962
|
itemConfig: U
|
|
17963
17963
|
}));
|
|
@@ -17966,7 +17966,7 @@ const m0 = nt({
|
|
|
17966
17966
|
}, $e) : Be();
|
|
17967
17967
|
}
|
|
17968
17968
|
let me = [];
|
|
17969
|
-
le ? me = t.callSlot(le, Pe) : ce && ce.renderItemContent ? me = Xt(ce.renderItemContent(ae, Pe)) : N && (me = [f.toValueString(f.get(i, N))]),
|
|
17969
|
+
le ? me = t.callSlot(le, Pe) : ce && ce.renderItemContent ? me = Xt(ce.renderItemContent(ae, Pe)) : N && (me = [f.toValueString(f.get(i, N))]), z && me.push(h("div", {
|
|
17970
17970
|
class: "vxe-form--item-trigger-node",
|
|
17971
17971
|
onClick: t.toggleCollapseEvent
|
|
17972
17972
|
}, [
|
|
@@ -18143,7 +18143,7 @@ const vi = nt({
|
|
|
18143
18143
|
$();
|
|
18144
18144
|
const le = P();
|
|
18145
18145
|
g.dispatchEvent("toggle-collapse", { status: le, collapse: le, data: e.data }, j), g.dispatchEvent("collapse", { status: le, collapse: le, data: e.data }, j);
|
|
18146
|
-
},
|
|
18146
|
+
}, z = (j) => {
|
|
18147
18147
|
if (j) {
|
|
18148
18148
|
let le = j;
|
|
18149
18149
|
f.isArray(j) || (le = [j]), le.forEach((fe) => {
|
|
@@ -18165,7 +18165,7 @@ const vi = nt({
|
|
|
18165
18165
|
const ie = at.renderer.get(se.name);
|
|
18166
18166
|
ie && ie.itemResetMethod ? ie.itemResetMethod({ data: j, field: be, property: be, item: fe, $form: w, $grid: w.xegrid }) : be && f.set(j, be, Me === null ? IM(f.get(j, be), void 0) : f.clone(Me, !0));
|
|
18167
18167
|
}
|
|
18168
|
-
}),
|
|
18168
|
+
}), z();
|
|
18169
18169
|
}, de = (j) => {
|
|
18170
18170
|
j.preventDefault(), ae(), g.dispatchEvent("reset", { data: e.data }, j);
|
|
18171
18171
|
}, he = (j) => {
|
|
@@ -18255,11 +18255,11 @@ const vi = nt({
|
|
|
18255
18255
|
he(ue);
|
|
18256
18256
|
}), fe ? (fe(ie), Se()) : Se(ie);
|
|
18257
18257
|
}))) : (fe && fe(), Promise.resolve());
|
|
18258
|
-
},
|
|
18258
|
+
}, B = (j) => (z(), J(E(), "", j)), A = (j, le) => {
|
|
18259
18259
|
let fe = [];
|
|
18260
18260
|
return f.isArray(j) ? fe = j : fe = [j], J(fe.map((be) => Pm(w, be)), "", le);
|
|
18261
18261
|
}, k = (j) => {
|
|
18262
|
-
j.preventDefault(), e.preventSubmit || (
|
|
18262
|
+
j.preventDefault(), e.preventSubmit || (z(), J(E()).then((le) => {
|
|
18263
18263
|
le ? g.dispatchEvent("submit-invalid", { data: e.data, errMap: le }, j) : g.dispatchEvent("submit", { data: e.data }, j);
|
|
18264
18264
|
}));
|
|
18265
18265
|
}, I = () => {
|
|
@@ -18281,7 +18281,7 @@ const vi = nt({
|
|
|
18281
18281
|
le = m.value, le && !le.isActived() && I();
|
|
18282
18282
|
}, j.leaveDelay) : I();
|
|
18283
18283
|
}, ce = (j, le, fe) => le ? Z(j ? ["blur"].includes(j.type) ? "blur" : "change" : "all", le, fe).then(() => {
|
|
18284
|
-
|
|
18284
|
+
z(le);
|
|
18285
18285
|
}).catch((be) => {
|
|
18286
18286
|
const Me = be[le], se = D(le);
|
|
18287
18287
|
Me && se && (se.showError = !0, se.errRule = Me[0].rule);
|
|
@@ -18291,9 +18291,9 @@ const vi = nt({
|
|
|
18291
18291
|
r(j, Object.assign({ $form: w, $grid: c, $event: fe }, le));
|
|
18292
18292
|
},
|
|
18293
18293
|
reset: ae,
|
|
18294
|
-
validate:
|
|
18294
|
+
validate: B,
|
|
18295
18295
|
validateField: A,
|
|
18296
|
-
clearValidate:
|
|
18296
|
+
clearValidate: z,
|
|
18297
18297
|
updateStatus: (j, le) => {
|
|
18298
18298
|
const { field: fe } = j;
|
|
18299
18299
|
return ce(new Event("change"), fe, le);
|
|
@@ -18422,7 +18422,7 @@ const NM = Object.keys(qd), Bm = ["clearAll", "syncData", "updateData", "loadDat
|
|
|
18422
18422
|
return De && De[ee](...me);
|
|
18423
18423
|
};
|
|
18424
18424
|
});
|
|
18425
|
-
const E = X(() => Object.assign({}, T.grid.proxyConfig, e.proxyConfig)), D = X(() => E.value.message !== !1), P = X(() => Object.assign({}, T.grid.pagerConfig, e.pagerConfig)), $ = X(() => Object.assign({}, T.grid.formConfig, e.formConfig)), N = X(() => Object.assign({}, T.grid.toolbarConfig, e.toolbarConfig)),
|
|
18425
|
+
const E = X(() => Object.assign({}, T.grid.proxyConfig, e.proxyConfig)), D = X(() => E.value.message !== !1), P = X(() => Object.assign({}, T.grid.pagerConfig, e.pagerConfig)), $ = X(() => Object.assign({}, T.grid.formConfig, e.formConfig)), N = X(() => Object.assign({}, T.grid.toolbarConfig, e.toolbarConfig)), z = X(() => Object.assign({}, T.grid.zoomConfig, e.zoomConfig)), ae = X(() => a.isZMax ? { zIndex: a.tZindex } : null), de = X(() => {
|
|
18426
18426
|
const ee = {}, me = e;
|
|
18427
18427
|
return NM.forEach((De) => {
|
|
18428
18428
|
ee[De] = me[De];
|
|
@@ -18438,7 +18438,7 @@ const NM = Object.keys(qd), Bm = ["clearAll", "syncData", "updateData", "loadDat
|
|
|
18438
18438
|
computePagerOpts: P,
|
|
18439
18439
|
computeFormOpts: $,
|
|
18440
18440
|
computeToolbarOpts: N,
|
|
18441
|
-
computeZoomOpts:
|
|
18441
|
+
computeZoomOpts: z
|
|
18442
18442
|
}, K = {
|
|
18443
18443
|
xID: r,
|
|
18444
18444
|
props: e,
|
|
@@ -18449,7 +18449,7 @@ const NM = Object.keys(qd), Bm = ["clearAll", "syncData", "updateData", "loadDat
|
|
|
18449
18449
|
getComputeMaps: () => Z
|
|
18450
18450
|
};
|
|
18451
18451
|
let J = {};
|
|
18452
|
-
const
|
|
18452
|
+
const B = X(() => {
|
|
18453
18453
|
const { seqConfig: ee, pagerConfig: me, loading: De, editConfig: $e, proxyConfig: U } = e, { isZMax: Q, tableLoading: Ee, tablePage: We, tableData: Ue } = a, Ze = de.value, lt = E.value, st = P.value, ut = Object.assign({}, Ze);
|
|
18454
18454
|
return Q && (Ze.maxHeight ? ut.maxHeight = "auto" : ut.height = "auto"), U && Ot(lt) && (ut.loading = De || Ee, ut.data = Ue, me && lt.seq && Ot(st) && (ut.seqConfig = Object.assign({}, ee, { startIndex: (We.currentPage - 1) * We.pageSize }))), $e && (ut.editConfig = Object.assign({}, $e)), ut;
|
|
18455
18455
|
}), A = () => {
|
|
@@ -18606,7 +18606,7 @@ const NM = Object.keys(qd), Bm = ["clearAll", "syncData", "updateData", "loadDat
|
|
|
18606
18606
|
ye[me] = (...De) => o(ee, ...De);
|
|
18607
18607
|
});
|
|
18608
18608
|
const Se = () => {
|
|
18609
|
-
const { proxyConfig: ee } = e, me =
|
|
18609
|
+
const { proxyConfig: ee } = e, me = B.value, De = E.value, $e = Object.assign({}, ye), U = n.empty, Q = n.loading;
|
|
18610
18610
|
ee && Ot(De) && (De.sort && ($e.onSortChange = ke), De.filter && ($e.onFilterChange = xe));
|
|
18611
18611
|
const Ee = {};
|
|
18612
18612
|
return U && (Ee.empty = () => U({})), Q && (Ee.loading = () => Q({})), [
|
|
@@ -18887,7 +18887,7 @@ const NM = Object.keys(qd), Bm = ["clearAll", "syncData", "updateData", "loadDat
|
|
|
18887
18887
|
Je();
|
|
18888
18888
|
});
|
|
18889
18889
|
const Pe = (ee) => {
|
|
18890
|
-
const me =
|
|
18890
|
+
const me = z.value;
|
|
18891
18891
|
kt(ee, Ct.ESCAPE) && a.isZMax && me.escRestore !== !1 && Qe.triggerZoomEvent(ee);
|
|
18892
18892
|
};
|
|
18893
18893
|
at.hooks.forEach((ee) => {
|
|
@@ -19068,8 +19068,8 @@ const xi = nt({
|
|
|
19068
19068
|
const N = C.value;
|
|
19069
19069
|
return e.maxlength && N > f.toNumber(e.maxlength);
|
|
19070
19070
|
}), y = X(() => Object.assign({ minRows: 1, maxRows: 10 }, T.textarea.autosize, e.autosize)), _ = () => {
|
|
19071
|
-
const { size: N, autosize:
|
|
19072
|
-
if (
|
|
19071
|
+
const { size: N, autosize: z } = e, { inputValue: ae } = a;
|
|
19072
|
+
if (z) {
|
|
19073
19073
|
xr || (xr = document.createElement("div")), xr.parentNode || document.body.appendChild(xr);
|
|
19074
19074
|
const de = c.value, he = getComputedStyle(de);
|
|
19075
19075
|
xr.className = ["vxe-textarea--autosize", N ? `size--${N}` : ""].join(" "), xr.style.width = `${de.clientWidth}px`, xr.style.padding = he.padding, xr.innerText = ("" + (ae || " ")).replace(/\n$/, `
|
|
@@ -19077,28 +19077,28 @@ const xi = nt({
|
|
|
19077
19077
|
}
|
|
19078
19078
|
}, w = () => {
|
|
19079
19079
|
e.autosize && te(() => {
|
|
19080
|
-
const N = y.value, { minRows:
|
|
19080
|
+
const N = y.value, { minRows: z, maxRows: ae } = N, de = c.value, he = xr.clientHeight, Z = getComputedStyle(de), K = f.toNumber(Z.lineHeight), J = f.toNumber(Z.paddingTop), B = f.toNumber(Z.paddingBottom), A = f.toNumber(Z.borderTopWidth), k = f.toNumber(Z.borderBottomWidth), I = J + B + A + k, W = (he - I) / K, q = W && /[0-9]/.test("" + W) ? W : Math.floor(W) + 1;
|
|
19081
19081
|
let ce = q;
|
|
19082
|
-
q <
|
|
19082
|
+
q < z ? ce = z : q > ae && (ce = ae), de.style.height = `${ce * K + I}px`;
|
|
19083
19083
|
});
|
|
19084
19084
|
}, O = (N) => {
|
|
19085
|
-
const
|
|
19086
|
-
m.dispatchEvent(N.type, { value:
|
|
19087
|
-
}, x = (N,
|
|
19088
|
-
a.inputValue = N, n("update:modelValue", N), f.toValueString(e.modelValue) !== N && (g.dispatchEvent("change", { value: N },
|
|
19085
|
+
const z = a.inputValue;
|
|
19086
|
+
m.dispatchEvent(N.type, { value: z }, N);
|
|
19087
|
+
}, x = (N, z) => {
|
|
19088
|
+
a.inputValue = N, n("update:modelValue", N), f.toValueString(e.modelValue) !== N && (g.dispatchEvent("change", { value: N }, z), o && r && o.triggerItemEvent(z, r.itemConfig.field, N));
|
|
19089
19089
|
}, E = (N) => {
|
|
19090
|
-
const { immediate:
|
|
19091
|
-
a.inputValue = de,
|
|
19090
|
+
const { immediate: z } = e, de = N.target.value;
|
|
19091
|
+
a.inputValue = de, z && x(de, N), m.dispatchEvent("input", { value: de }, N), w();
|
|
19092
19092
|
}, D = (N) => {
|
|
19093
|
-
const { immediate:
|
|
19094
|
-
|
|
19093
|
+
const { immediate: z } = e;
|
|
19094
|
+
z ? O(N) : x(a.inputValue, N);
|
|
19095
19095
|
}, P = (N) => {
|
|
19096
|
-
const { immediate:
|
|
19097
|
-
|
|
19096
|
+
const { immediate: z } = e, { inputValue: ae } = a;
|
|
19097
|
+
z || x(ae, N), m.dispatchEvent("blur", { value: ae }, N);
|
|
19098
19098
|
};
|
|
19099
19099
|
g = {
|
|
19100
|
-
dispatchEvent(N,
|
|
19101
|
-
n(N, Object.assign({ $textarea: m, $event: ae },
|
|
19100
|
+
dispatchEvent(N, z, ae) {
|
|
19101
|
+
n(N, Object.assign({ $textarea: m, $event: ae }, z));
|
|
19102
19102
|
},
|
|
19103
19103
|
focus() {
|
|
19104
19104
|
return c.value.focus(), te();
|
|
@@ -19113,7 +19113,7 @@ const xi = nt({
|
|
|
19113
19113
|
N && (_(), w());
|
|
19114
19114
|
});
|
|
19115
19115
|
const $ = () => {
|
|
19116
|
-
const { className: N, resize:
|
|
19116
|
+
const { className: N, resize: z, placeholder: ae, disabled: de, maxlength: he, autosize: Z, showWordCount: K, countMethod: J, rows: B, cols: A } = e, { inputValue: k } = a, I = i.value, W = b.value, q = C.value;
|
|
19117
19117
|
return h("div", {
|
|
19118
19118
|
ref: s,
|
|
19119
19119
|
class: ["vxe-textarea", N, {
|
|
@@ -19121,7 +19121,7 @@ const xi = nt({
|
|
|
19121
19121
|
"is--autosize": Z,
|
|
19122
19122
|
"is--count": K,
|
|
19123
19123
|
"is--disabled": de,
|
|
19124
|
-
"def--rows": !f.eqNull(
|
|
19124
|
+
"def--rows": !f.eqNull(B),
|
|
19125
19125
|
"def--cols": !f.eqNull(A)
|
|
19126
19126
|
}]
|
|
19127
19127
|
}, [
|
|
@@ -19134,10 +19134,10 @@ const xi = nt({
|
|
|
19134
19134
|
maxlength: he,
|
|
19135
19135
|
readonly: e.readonly,
|
|
19136
19136
|
disabled: de,
|
|
19137
|
-
rows:
|
|
19137
|
+
rows: B,
|
|
19138
19138
|
cols: A,
|
|
19139
|
-
style:
|
|
19140
|
-
resize:
|
|
19139
|
+
style: z ? {
|
|
19140
|
+
resize: z
|
|
19141
19141
|
} : null,
|
|
19142
19142
|
onInput: E,
|
|
19143
19143
|
onChange: D,
|
|
@@ -19388,7 +19388,7 @@ const _l = [], wi = nt({
|
|
|
19388
19388
|
}, N = (k) => {
|
|
19389
19389
|
const I = i.value;
|
|
19390
19390
|
e.maskClosable && k.target === I && O("mask");
|
|
19391
|
-
},
|
|
19391
|
+
}, z = (k) => {
|
|
19392
19392
|
if (kt(k, Ct.ESCAPE)) {
|
|
19393
19393
|
const W = f.max(_l, (q) => q.reactData.drawerZIndex);
|
|
19394
19394
|
W && setTimeout(() => {
|
|
@@ -19451,7 +19451,7 @@ const _l = [], wi = nt({
|
|
|
19451
19451
|
content: e.confirmButtonText || T.i18n("vxe.button.confirm"),
|
|
19452
19452
|
onClick: E
|
|
19453
19453
|
})), W;
|
|
19454
|
-
},
|
|
19454
|
+
}, B = () => {
|
|
19455
19455
|
const { slots: k = {} } = e, I = n.footer || k.footer, W = [];
|
|
19456
19456
|
return e.showFooter && W.push(h("div", {
|
|
19457
19457
|
class: "vxe-drawer--footer"
|
|
@@ -19482,7 +19482,7 @@ const _l = [], wi = nt({
|
|
|
19482
19482
|
ref: a,
|
|
19483
19483
|
class: "vxe-drawer--box",
|
|
19484
19484
|
onMousedown: ae
|
|
19485
|
-
}, Z().concat(K(),
|
|
19485
|
+
}, Z().concat(K(), B()))
|
|
19486
19486
|
])
|
|
19487
19487
|
]);
|
|
19488
19488
|
};
|
|
@@ -19491,7 +19491,7 @@ const _l = [], wi = nt({
|
|
|
19491
19491
|
}), un(() => {
|
|
19492
19492
|
te(() => {
|
|
19493
19493
|
e.modelValue && P(), y();
|
|
19494
|
-
}), e.escClosable && St.on(C, "keydown",
|
|
19494
|
+
}), e.escClosable && St.on(C, "keydown", z);
|
|
19495
19495
|
}), pn(() => {
|
|
19496
19496
|
St.off(C, "keydown");
|
|
19497
19497
|
}), C;
|
|
@@ -19595,7 +19595,7 @@ const b0 = {
|
|
|
19595
19595
|
f0(o, l);
|
|
19596
19596
|
});
|
|
19597
19597
|
const s = (m, g) => {
|
|
19598
|
-
const { props: C, reactData: b } = m, { data: y, rules: _, titleAlign: w, titleWidth: O, titleColon: x, titleAsterisk: E, titleOverflow: D, vertical: P } = C, { collapseAll: $ } = b, { computeValidOpts: N } = m.getComputeMaps(),
|
|
19598
|
+
const { props: C, reactData: b } = m, { data: y, rules: _, titleAlign: w, titleWidth: O, titleColon: x, titleAsterisk: E, titleOverflow: D, vertical: P } = C, { collapseAll: $ } = b, { computeValidOpts: N } = m.getComputeMaps(), z = N.value, { slots: ae, title: de, visible: he, folding: Z, field: K, collapseNode: J, itemRender: B, showError: A, errRule: k, className: I, titleOverflow: W, vertical: q, showTitle: ce, contentClassName: ke, contentStyle: xe, titleClassName: Ve, titleStyle: je } = g, pe = Ot(B) ? at.renderer.get(B.name) : null, j = pe ? pe.itemClassName : "", le = pe ? pe.itemStyle : null, fe = pe ? pe.itemContentClassName : "", be = pe ? pe.itemContentStyle : null, Me = pe ? pe.itemTitleClassName : "", se = pe ? pe.itemTitleStyle : null, ie = ae ? ae.default : null, ue = ae ? ae.title : null, ye = g.span || C.span, Se = g.align || C.align, we = f.eqNull(g.titleAlign) ? w : g.titleAlign, ze = f.eqNull(g.titleWidth) ? O : g.titleWidth, Je = f.eqNull(g.titleColon) ? x : g.titleColon, Qe = f.eqNull(g.titleAsterisk) ? E : g.titleAsterisk, Ke = f.isUndefined(W) || f.isNull(W) ? D : W, Pe = f.isUndefined(q) || f.isNull(q) ? P : q, Fe = Ke === "ellipsis", ee = Ke === "title", me = Ke === !0 || Ke === "tooltip", De = ee || me || Fe, $e = { data: y, field: K, property: K, item: g, $form: m, $grid: m.xegrid };
|
|
19599
19599
|
let U = !1;
|
|
19600
19600
|
if (he === !1)
|
|
19601
19601
|
return Be();
|
|
@@ -19604,7 +19604,7 @@ const b0 = {
|
|
|
19604
19604
|
We && (U = We.some((Ue) => Ue.required));
|
|
19605
19605
|
}
|
|
19606
19606
|
let Q = [];
|
|
19607
|
-
ie ? Q = m.callSlot(ie, $e) : pe && pe.renderItemContent ? Q = Xt(pe.renderItemContent(
|
|
19607
|
+
ie ? Q = m.callSlot(ie, $e) : pe && pe.renderItemContent ? Q = Xt(pe.renderItemContent(B, $e)) : K && (Q = [`${f.get(y, K)}`]), J && Q.push(h("div", {
|
|
19608
19608
|
class: "vxe-form--item-trigger-node",
|
|
19609
19609
|
onClick: m.toggleCollapseEvent
|
|
19610
19610
|
}, [
|
|
@@ -19614,7 +19614,7 @@ const b0 = {
|
|
|
19614
19614
|
h("i", {
|
|
19615
19615
|
class: ["vxe-form--item-trigger-icon", $ ? T.icon.FORM_FOLDING : T.icon.FORM_UNFOLDING]
|
|
19616
19616
|
})
|
|
19617
|
-
])), k &&
|
|
19617
|
+
])), k && z.showMessage && Q.push(h("div", {
|
|
19618
19618
|
class: "vxe-form--item-valid",
|
|
19619
19619
|
style: k.maxWidth ? {
|
|
19620
19620
|
width: `${k.maxWidth}px`
|
|
@@ -19868,10 +19868,10 @@ const ki = nt({
|
|
|
19868
19868
|
}
|
|
19869
19869
|
}, Object.assign(s, u);
|
|
19870
19870
|
const O = () => {
|
|
19871
|
-
const { disabled: x, openIcon: E, closeIcon: D, openActiveIcon: P, closeActiveIcon: $ } = e, N = C.value,
|
|
19871
|
+
const { disabled: x, openIcon: E, closeIcon: D, openActiveIcon: P, closeActiveIcon: $ } = e, N = C.value, z = i.value, ae = m.value, de = g.value;
|
|
19872
19872
|
return h("div", {
|
|
19873
19873
|
class: ["vxe-switch", N ? "is--on" : "is--off", {
|
|
19874
|
-
[`size--${
|
|
19874
|
+
[`size--${z}`]: z,
|
|
19875
19875
|
"is--disabled": x,
|
|
19876
19876
|
"is--animat": a.hasAnimat
|
|
19877
19877
|
}]
|
|
@@ -19980,10 +19980,10 @@ const $i = nt({
|
|
|
19980
19980
|
}, O = () => {
|
|
19981
19981
|
w(), _();
|
|
19982
19982
|
}, x = () => te().then(() => {
|
|
19983
|
-
const { scrollYLoad: Z } = i, { scrollYStore: K } = u, J = c.value,
|
|
19983
|
+
const { scrollYLoad: Z } = i, { scrollYStore: K } = u, J = c.value, B = b.value;
|
|
19984
19984
|
let A = 0, k;
|
|
19985
|
-
if (J && (
|
|
19986
|
-
const I = s.value, W = Math.max(8, Math.ceil(I.clientHeight / A)), q =
|
|
19985
|
+
if (J && (B.sItem && (k = J.querySelector(B.sItem)), k || (k = J.children[0])), k && (A = k.offsetHeight), A = Math.max(20, A), K.rowHeight = A, Z) {
|
|
19986
|
+
const I = s.value, W = Math.max(8, Math.ceil(I.clientHeight / A)), q = B.oSize ? f.toNumber(B.oSize) : bo.edge ? 10 : 0;
|
|
19987
19987
|
K.offsetSize = q, K.visibleSize = W, K.endIndex = Math.max(K.startIndex, W + q, K.endIndex), O();
|
|
19988
19988
|
} else
|
|
19989
19989
|
_();
|
|
@@ -19993,10 +19993,10 @@ const $i = nt({
|
|
|
19993
19993
|
return Z && (Z.scrollTop = 0), te();
|
|
19994
19994
|
}, D = (Z, K) => {
|
|
19995
19995
|
const J = s.value;
|
|
19996
|
-
return f.isNumber(Z) && (J.scrollLeft = Z), f.isNumber(K) && (J.scrollTop = K), i.scrollYLoad ? new Promise((
|
|
19996
|
+
return f.isNumber(Z) && (J.scrollLeft = Z), f.isNumber(K) && (J.scrollTop = K), i.scrollYLoad ? new Promise((B) => {
|
|
19997
19997
|
setTimeout(() => {
|
|
19998
19998
|
te(() => {
|
|
19999
|
-
|
|
19999
|
+
B();
|
|
20000
20000
|
});
|
|
20001
20001
|
}, 50);
|
|
20002
20002
|
}) : te();
|
|
@@ -20010,11 +20010,11 @@ const $i = nt({
|
|
|
20010
20010
|
const Z = a.value;
|
|
20011
20011
|
return Z.clientWidth && Z.clientHeight ? x() : Promise.resolve();
|
|
20012
20012
|
}, N = (Z) => {
|
|
20013
|
-
const { scrollYStore: K } = u, { startIndex: J, endIndex:
|
|
20014
|
-
(ce <= J || ce >=
|
|
20015
|
-
},
|
|
20016
|
-
const K = Z.target, J = K.scrollTop,
|
|
20017
|
-
u.lastScrollTop = J, u.lastScrollLeft =
|
|
20013
|
+
const { scrollYStore: K } = u, { startIndex: J, endIndex: B, visibleSize: A, offsetSize: k, rowHeight: I } = K, q = Z.target.scrollTop, ce = Math.floor(q / I), ke = Math.max(0, ce - 1 - k), xe = ce + A + k;
|
|
20014
|
+
(ce <= J || ce >= B - A - 1) && (J !== ke || B !== xe) && (K.startIndex = ke, K.endIndex = xe, O());
|
|
20015
|
+
}, z = (Z) => {
|
|
20016
|
+
const K = Z.target, J = K.scrollTop, B = K.scrollLeft, A = B !== u.lastScrollLeft, k = J !== u.lastScrollTop;
|
|
20017
|
+
u.lastScrollTop = J, u.lastScrollLeft = B, i.scrollYLoad && N(Z), C.dispatchEvent("scroll", { scrollLeft: B, scrollTop: J, isX: A, isY: k }, Z);
|
|
20018
20018
|
};
|
|
20019
20019
|
C = {
|
|
20020
20020
|
dispatchEvent(Z, K, J) {
|
|
@@ -20025,12 +20025,12 @@ const $i = nt({
|
|
|
20025
20025
|
* @param {Array} datas 数据
|
|
20026
20026
|
*/
|
|
20027
20027
|
loadData(Z) {
|
|
20028
|
-
const { scrollYStore: K } = u, J = b.value,
|
|
20028
|
+
const { scrollYStore: K } = u, J = b.value, B = Z || [];
|
|
20029
20029
|
return Object.assign(K, {
|
|
20030
20030
|
startIndex: 0,
|
|
20031
20031
|
endIndex: 1,
|
|
20032
20032
|
visibleSize: 0
|
|
20033
|
-
}), u.fullData =
|
|
20033
|
+
}), u.fullData = B, i.scrollYLoad = !!J.enabled && J.gt > -1 && (J.gt === 0 || J.gt <= B.length), w(), x().then(() => {
|
|
20034
20034
|
P();
|
|
20035
20035
|
});
|
|
20036
20036
|
},
|
|
@@ -20071,7 +20071,7 @@ const $i = nt({
|
|
|
20071
20071
|
de && de.disconnect(), St.off(g, "resize");
|
|
20072
20072
|
});
|
|
20073
20073
|
const he = () => {
|
|
20074
|
-
const { className: Z, loading: K } = e, { bodyHeight: J, topSpaceHeight:
|
|
20074
|
+
const { className: Z, loading: K } = e, { bodyHeight: J, topSpaceHeight: B, items: A } = i, k = l.value, I = y.value;
|
|
20075
20075
|
return h("div", {
|
|
20076
20076
|
ref: a,
|
|
20077
20077
|
class: ["vxe-list", Z ? f.isFunction(Z) ? Z({ $list: g }) : Z : "", {
|
|
@@ -20083,7 +20083,7 @@ const $i = nt({
|
|
|
20083
20083
|
ref: s,
|
|
20084
20084
|
class: "vxe-list--virtual-wrapper",
|
|
20085
20085
|
style: I,
|
|
20086
|
-
onScroll:
|
|
20086
|
+
onScroll: z
|
|
20087
20087
|
}, [
|
|
20088
20088
|
h("div", {
|
|
20089
20089
|
class: "vxe-list--y-space",
|
|
@@ -20095,7 +20095,7 @@ const $i = nt({
|
|
|
20095
20095
|
ref: c,
|
|
20096
20096
|
class: "vxe-list--body",
|
|
20097
20097
|
style: {
|
|
20098
|
-
marginTop:
|
|
20098
|
+
marginTop: B ? `${B}px` : ""
|
|
20099
20099
|
}
|
|
20100
20100
|
}, n.default ? n.default({ items: A, $list: g }) : [])
|
|
20101
20101
|
]),
|
|
@@ -20158,23 +20158,23 @@ const Di = nt({
|
|
|
20158
20158
|
const C = () => {
|
|
20159
20159
|
i.panelIndex < dr() && (i.panelIndex = Wo());
|
|
20160
20160
|
}, b = () => i.visiblePanel, y = () => te().then(() => {
|
|
20161
|
-
const { transfer: N, placement:
|
|
20161
|
+
const { transfer: N, placement: z } = e, { panelIndex: ae, visiblePanel: de } = i;
|
|
20162
20162
|
if (de) {
|
|
20163
20163
|
const he = s.value, Z = c.value;
|
|
20164
20164
|
if (Z && he) {
|
|
20165
|
-
const K = he.offsetHeight, J = he.offsetWidth,
|
|
20165
|
+
const K = he.offsetHeight, J = he.offsetWidth, B = Z.offsetHeight, A = Z.offsetWidth, k = 5, I = {
|
|
20166
20166
|
zIndex: ae
|
|
20167
20167
|
}, { boundingTop: W, boundingLeft: q, visibleHeight: ce, visibleWidth: ke } = nr(he);
|
|
20168
20168
|
let xe = "bottom";
|
|
20169
20169
|
if (N) {
|
|
20170
20170
|
let Ve = q, je = W + K;
|
|
20171
|
-
|
|
20171
|
+
z === "top" ? (xe = "top", je = W - B) : z || (je + B + k > ce && (xe = "top", je = W - B), je < k && (xe = "bottom", je = W + K)), Ve + A + k > ke && (Ve -= Ve + A + k - ke), Ve < k && (Ve = k), Object.assign(I, {
|
|
20172
20172
|
left: `${Ve}px`,
|
|
20173
20173
|
top: `${je}px`,
|
|
20174
20174
|
minWidth: `${J}px`
|
|
20175
20175
|
});
|
|
20176
20176
|
} else
|
|
20177
|
-
|
|
20177
|
+
z === "top" ? (xe = "top", I.bottom = `${K}px`) : z || W + K + B > ce && W - K - B > k && (xe = "top", I.bottom = `${K}px`);
|
|
20178
20178
|
i.panelStyle = I, i.panelPlacement = xe;
|
|
20179
20179
|
}
|
|
20180
20180
|
}
|
|
@@ -20198,17 +20198,17 @@ const Di = nt({
|
|
|
20198
20198
|
N();
|
|
20199
20199
|
});
|
|
20200
20200
|
})), x = () => i.visiblePanel ? O() : w(), E = (N) => {
|
|
20201
|
-
const { disabled:
|
|
20202
|
-
|
|
20201
|
+
const { disabled: z } = e, { visiblePanel: ae } = i, de = c.value;
|
|
20202
|
+
z || ae && (Rt(N, de).flag ? y() : (O(), g.dispatchEvent("hide-panel", {}, N)));
|
|
20203
20203
|
}, D = (N) => {
|
|
20204
|
-
const { disabled:
|
|
20205
|
-
|
|
20204
|
+
const { disabled: z } = e, { visiblePanel: ae } = i, de = a.value, he = c.value;
|
|
20205
|
+
z || (i.isActivated = Rt(N, de).flag || Rt(N, he).flag, ae && !i.isActivated && (O(), g.dispatchEvent("hide-panel", {}, N)));
|
|
20206
20206
|
}, P = (N) => {
|
|
20207
20207
|
i.visiblePanel && (i.isActivated = !1, O(), g.dispatchEvent("hide-panel", {}, N));
|
|
20208
20208
|
};
|
|
20209
20209
|
g = {
|
|
20210
|
-
dispatchEvent(N,
|
|
20211
|
-
o(N, Object.assign({ $pulldown: m, $event: ae },
|
|
20210
|
+
dispatchEvent(N, z, ae) {
|
|
20211
|
+
o(N, Object.assign({ $pulldown: m, $event: ae }, z));
|
|
20212
20212
|
},
|
|
20213
20213
|
isPanelVisible: b,
|
|
20214
20214
|
togglePanel: x,
|
|
@@ -20222,12 +20222,12 @@ const Di = nt({
|
|
|
20222
20222
|
St.off(m, "mousewheel"), St.off(m, "mousedown"), St.off(m, "blur");
|
|
20223
20223
|
});
|
|
20224
20224
|
const $ = () => {
|
|
20225
|
-
const { className: N, popupClassName:
|
|
20225
|
+
const { className: N, popupClassName: z, destroyOnClose: ae, transfer: de, disabled: he } = e, { inited: Z, isActivated: K, animatVisible: J, visiblePanel: B, panelStyle: A, panelPlacement: k } = i, I = l.value, W = n.default, q = n.header, ce = n.footer, ke = n.dropdown;
|
|
20226
20226
|
return h("div", {
|
|
20227
20227
|
ref: a,
|
|
20228
20228
|
class: ["vxe-pulldown", N ? f.isFunction(N) ? N({ $pulldown: m }) : N : "", {
|
|
20229
20229
|
[`size--${I}`]: I,
|
|
20230
|
-
"is--visivle":
|
|
20230
|
+
"is--visivle": B,
|
|
20231
20231
|
"is--disabled": he,
|
|
20232
20232
|
"is--active": K
|
|
20233
20233
|
}]
|
|
@@ -20242,18 +20242,18 @@ const Di = nt({
|
|
|
20242
20242
|
}, [
|
|
20243
20243
|
h("div", {
|
|
20244
20244
|
ref: c,
|
|
20245
|
-
class: ["vxe-table--ignore-clear vxe-pulldown--panel",
|
|
20245
|
+
class: ["vxe-table--ignore-clear vxe-pulldown--panel", z ? f.isFunction(z) ? z({ $pulldown: m }) : z : "", {
|
|
20246
20246
|
[`size--${I}`]: I,
|
|
20247
20247
|
"is--transfer": de,
|
|
20248
20248
|
"animat--leave": J,
|
|
20249
|
-
"animat--enter":
|
|
20249
|
+
"animat--enter": B
|
|
20250
20250
|
}],
|
|
20251
20251
|
placement: k,
|
|
20252
20252
|
style: A
|
|
20253
20253
|
}, ke ? [
|
|
20254
20254
|
h("div", {
|
|
20255
20255
|
class: "vxe-pulldown--panel-wrapper"
|
|
20256
|
-
}, !Z || ae && !
|
|
20256
|
+
}, !Z || ae && !B && !J ? [] : [
|
|
20257
20257
|
q ? h("div", {
|
|
20258
20258
|
class: "vxe-pulldown--panel-header"
|
|
20259
20259
|
}, q({ $pulldown: m })) : Be(),
|
|
@@ -21695,8 +21695,8 @@ Dt.prototype = /** @lends Sortable.prototype */
|
|
|
21695
21695
|
return w(), n.insertBefore(ct, D), xn = n, x(), O(!0);
|
|
21696
21696
|
} else if (o.parentNode === n) {
|
|
21697
21697
|
l = kn(o);
|
|
21698
|
-
var P = 0, $, N = ct.parentNode !== n,
|
|
21699
|
-
ls !== o && ($ = l[ae], Fi = !1, Ta = !
|
|
21698
|
+
var P = 0, $, N = ct.parentNode !== n, z = !dR(ct.animated && ct.toRect || r, o.animated && o.toRect || l, C), ae = C ? "top" : "left", de = Um(o, "top", "top") || Um(ct, "top", "top"), he = de ? de.scrollTop : void 0;
|
|
21699
|
+
ls !== o && ($ = l[ae], Fi = !1, Ta = !z && a.invertSwap || N), P = bR(t, o, l, C, z ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, Ta, ls === o);
|
|
21700
21700
|
var Z;
|
|
21701
21701
|
if (P !== 0) {
|
|
21702
21702
|
var K = _o(ct);
|
|
@@ -21707,11 +21707,11 @@ Dt.prototype = /** @lends Sortable.prototype */
|
|
|
21707
21707
|
if (P === 0 || Z === o)
|
|
21708
21708
|
return O(!1);
|
|
21709
21709
|
ls = o, Ii = P;
|
|
21710
|
-
var J = o.nextElementSibling,
|
|
21711
|
-
|
|
21712
|
-
var A = ka(fn, n, ct, r, o, l, t,
|
|
21710
|
+
var J = o.nextElementSibling, B = !1;
|
|
21711
|
+
B = P === 1;
|
|
21712
|
+
var A = ka(fn, n, ct, r, o, l, t, B);
|
|
21713
21713
|
if (A !== !1)
|
|
21714
|
-
return (A === 1 || A === -1) && (
|
|
21714
|
+
return (A === 1 || A === -1) && (B = A === 1), Qu = !0, setTimeout(hR, 30), w(), B && !J ? n.appendChild(ct) : o.parentNode.insertBefore(ct, B ? J : o), de && D0(de, 0, he - de.scrollTop), xn = ct.parentNode, $ !== void 0 && !Ta && (Aa = Math.abs($ - kn(o)[ae])), x(), O(!0);
|
|
21715
21715
|
}
|
|
21716
21716
|
if (n.contains(ct))
|
|
21717
21717
|
return O(!1);
|
|
@@ -22041,16 +22041,16 @@ var $u = $0(function(e, t, n, o) {
|
|
|
22041
22041
|
td !== n && (td = n, La(), ii = t.scroll, u = t.scrollFn, ii === !0 && (ii = tl(n, !0)));
|
|
22042
22042
|
var m = 0, g = ii;
|
|
22043
22043
|
do {
|
|
22044
|
-
var C = g, b = kn(C), y = b.top, _ = b.bottom, w = b.left, O = b.right, x = b.width, E = b.height, D = void 0, P = void 0, $ = C.scrollWidth, N = C.scrollHeight,
|
|
22045
|
-
C === s ? (D = x < $ && (
|
|
22044
|
+
var C = g, b = kn(C), y = b.top, _ = b.bottom, w = b.left, O = b.right, x = b.width, E = b.height, D = void 0, P = void 0, $ = C.scrollWidth, N = C.scrollHeight, z = $t(C), ae = C.scrollLeft, de = C.scrollTop;
|
|
22045
|
+
C === s ? (D = x < $ && (z.overflowX === "auto" || z.overflowX === "scroll" || z.overflowX === "visible"), P = E < N && (z.overflowY === "auto" || z.overflowY === "scroll" || z.overflowY === "visible")) : (D = x < $ && (z.overflowX === "auto" || z.overflowX === "scroll"), P = E < N && (z.overflowY === "auto" || z.overflowY === "scroll"));
|
|
22046
22046
|
var he = D && (Math.abs(O - r) <= i && ae + x < $) - (Math.abs(w - r) <= i && !!ae), Z = P && (Math.abs(_ - l) <= i && de + E < N) - (Math.abs(y - l) <= i && !!de);
|
|
22047
22047
|
if (!On[m])
|
|
22048
22048
|
for (var K = 0; K <= m; K++)
|
|
22049
22049
|
On[K] || (On[K] = {});
|
|
22050
22050
|
(On[m].vx != he || On[m].vy != Z || On[m].el !== C) && (On[m].el = C, On[m].vx = he, On[m].vy = Z, clearInterval(On[m].pid), (he != 0 || Z != 0) && (c = !0, On[m].pid = setInterval(function() {
|
|
22051
22051
|
o && this.layer === 0 && Dt.active._onTouchMove(nc);
|
|
22052
|
-
var J = On[this.layer].vy ? On[this.layer].vy * a : 0,
|
|
22053
|
-
typeof u == "function" && u.call(Dt.dragged.parentNode[vo],
|
|
22052
|
+
var J = On[this.layer].vy ? On[this.layer].vy * a : 0, B = On[this.layer].vx ? On[this.layer].vx * a : 0;
|
|
22053
|
+
typeof u == "function" && u.call(Dt.dragged.parentNode[vo], B, J, e, nc, On[this.layer].el) !== "continue" || D0(On[this.layer].el, B, J);
|
|
22054
22054
|
}.bind({
|
|
22055
22055
|
layer: m
|
|
22056
22056
|
}), 24))), m++;
|
|
@@ -23312,7 +23312,7 @@ const v7 = {
|
|
|
23312
23312
|
if (!W) return;
|
|
23313
23313
|
const { row: q } = await W.insertAt(k, I);
|
|
23314
23314
|
await W.setEditRow(q);
|
|
23315
|
-
}, N = async (k) => r.value?.setEditRow(k),
|
|
23315
|
+
}, N = async (k) => r.value?.setEditRow(k), z = () => {
|
|
23316
23316
|
const k = r.value;
|
|
23317
23317
|
if (!k) return [];
|
|
23318
23318
|
const { fullData: I = [] } = k.getTableData();
|
|
@@ -23321,7 +23321,7 @@ const v7 = {
|
|
|
23321
23321
|
const k = r.value;
|
|
23322
23322
|
return k ? k.getColumns() : [];
|
|
23323
23323
|
}, de = async () => {
|
|
23324
|
-
const k =
|
|
23324
|
+
const k = z();
|
|
23325
23325
|
return r.value?.validate(k);
|
|
23326
23326
|
}, he = () => {
|
|
23327
23327
|
const k = r.value;
|
|
@@ -23329,7 +23329,7 @@ const v7 = {
|
|
|
23329
23329
|
const I = k.getColumns();
|
|
23330
23330
|
return I.find((ce) => ce.type === "radio") ? k.getRadioRecord(!1) : I.find((ce) => ce.type === "checkbox") ? k.getCheckboxRecords(!1) : null;
|
|
23331
23331
|
}, Z = () => {
|
|
23332
|
-
const k =
|
|
23332
|
+
const k = z();
|
|
23333
23333
|
i("editChange", k);
|
|
23334
23334
|
};
|
|
23335
23335
|
return t({
|
|
@@ -23355,7 +23355,7 @@ const v7 = {
|
|
|
23355
23355
|
type: "warning"
|
|
23356
23356
|
}) && (await I.remove(k), Z());
|
|
23357
23357
|
},
|
|
23358
|
-
getRows:
|
|
23358
|
+
getRows: z,
|
|
23359
23359
|
setActived: N,
|
|
23360
23360
|
doLayout: D,
|
|
23361
23361
|
getRecords: () => r.value?.getRecordset(),
|
|
@@ -23364,7 +23364,7 @@ const v7 = {
|
|
|
23364
23364
|
if (k)
|
|
23365
23365
|
r.value.setSelectCell(k, I ?? ae()[0]);
|
|
23366
23366
|
else {
|
|
23367
|
-
const W =
|
|
23367
|
+
const W = z(), q = ae();
|
|
23368
23368
|
r.value.setSelectCell(W[0], q[0]);
|
|
23369
23369
|
}
|
|
23370
23370
|
r.value.focus();
|
|
@@ -24158,7 +24158,7 @@ const M7 = {
|
|
|
24158
24158
|
props: $7,
|
|
24159
24159
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
24160
24160
|
setup(e, { expose: t, emit: n }) {
|
|
24161
|
-
const o = e, r = n, l = xt(U0, null), i = xt(F2, null), a = xt(G0, null), s = X(() => !l?.proxy || !a ? o.visible : typeof o.visible == "function" ? o.visible(a) : hd(o.visible) ? Object.entries(o.visible).every(([N,
|
|
24161
|
+
const o = e, r = n, l = xt(U0, null), i = xt(F2, null), a = xt(G0, null), s = X(() => !l?.proxy || !a ? o.visible : typeof o.visible == "function" ? o.visible(a) : hd(o.visible) ? Object.entries(o.visible).every(([N, z]) => _a(a, N) === z) : o.visible), c = () => l?.proxy && a && o.name ? _a(a, o.name) ?? o.modelValue : o.modelValue, u = Ce(c()), { editor: m } = _7(
|
|
24162
24162
|
o,
|
|
24163
24163
|
r,
|
|
24164
24164
|
s,
|
|
@@ -24227,15 +24227,15 @@ const M7 = {
|
|
|
24227
24227
|
size: b.value,
|
|
24228
24228
|
style: O.value
|
|
24229
24229
|
}, $.$attrs), Dr({
|
|
24230
|
-
error: Ie(({ error:
|
|
24231
|
-
ht($.$slots, "error", { error:
|
|
24230
|
+
error: Ie(({ error: z }) => [
|
|
24231
|
+
ht($.$slots, "error", { error: z }, () => [
|
|
24232
24232
|
F(l)?.props.tooltipMessage ?? o.tooltipMessage ? (ve(), pt("div", {
|
|
24233
24233
|
key: 0,
|
|
24234
24234
|
class: "x-field__info",
|
|
24235
24235
|
style: sl(x.value)
|
|
24236
24236
|
}, [
|
|
24237
24237
|
ot(F(ih), Et({
|
|
24238
|
-
content: _(
|
|
24238
|
+
content: _(z)
|
|
24239
24239
|
}, y.value), {
|
|
24240
24240
|
default: Ie(() => [
|
|
24241
24241
|
ot(F(Mr), {
|
|
@@ -24246,7 +24246,7 @@ const M7 = {
|
|
|
24246
24246
|
]),
|
|
24247
24247
|
_: 2
|
|
24248
24248
|
}, 1040, ["content"])
|
|
24249
|
-
], 4)) : (ve(), pt("div", M7, Ut(_(
|
|
24249
|
+
], 4)) : (ve(), pt("div", M7, Ut(_(z)), 1))
|
|
24250
24250
|
])
|
|
24251
24251
|
]),
|
|
24252
24252
|
default: Ie(() => [
|
|
@@ -24260,12 +24260,12 @@ const M7 = {
|
|
|
24260
24260
|
ref_key: "editorRef",
|
|
24261
24261
|
ref: C,
|
|
24262
24262
|
modelValue: u.value,
|
|
24263
|
-
"onUpdate:modelValue": N[0] || (N[0] = (
|
|
24263
|
+
"onUpdate:modelValue": N[0] || (N[0] = (z) => u.value = z)
|
|
24264
24264
|
}, F(m).props), Dr({ _: 2 }, [
|
|
24265
24265
|
$.$slots.option ? {
|
|
24266
24266
|
name: "option",
|
|
24267
|
-
fn: Ie(({ option:
|
|
24268
|
-
ht($.$slots, "option", { option:
|
|
24267
|
+
fn: Ie(({ option: z }) => [
|
|
24268
|
+
ht($.$slots, "option", { option: z })
|
|
24269
24269
|
]),
|
|
24270
24270
|
key: "0"
|
|
24271
24271
|
} : void 0
|
|
@@ -26605,8 +26605,8 @@ var R9 = s2.exports;
|
|
|
26605
26605
|
let D = ["start"];
|
|
26606
26606
|
for (let P = 0; P < w.length; P++) {
|
|
26607
26607
|
const $ = w[P], N = [];
|
|
26608
|
-
for (let
|
|
26609
|
-
const ae = $[
|
|
26608
|
+
for (let z = 0; z < $.length; z++) {
|
|
26609
|
+
const ae = $[z], de = "" + P + z;
|
|
26610
26610
|
N.push(de), x[de] = { node: ae, lastCount: 0 }, E[de] = {};
|
|
26611
26611
|
for (let he = 0; he < D.length; he++) {
|
|
26612
26612
|
const Z = D[he];
|
|
@@ -26642,8 +26642,8 @@ var R9 = s2.exports;
|
|
|
26642
26642
|
}, []);
|
|
26643
26643
|
}, e.fromString = function(O, x) {
|
|
26644
26644
|
const E = m(O, a.isKanjiModeEnabled()), D = b(E), P = y(D, x), $ = s.find_path(P.map, "start", "end"), N = [];
|
|
26645
|
-
for (let
|
|
26646
|
-
N.push(P.table[$[
|
|
26645
|
+
for (let z = 1; z < $.length - 1; z++)
|
|
26646
|
+
N.push(P.table[$[z]].node);
|
|
26647
26647
|
return e.fromArray(C(N));
|
|
26648
26648
|
}, e.rawSplit = function(O) {
|
|
26649
26649
|
return e.fromArray(
|
|
@@ -27132,6 +27132,12 @@ const J9 = ["src"], Q9 = {
|
|
|
27132
27132
|
},
|
|
27133
27133
|
valueFormatter: {
|
|
27134
27134
|
type: Function
|
|
27135
|
+
},
|
|
27136
|
+
previewer: {
|
|
27137
|
+
type: Function
|
|
27138
|
+
},
|
|
27139
|
+
downloader: {
|
|
27140
|
+
type: Function
|
|
27135
27141
|
}
|
|
27136
27142
|
};
|
|
27137
27143
|
function uf(e) {
|
|
@@ -27179,13 +27185,13 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27179
27185
|
[`x-attachment--${r.listType}`]: !!r.listType,
|
|
27180
27186
|
"is-disabled": !!r.disabled,
|
|
27181
27187
|
"is-pointer": !!r.clickable || !!r.selectable,
|
|
27182
|
-
"is-not-add": !r.addable || r.limit
|
|
27188
|
+
"is-not-add": !r.addable || r.limit && r.limit <= C.value.length,
|
|
27183
27189
|
[`is-${r.size}`]: !!r.size
|
|
27184
|
-
})), C = Ce([]), b = X(() => C.value.filter((
|
|
27190
|
+
})), C = Ce([]), b = X(() => C.value.filter((B) => Fu(B)).map((B) => B.url)), y = X(
|
|
27185
27191
|
() => r.removable || r.previewable || r.downloadable
|
|
27186
|
-
), _ = (
|
|
27187
|
-
const A = uf(
|
|
27188
|
-
return A === "img" ? r.thumbnail && !
|
|
27192
|
+
), _ = (B) => {
|
|
27193
|
+
const A = uf(B);
|
|
27194
|
+
return A === "img" ? r.thumbnail && !B.url.startsWith("blob:") ? r.thumbnail(B) : B.url : gI[A];
|
|
27189
27195
|
}, w = X(() => ({
|
|
27190
27196
|
autoUpload: !0,
|
|
27191
27197
|
limit: r.limit,
|
|
@@ -27197,8 +27203,8 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27197
27203
|
}));
|
|
27198
27204
|
tt(
|
|
27199
27205
|
() => r.modelValue,
|
|
27200
|
-
async (
|
|
27201
|
-
const A = Bu(
|
|
27206
|
+
async (B) => {
|
|
27207
|
+
const A = Bu(B || []);
|
|
27202
27208
|
C.value = r.formatter ? await r.formatter(A) : A;
|
|
27203
27209
|
},
|
|
27204
27210
|
{
|
|
@@ -27206,30 +27212,30 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27206
27212
|
}
|
|
27207
27213
|
), tt(
|
|
27208
27214
|
() => r.selectValue,
|
|
27209
|
-
(
|
|
27215
|
+
(B) => {
|
|
27210
27216
|
m.value = [].concat(
|
|
27211
|
-
Bu(
|
|
27217
|
+
Bu(B || [])
|
|
27212
27218
|
);
|
|
27213
27219
|
},
|
|
27214
27220
|
{
|
|
27215
27221
|
immediate: !0
|
|
27216
27222
|
}
|
|
27217
27223
|
);
|
|
27218
|
-
const O = (
|
|
27224
|
+
const O = (B, A) => {
|
|
27219
27225
|
Tr.warning({
|
|
27220
27226
|
message: `您选择的文件数量超过了限制,只允许上传${r.limit}个文件。`
|
|
27221
27227
|
});
|
|
27222
|
-
}, x = async (
|
|
27228
|
+
}, x = async (B = []) => r.valueFormatter ? await r.valueFormatter(B) : B, E = (B) => {
|
|
27223
27229
|
if (!r.limitSize) return !0;
|
|
27224
27230
|
const A = r.limitSize.toUpperCase(), k = Number.parseFloat(A) || 0;
|
|
27225
|
-
return k ? A.endsWith("M") ?
|
|
27226
|
-
}, D = (
|
|
27227
|
-
const A = C.value.findIndex((k) => k.uid ===
|
|
27231
|
+
return k ? A.endsWith("M") ? B.size < k * 1024 ** 2 : B.size < k * 1024 : !0;
|
|
27232
|
+
}, D = (B) => {
|
|
27233
|
+
const A = C.value.findIndex((k) => k.uid === B.uid);
|
|
27228
27234
|
A > -1 && C.value.splice(A, 1);
|
|
27229
|
-
}, P = async (
|
|
27235
|
+
}, P = async (B) => {
|
|
27230
27236
|
const A = r.uploader || o.uploader;
|
|
27231
27237
|
if (A) {
|
|
27232
|
-
const k =
|
|
27238
|
+
const k = B.file;
|
|
27233
27239
|
if (!E(k)) {
|
|
27234
27240
|
D(k), Tr.error({
|
|
27235
27241
|
message: `上传文件体积不可超过${r.limitSize}`
|
|
@@ -27238,44 +27244,44 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27238
27244
|
}
|
|
27239
27245
|
i.value = !0;
|
|
27240
27246
|
const W = await A(k).catch(() => null);
|
|
27241
|
-
if (!W) {
|
|
27247
|
+
if (i.value = !1, !W) {
|
|
27242
27248
|
D(k), Tr.error({
|
|
27243
27249
|
message: `文件${k.name}上传失败。`
|
|
27244
27250
|
});
|
|
27245
27251
|
return;
|
|
27246
27252
|
}
|
|
27247
|
-
return
|
|
27253
|
+
return typeof W == "string" ? { url: W } : W;
|
|
27248
27254
|
}
|
|
27249
|
-
}, $ = (
|
|
27250
|
-
const A = m.value.findIndex((k) => k.url ===
|
|
27251
|
-
A > -1 ? r.multiple ? m.value.splice(A, 1) : m.value = [] : r.multiple ? m.value.push(oi(
|
|
27255
|
+
}, $ = (B) => {
|
|
27256
|
+
const A = m.value.findIndex((k) => k.url === B.url);
|
|
27257
|
+
A > -1 ? r.multiple ? m.value.splice(A, 1) : m.value = [] : r.multiple ? m.value.push(oi(B)) : m.value = [oi(B)], l("select", m.value), l(
|
|
27252
27258
|
"update:selectValue",
|
|
27253
27259
|
r.multiple ? m.value : m.value[0]
|
|
27254
27260
|
);
|
|
27255
|
-
}, N = (
|
|
27256
|
-
const A = m.value.findIndex((k) => k.url ===
|
|
27261
|
+
}, N = (B) => {
|
|
27262
|
+
const A = m.value.findIndex((k) => k.url === B.url);
|
|
27257
27263
|
A > -1 && m.value.splice(A, 1);
|
|
27258
|
-
},
|
|
27259
|
-
r.clickable && l("click", oi(
|
|
27260
|
-
}, de = async (
|
|
27264
|
+
}, z = (B) => !!m.value.find((A) => A.url === B.url), ae = (B) => {
|
|
27265
|
+
r.clickable && l("click", oi(B)), r.selectable && $(B);
|
|
27266
|
+
}, de = async (B, A) => {
|
|
27261
27267
|
if (A.every((I) => I.status === "success") && A.length === C.value.length) {
|
|
27262
27268
|
const I = C.value.map((W) => oi(W));
|
|
27263
|
-
l("change", I), l("update:modelValue", await x(I)),
|
|
27269
|
+
l("change", I), l("update:modelValue", await x(I)), B?.response && (s.value = Symbol());
|
|
27264
27270
|
}
|
|
27265
|
-
}, he = async (
|
|
27271
|
+
}, he = async (B) => {
|
|
27266
27272
|
if (!await ds.confirm("确定删除文件?", "提示", {
|
|
27267
27273
|
type: "warning"
|
|
27268
27274
|
}).catch(() => !1)) return;
|
|
27269
|
-
const k = C.value.filter((I) => I.uid !==
|
|
27270
|
-
C.value = k, l("remove",
|
|
27271
|
-
}, Z = (
|
|
27272
|
-
q2(
|
|
27273
|
-
Sf(
|
|
27274
|
-
}), l("download",
|
|
27275
|
-
}, K = (
|
|
27276
|
-
Fu(
|
|
27277
|
-
(A) => A ===
|
|
27278
|
-
), c.value = !0) : Sf(
|
|
27275
|
+
const k = C.value.filter((I) => I.uid !== B.uid || I.url !== B.url).map((I) => oi(I));
|
|
27276
|
+
C.value = k, l("remove", B), l("change", k), l("update:modelValue", await x(k)), N(B), B?.raw || (s.value = Symbol());
|
|
27277
|
+
}, Z = (B) => {
|
|
27278
|
+
r.downloader ? r.downloader(B) : q2(B.url, B.name).catch(() => {
|
|
27279
|
+
Sf(B.url, B.name);
|
|
27280
|
+
}), l("download", B);
|
|
27281
|
+
}, K = (B) => {
|
|
27282
|
+
Fu(B) ? (u.value = b.value.findIndex(
|
|
27283
|
+
(A) => A === B.url
|
|
27284
|
+
), c.value = !0) : r.previewer ? r.previewer(B) : Sf(B.url, B.name), l("preview", B);
|
|
27279
27285
|
}, J = () => {
|
|
27280
27286
|
c.value = !1;
|
|
27281
27287
|
};
|
|
@@ -27285,7 +27291,7 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27285
27291
|
download: Z,
|
|
27286
27292
|
selections: m,
|
|
27287
27293
|
fileList: C
|
|
27288
|
-
}), (
|
|
27294
|
+
}), (B, A) => (ve(), pt("div", {
|
|
27289
27295
|
class: $n(["x-attachment", g.value])
|
|
27290
27296
|
}, [
|
|
27291
27297
|
(ve(), Ye(F(dh), Et({
|
|
@@ -27301,7 +27307,7 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27301
27307
|
}), {
|
|
27302
27308
|
file: Ie(({ file: k }) => [
|
|
27303
27309
|
so((ve(), pt("div", {
|
|
27304
|
-
class: $n(["x-attachment__item", { "is-selected":
|
|
27310
|
+
class: $n(["x-attachment__item", { "is-selected": z(k) }]),
|
|
27305
27311
|
onClick: (I) => ae(k)
|
|
27306
27312
|
}, [
|
|
27307
27313
|
Ht("div", yI, [
|
|
@@ -27361,11 +27367,11 @@ const lI = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27361
27367
|
])
|
|
27362
27368
|
]),
|
|
27363
27369
|
tip: Ie(() => [
|
|
27364
|
-
ht(
|
|
27370
|
+
ht(B.$slots, "tip")
|
|
27365
27371
|
]),
|
|
27366
27372
|
default: Ie(() => [
|
|
27367
27373
|
Ht("div", vI, [
|
|
27368
|
-
ht(
|
|
27374
|
+
ht(B.$slots, "upload", {}, () => [
|
|
27369
27375
|
ot(F(ri), null, {
|
|
27370
27376
|
default: Ie(() => [
|
|
27371
27377
|
ot(F(Ch))
|