@vtj/ui 0.8.61 → 0.8.62
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 +68 -120
- package/dist/index.umd.js +12 -12
- package/package.json +6 -6
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -8,10 +8,10 @@ import { useRouter as dd, RouterView as hb, useRoute as mm, 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.62
|
|
12
12
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
13
13
|
*/
|
|
14
|
-
const mI = "0.8.
|
|
14
|
+
const mI = "0.8.62", gb = {
|
|
15
15
|
default: 14,
|
|
16
16
|
small: 12,
|
|
17
17
|
large: 18
|
|
@@ -85,8 +85,7 @@ const bb = {
|
|
|
85
85
|
props: vb,
|
|
86
86
|
setup(e) {
|
|
87
87
|
const t = e, n = ol(), o = _o(), r = Z(() => {
|
|
88
|
-
if (!t.icon)
|
|
89
|
-
return null;
|
|
88
|
+
if (!t.icon) return null;
|
|
90
89
|
const s = o?.appContext.app;
|
|
91
90
|
return typeof t.icon == "object" ? _i(t.icon) : s?.component(t.icon) || t.icon;
|
|
92
91
|
}), l = Z(() => {
|
|
@@ -460,8 +459,7 @@ const Mb = { key: 0 }, _b = /* @__PURE__ */ nt({
|
|
|
460
459
|
})), h = () => {
|
|
461
460
|
s.value || r("click", xr(n));
|
|
462
461
|
}, v = (b) => {
|
|
463
|
-
if (s.value)
|
|
464
|
-
return;
|
|
462
|
+
if (s.value) return;
|
|
465
463
|
const E = n.menus?.find(($) => $.command === b);
|
|
466
464
|
E && r("command", xr(E));
|
|
467
465
|
}, y = (b) => {
|
|
@@ -744,8 +742,7 @@ const Mb = { key: 0 }, _b = /* @__PURE__ */ nt({
|
|
|
744
742
|
setup(e) {
|
|
745
743
|
const t = e, n = ol(), o = _o(), r = Z(() => {
|
|
746
744
|
const a = o?.parent;
|
|
747
|
-
if (!a)
|
|
748
|
-
return !1;
|
|
745
|
+
if (!a) return !1;
|
|
749
746
|
const s = a.proxy;
|
|
750
747
|
return s.$options.name === "XContainer" || !!s.flex;
|
|
751
748
|
}), l = Z(() => ({
|
|
@@ -1025,8 +1022,7 @@ class Cf {
|
|
|
1025
1022
|
}
|
|
1026
1023
|
init() {
|
|
1027
1024
|
const { el: t, options: n } = this, { disabled: o, delay: r = 150, onStart: l, onEnd: i } = n;
|
|
1028
|
-
if (o)
|
|
1029
|
-
return;
|
|
1025
|
+
if (o) return;
|
|
1030
1026
|
let a = null;
|
|
1031
1027
|
const s = this.getHandle(), u = this.getTarget();
|
|
1032
1028
|
let c = t.getBoundingClientRect(), h = null;
|
|
@@ -1094,8 +1090,7 @@ class wf {
|
|
|
1094
1090
|
cleanMouseup;
|
|
1095
1091
|
init() {
|
|
1096
1092
|
const { el: t, options: n } = this, { disabled: o, onStart: r, onEnd: l } = n;
|
|
1097
|
-
if (o)
|
|
1098
|
-
return;
|
|
1093
|
+
if (o) return;
|
|
1099
1094
|
this.MIE = db(t), this.cleanMousedown = Va(document, "mousedown", () => {
|
|
1100
1095
|
this.direction?.value && this.MIE && (this.resizing.value = !0, t.classList.add("is-resizing", `is-${this.direction.value}-resizing`), r && r(this.direction.value, this.MIE));
|
|
1101
1096
|
}), this.cleanMouseup = Va(document, "mouseup", () => {
|
|
@@ -1114,8 +1109,7 @@ class wf {
|
|
|
1114
1109
|
}
|
|
1115
1110
|
resize() {
|
|
1116
1111
|
const { MIE: t, direction: n, resizing: o, options: r, el: l } = this, i = n?.value || "";
|
|
1117
|
-
if (!t || !o.value || !i)
|
|
1118
|
-
return;
|
|
1112
|
+
if (!t || !o.value || !i) return;
|
|
1119
1113
|
const { x: a, y: s, elementX: u, elementY: c, elementHeight: h, elementWidth: v } = t, { onResizing: y } = r, {
|
|
1120
1114
|
minWidth: x = 0,
|
|
1121
1115
|
minHeight: C = 0,
|
|
@@ -1147,11 +1141,9 @@ class wf {
|
|
|
1147
1141
|
y && y(i, t);
|
|
1148
1142
|
}
|
|
1149
1143
|
getDirection() {
|
|
1150
|
-
if (!this.MIE)
|
|
1151
|
-
return "";
|
|
1144
|
+
if (!this.MIE) return "";
|
|
1152
1145
|
const { elementX: t, elementY: n, elementHeight: o, elementWidth: r, isOutside: l } = this.MIE;
|
|
1153
|
-
if (l.value)
|
|
1154
|
-
return "";
|
|
1146
|
+
if (l.value) return "";
|
|
1155
1147
|
const { dirs: i = ["n", "s", "w", "e"], edge: a = 5 } = this.options;
|
|
1156
1148
|
let s = "";
|
|
1157
1149
|
return i.includes("n") && n.value <= a ? s += "n" : i.includes("s") && n.value > o.value - a && (s += "s"), i.includes("w") && t.value <= a ? s += "w" : i.includes("e") && t.value > r.value - a && (s += "e"), s;
|
|
@@ -1352,8 +1344,7 @@ function Ub(e, t, n, o) {
|
|
|
1352
1344
|
n("dragging", l);
|
|
1353
1345
|
},
|
|
1354
1346
|
onEnd(l) {
|
|
1355
|
-
if (t.mode === "maximized")
|
|
1356
|
-
return;
|
|
1347
|
+
if (t.mode === "maximized") return;
|
|
1357
1348
|
const { x: i, y: a } = l;
|
|
1358
1349
|
t.left = i, t.top = a, t.dragging = !1, n("dragEnd", l);
|
|
1359
1350
|
}
|
|
@@ -1383,8 +1374,7 @@ function Gb(e, t, n) {
|
|
|
1383
1374
|
}
|
|
1384
1375
|
function Yb(e, t) {
|
|
1385
1376
|
const n = e.componentInstance;
|
|
1386
|
-
if (!n)
|
|
1387
|
-
return;
|
|
1377
|
+
if (!n) return;
|
|
1388
1378
|
let o = null;
|
|
1389
1379
|
return gn(() => {
|
|
1390
1380
|
const r = V(t), l = V(r?.bodyRef);
|
|
@@ -2475,15 +2465,13 @@ function v1(e, t, n, o, r) {
|
|
|
2475
2465
|
}, ie = async () => {
|
|
2476
2466
|
if (!await ei.confirm("是否关闭全部页签", "提示", {
|
|
2477
2467
|
type: "warning"
|
|
2478
|
-
}).catch(() => !1))
|
|
2479
|
-
return;
|
|
2468
|
+
}).catch(() => !1)) return;
|
|
2480
2469
|
const Y = s.value;
|
|
2481
2470
|
return s.value = [], E(r.value), Y;
|
|
2482
2471
|
}, de = async () => {
|
|
2483
2472
|
if (!await ei.confirm("是否关闭其他页签", "提示", {
|
|
2484
2473
|
type: "warning"
|
|
2485
|
-
}).catch(() => !1))
|
|
2486
|
-
return;
|
|
2474
|
+
}).catch(() => !1)) return;
|
|
2487
2475
|
const Y = s.value.filter((U) => U.id !== w.value);
|
|
2488
2476
|
return s.value = s.value.filter((U) => U.id === w.value), Y;
|
|
2489
2477
|
}, me = (q) => {
|
|
@@ -6954,8 +6942,7 @@ const TM = ["closeMenu"], OM = {
|
|
|
6954
6942
|
break;
|
|
6955
6943
|
}
|
|
6956
6944
|
C[M] = E || b[0];
|
|
6957
|
-
} else
|
|
6958
|
-
C[M] && (Ot(x, Ct.ENTER) || Ot(x, Ct.SPACEBAR)) && v.ctxMenuLinkEvent(x, C[M]);
|
|
6945
|
+
} else C[M] && (Ot(x, Ct.ENTER) || Ot(x, Ct.SPACEBAR)) && v.ctxMenuLinkEvent(x, C[M]);
|
|
6959
6946
|
},
|
|
6960
6947
|
handleOpenMenuEvent: y,
|
|
6961
6948
|
/**
|
|
@@ -8610,8 +8597,7 @@ const mr = 12, RM = 20, IM = 8, Tr = nt({
|
|
|
8610
8597
|
if (e.type === "week") {
|
|
8611
8598
|
const p = f.toNumber(e.selectDay);
|
|
8612
8599
|
D = f.getWhatWeek(D, 0, p, dt);
|
|
8613
|
-
} else
|
|
8614
|
-
et && (D.setHours(Pe.getHours()), D.setMinutes(Pe.getMinutes()), D.setSeconds(Pe.getSeconds()));
|
|
8600
|
+
} else et && (D.setHours(Pe.getHours()), D.setMinutes(Pe.getMinutes()), D.setSeconds(Pe.getSeconds()));
|
|
8615
8601
|
const d = f.toDateString(D, Ge, { firstDay: dt });
|
|
8616
8602
|
if (_t(D), ge) {
|
|
8617
8603
|
const p = Y.value;
|
|
@@ -9656,10 +9642,8 @@ const Il = nt({
|
|
|
9656
9642
|
W.preventDefault();
|
|
9657
9643
|
let { firstOption: At, offsetOption: Dt } = se(Ue, ot);
|
|
9658
9644
|
!Dt && !me(Ue) && (Dt = At), G(Dt), J(Dt, pt);
|
|
9659
|
-
} else
|
|
9660
|
-
|
|
9661
|
-
else
|
|
9662
|
-
(ot || pt || lt || z) && s.isActivated && (W.preventDefault(), Ae());
|
|
9645
|
+
} else z && W.preventDefault();
|
|
9646
|
+
else (ot || pt || lt || z) && s.isActivated && (W.preventDefault(), Ae());
|
|
9663
9647
|
s.isActivated && Ft && Q && H(W, null);
|
|
9664
9648
|
}
|
|
9665
9649
|
}, ue = () => {
|
|
@@ -16108,10 +16092,9 @@ const $h = nt({
|
|
|
16108
16092
|
!Rt(d, K).flag) && setTimeout(() => z.clearEdit(d));
|
|
16109
16093
|
})));
|
|
16110
16094
|
}
|
|
16111
|
-
} else
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
})));
|
|
16095
|
+
} else A && !Rt(d, K).flag && !(U && Rt(d, U.getRefMaps().refElem.value).flag) && !(Re && Rt(d, Re.getRefMaps().refElem.value).flag) && !(F && Rt(d, F.getRefMaps().refElem.value).flag) && (z.clearSelected && z.clearSelected(), te.autoClear && z.clearCellAreas && (Rt(d, document.body, "vxe-table--ignore-areas-clear").flag || h.preventEvent(d, "event.clearAreas", {}, () => {
|
|
16096
|
+
z.clearCellAreas(), z.clearCopyCellArea();
|
|
16097
|
+
})));
|
|
16115
16098
|
z.closeMenu && g.visible && Re && !Rt(d, Re.getRefMaps().refElem.value).flag && z.closeMenu();
|
|
16116
16099
|
const ze = Rt(d, U ? U.getRefMaps().refElem.value : K).flag;
|
|
16117
16100
|
!ze && L && re.autoClear && (s.validErrorMaps = {}), u.isActivated = ze;
|
|
@@ -17600,10 +17583,9 @@ const ai = nt({
|
|
|
17600
17583
|
} catch {
|
|
17601
17584
|
i.isRefresh = !1;
|
|
17602
17585
|
}
|
|
17603
|
-
} else
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
}));
|
|
17586
|
+
} else h && (i.isRefresh = !0, h.triggerToolbarCommitEvent({ code: le.code || "reload" }, pe).catch((ve) => ve).then(() => {
|
|
17587
|
+
i.isRefresh = !1;
|
|
17588
|
+
}));
|
|
17607
17589
|
}
|
|
17608
17590
|
}, de = (pe) => {
|
|
17609
17591
|
h && h.triggerZoomEvent(pe);
|
|
@@ -20916,16 +20898,14 @@ function Mr() {
|
|
|
20916
20898
|
}, Mr.apply(this, arguments);
|
|
20917
20899
|
}
|
|
20918
20900
|
function L_(e, t) {
|
|
20919
|
-
if (e == null)
|
|
20920
|
-
return {};
|
|
20901
|
+
if (e == null) return {};
|
|
20921
20902
|
var n = {}, o = Object.keys(e), r, l;
|
|
20922
20903
|
for (l = 0; l < o.length; l++)
|
|
20923
20904
|
r = o[l], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
|
|
20924
20905
|
return n;
|
|
20925
20906
|
}
|
|
20926
20907
|
function V_(e, t) {
|
|
20927
|
-
if (e == null)
|
|
20928
|
-
return {};
|
|
20908
|
+
if (e == null) return {};
|
|
20929
20909
|
var n = L_(e, t), o, r;
|
|
20930
20910
|
if (Object.getOwnPropertySymbols) {
|
|
20931
20911
|
var l = Object.getOwnPropertySymbols(e);
|
|
@@ -20974,8 +20954,7 @@ function Vo(e, t, n, o) {
|
|
|
20974
20954
|
do {
|
|
20975
20955
|
if (t != null && (t[0] === ">" ? e.parentNode === n && qa(e, t) : qa(e, t)) || o && e === n)
|
|
20976
20956
|
return e;
|
|
20977
|
-
if (e === n)
|
|
20978
|
-
break;
|
|
20957
|
+
if (e === n) break;
|
|
20979
20958
|
} while (e = z_(e));
|
|
20980
20959
|
}
|
|
20981
20960
|
return null;
|
|
@@ -21052,10 +21031,8 @@ function On(e, t, n, o, r) {
|
|
|
21052
21031
|
function Lh(e, t, n) {
|
|
21053
21032
|
for (var o = Jr(e, !0), r = On(e)[t]; o; ) {
|
|
21054
21033
|
var l = On(o)[n], i = void 0;
|
|
21055
|
-
if (i = r >= l, !i)
|
|
21056
|
-
|
|
21057
|
-
if (o === tr())
|
|
21058
|
-
break;
|
|
21034
|
+
if (i = r >= l, !i) return o;
|
|
21035
|
+
if (o === tr()) break;
|
|
21059
21036
|
o = Jr(o, !1);
|
|
21060
21037
|
}
|
|
21061
21038
|
return !1;
|
|
@@ -21097,23 +21074,19 @@ function H_(e, t) {
|
|
|
21097
21074
|
for (var n in e)
|
|
21098
21075
|
if (e.hasOwnProperty(n)) {
|
|
21099
21076
|
for (var o in t)
|
|
21100
|
-
if (t.hasOwnProperty(o) && t[o] === e[n][o])
|
|
21101
|
-
return Number(n);
|
|
21077
|
+
if (t.hasOwnProperty(o) && t[o] === e[n][o]) return Number(n);
|
|
21102
21078
|
}
|
|
21103
21079
|
return -1;
|
|
21104
21080
|
}
|
|
21105
21081
|
function Jr(e, t) {
|
|
21106
|
-
if (!e || !e.getBoundingClientRect)
|
|
21107
|
-
return tr();
|
|
21082
|
+
if (!e || !e.getBoundingClientRect) return tr();
|
|
21108
21083
|
var n = e, o = !1;
|
|
21109
21084
|
do
|
|
21110
21085
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
21111
21086
|
var r = kt(n);
|
|
21112
21087
|
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
21113
|
-
if (!n.getBoundingClientRect || n === document.body)
|
|
21114
|
-
|
|
21115
|
-
if (o || t)
|
|
21116
|
-
return n;
|
|
21088
|
+
if (!n.getBoundingClientRect || n === document.body) return tr();
|
|
21089
|
+
if (o || t) return n;
|
|
21117
21090
|
o = !0;
|
|
21118
21091
|
}
|
|
21119
21092
|
}
|
|
@@ -21659,8 +21632,7 @@ $t.prototype = /** @lends Sortable.prototype */
|
|
|
21659
21632
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
21660
21633
|
_onDragOver: function(t) {
|
|
21661
21634
|
var n = this.el, o = t.target, r, l, i, a = this.options, s = a.group, u = $t.active, c = ya === s, h = a.sort, v = Vn || u, y, x = this, C = !1;
|
|
21662
|
-
if (Xu)
|
|
21663
|
-
return;
|
|
21635
|
+
if (Xu) return;
|
|
21664
21636
|
function M(R, I) {
|
|
21665
21637
|
lo(R, x, rr({
|
|
21666
21638
|
evt: t,
|
|
@@ -21699,13 +21671,11 @@ $t.prototype = /** @lends Sortable.prototype */
|
|
|
21699
21671
|
originalEvent: t
|
|
21700
21672
|
});
|
|
21701
21673
|
}
|
|
21702
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), o = Vo(o, a.draggable, n, !0), M("dragOver"), $t.eventCanceled)
|
|
21703
|
-
return C;
|
|
21674
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), o = Vo(o, a.draggable, n, !0), M("dragOver"), $t.eventCanceled) return C;
|
|
21704
21675
|
if (ct.contains(t.target) || o.animated && o.animatingX && o.animatingY || x._ignoreWhileAnimating === o)
|
|
21705
21676
|
return O(!1);
|
|
21706
21677
|
if (Xa = !1, u && !a.disabled && (c ? h || (i = xn !== dn) : Vn === this || (this.lastPutMode = ya.checkPull(this, u, ct, t)) && s.checkPut(this, u, ct, t))) {
|
|
21707
|
-
if (y = this._getDirection(t, o) === "vertical", r = On(ct), M("dragOverValid"), $t.eventCanceled)
|
|
21708
|
-
return C;
|
|
21678
|
+
if (y = this._getDirection(t, o) === "vertical", r = On(ct), M("dragOverValid"), $t.eventCanceled) return C;
|
|
21709
21679
|
if (i)
|
|
21710
21680
|
return xn = dn, w(), this._hideClone(), M("revert"), $t.eventCanceled || (El ? dn.insertBefore(ct, El) : dn.appendChild(ct)), O(!0);
|
|
21711
21681
|
var E = qd(n, a.draggable);
|
|
@@ -21890,8 +21860,7 @@ $t.prototype = /** @lends Sortable.prototype */
|
|
|
21890
21860
|
},
|
|
21891
21861
|
_hideClone: function() {
|
|
21892
21862
|
if (!Zr) {
|
|
21893
|
-
if (lo("hideClone", this), $t.eventCanceled)
|
|
21894
|
-
return;
|
|
21863
|
+
if (lo("hideClone", this), $t.eventCanceled) return;
|
|
21895
21864
|
kt(hn, "display", "none"), this.options.removeCloneOnHide && hn.parentNode && hn.parentNode.removeChild(hn), Zr = !0;
|
|
21896
21865
|
}
|
|
21897
21866
|
},
|
|
@@ -21901,8 +21870,7 @@ $t.prototype = /** @lends Sortable.prototype */
|
|
|
21901
21870
|
return;
|
|
21902
21871
|
}
|
|
21903
21872
|
if (Zr) {
|
|
21904
|
-
if (lo("showClone", this), $t.eventCanceled)
|
|
21905
|
-
return;
|
|
21873
|
+
if (lo("showClone", this), $t.eventCanceled) return;
|
|
21906
21874
|
ct.parentNode == dn && !this.options.group.revertClone ? dn.insertBefore(hn, ct) : El ? dn.insertBefore(hn, El) : dn.appendChild(hn), this.options.group.revertClone && this.animate(ct, hn), kt(hn, "display", ""), Zr = !1;
|
|
21907
21875
|
}
|
|
21908
21876
|
}
|
|
@@ -22161,8 +22129,7 @@ function d7(e, t, n) {
|
|
|
22161
22129
|
const { getTableColumn: o, getColumnNode: r, getColumnIndex: l, loadColumn: i } = e, a = (s, u = 0) => s.filter((c) => c.visible)[u];
|
|
22162
22130
|
return (s) => {
|
|
22163
22131
|
const { item: u, newIndex: c = -1, oldIndex: h = -1 } = s, { collectColumn: v, fullColumn: y } = o(), x = r(u);
|
|
22164
|
-
if (!x)
|
|
22165
|
-
return;
|
|
22132
|
+
if (!x) return;
|
|
22166
22133
|
const C = x.parent, M = C ? C.children : v, O = y.filter(
|
|
22167
22134
|
(k) => k.level === x.item.level
|
|
22168
22135
|
).findIndex((k) => k.id === M[0]?.id), b = l(
|
|
@@ -22515,8 +22482,7 @@ const S7 = {
|
|
|
22515
22482
|
return !1;
|
|
22516
22483
|
}, M7 = (e) => {
|
|
22517
22484
|
const { $event: t, $table: n } = e;
|
|
22518
|
-
if (!n.getParentElem().contains(t.target))
|
|
22519
|
-
return !1;
|
|
22485
|
+
if (!n.getParentElem().contains(t.target)) return !1;
|
|
22520
22486
|
}, _7 = {
|
|
22521
22487
|
install(e) {
|
|
22522
22488
|
e.renderer.mixin({
|
|
@@ -22715,8 +22681,7 @@ function j7(e, t, n) {
|
|
|
22715
22681
|
const o = we();
|
|
22716
22682
|
return t.rowSortable && (gn(() => {
|
|
22717
22683
|
const r = V(e);
|
|
22718
|
-
if (!r)
|
|
22719
|
-
return;
|
|
22684
|
+
if (!r) return;
|
|
22720
22685
|
const l = r.$el.querySelector(".vxe-table--body>tbody");
|
|
22721
22686
|
if (l) {
|
|
22722
22687
|
const i = {
|
|
@@ -22731,12 +22696,10 @@ function j7(e, t, n) {
|
|
|
22731
22696
|
}
|
|
22732
22697
|
function W7(e, t, n, o) {
|
|
22733
22698
|
const r = we([]);
|
|
22734
|
-
if (!t.columnSortable)
|
|
22735
|
-
return r;
|
|
22699
|
+
if (!t.columnSortable) return r;
|
|
22736
22700
|
const l = async () => {
|
|
22737
22701
|
const s = V(e);
|
|
22738
|
-
if (!s || !s.$el)
|
|
22739
|
-
return;
|
|
22702
|
+
if (!s || !s.$el) return;
|
|
22740
22703
|
await N2(200);
|
|
22741
22704
|
const u = Array.from(
|
|
22742
22705
|
s.$el.querySelectorAll(".vxe-header--row")
|
|
@@ -22798,8 +22761,7 @@ function U7(e, t) {
|
|
|
22798
22761
|
getCustom: i = o.getCustom,
|
|
22799
22762
|
saveCustom: a = o.saveCustom
|
|
22800
22763
|
} = t, s = (y) => t.id || `X_Grid_${y?.id || y?.$.uid}`, u = (y) => {
|
|
22801
|
-
if (!l || !r)
|
|
22802
|
-
return;
|
|
22764
|
+
if (!l || !r) return;
|
|
22803
22765
|
const x = y.column, C = Dl(x), M = x.renderWidth;
|
|
22804
22766
|
r.resize ? r.resize[C] = M : r.resize = { [C]: M }, a && a(r);
|
|
22805
22767
|
}, c = (y) => {
|
|
@@ -22815,8 +22777,7 @@ function U7(e, t) {
|
|
|
22815
22777
|
}
|
|
22816
22778
|
}, h = (y) => {
|
|
22817
22779
|
const x = V(e);
|
|
22818
|
-
if (!l || !x || !r)
|
|
22819
|
-
return;
|
|
22780
|
+
if (!l || !x || !r) return;
|
|
22820
22781
|
const { collectColumn: C } = x.getTableColumn(), M = (w) => {
|
|
22821
22782
|
const O = [];
|
|
22822
22783
|
for (let b of w)
|
|
@@ -23105,14 +23066,12 @@ const X7 = {
|
|
|
23105
23066
|
const k = async (F = {}, R = -1) => {
|
|
23106
23067
|
l.editable || console.warn("XGrid在编辑模式需要开启editable");
|
|
23107
23068
|
const I = r.value;
|
|
23108
|
-
if (!I)
|
|
23109
|
-
return;
|
|
23069
|
+
if (!I) return;
|
|
23110
23070
|
const { row: G } = await I.insertAt(F, R);
|
|
23111
23071
|
await I.setEditRow(G);
|
|
23112
23072
|
}, N = async (F) => r.value?.setEditRow(F), B = () => {
|
|
23113
23073
|
const F = r.value;
|
|
23114
|
-
if (!F)
|
|
23115
|
-
return [];
|
|
23074
|
+
if (!F) return [];
|
|
23116
23075
|
const { fullData: R = [] } = F.getTableData();
|
|
23117
23076
|
return R;
|
|
23118
23077
|
}, ie = () => {
|
|
@@ -23123,8 +23082,7 @@ const X7 = {
|
|
|
23123
23082
|
return r.value?.validate(F);
|
|
23124
23083
|
}, me = () => {
|
|
23125
23084
|
const F = r.value;
|
|
23126
|
-
if (!F)
|
|
23127
|
-
return null;
|
|
23085
|
+
if (!F) return null;
|
|
23128
23086
|
const R = F.getColumns();
|
|
23129
23087
|
return R.find((J) => J.type === "radio") ? F.getRadioRecord(!1) : R.find((J) => J.type === "checkbox") ? F.getCheckboxRecords(!1) : null;
|
|
23130
23088
|
}, j = () => {
|
|
@@ -23143,8 +23101,7 @@ const X7 = {
|
|
|
23143
23101
|
getSelected: me,
|
|
23144
23102
|
remove: async (F) => {
|
|
23145
23103
|
const R = r.value;
|
|
23146
|
-
if (!R)
|
|
23147
|
-
return;
|
|
23104
|
+
if (!R) return;
|
|
23148
23105
|
if (!F || Array.isArray(F) && !F.length) {
|
|
23149
23106
|
rm.info({
|
|
23150
23107
|
message: "请选择需要删除的数据"
|
|
@@ -23356,12 +23313,15 @@ const Q7 = {
|
|
|
23356
23313
|
o.value?.vxeRef.focus();
|
|
23357
23314
|
});
|
|
23358
23315
|
const a = (u) => {
|
|
23359
|
-
if (u.$event.key
|
|
23360
|
-
|
|
23316
|
+
if (u.$event.key !== "Enter") return;
|
|
23317
|
+
u.$event.stopPropagation(), u.$event.preventDefault();
|
|
23318
|
+
const c = u.$event.target.nodeName || "";
|
|
23319
|
+
if (!["INPUT", "SELECT", "RADIO", "CHECKBOX"].includes(c.toUpperCase())) {
|
|
23320
|
+
if (n.multiple)
|
|
23361
23321
|
l();
|
|
23362
23322
|
else {
|
|
23363
|
-
const { row:
|
|
23364
|
-
|
|
23323
|
+
const { row: v } = o.value?.vxeRef.getSelectedCell() || {};
|
|
23324
|
+
v && n.onPick(v);
|
|
23365
23325
|
}
|
|
23366
23326
|
return !1;
|
|
23367
23327
|
}
|
|
@@ -23630,8 +23590,7 @@ const I0 = /* @__PURE__ */ nt({
|
|
|
23630
23590
|
} else
|
|
23631
23591
|
w(), i.value = !0;
|
|
23632
23592
|
}, b = ($) => {
|
|
23633
|
-
if (o.disabled)
|
|
23634
|
-
return;
|
|
23593
|
+
if (o.disabled) return;
|
|
23635
23594
|
["I", "SVG", "PATH"].includes($.target.nodeName.toUpperCase()) && (w(), i.value = !0);
|
|
23636
23595
|
}, E = async ($) => {
|
|
23637
23596
|
c($, o.multiple && o.append), i.value = !1, r("picked", $, o.data), await ne(), M();
|
|
@@ -25311,10 +25270,8 @@ const WR = [
|
|
|
25311
25270
|
3706
|
|
25312
25271
|
];
|
|
25313
25272
|
Co.getSymbolSize = function(t) {
|
|
25314
|
-
if (!t)
|
|
25315
|
-
|
|
25316
|
-
if (t < 1 || t > 40)
|
|
25317
|
-
throw new Error('"version" should be in range from 1 to 40');
|
|
25273
|
+
if (!t) throw new Error('"version" cannot be null or undefined');
|
|
25274
|
+
if (t < 1 || t > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
25318
25275
|
return t * 4 + 17;
|
|
25319
25276
|
};
|
|
25320
25277
|
Co.getSymbolTotalCodewords = function(t) {
|
|
@@ -25415,8 +25372,7 @@ var GR = Ki, B0 = {};
|
|
|
25415
25372
|
(function(e) {
|
|
25416
25373
|
const t = Co.getSymbolSize;
|
|
25417
25374
|
e.getRowColCoords = function(o) {
|
|
25418
|
-
if (o === 1)
|
|
25419
|
-
return [];
|
|
25375
|
+
if (o === 1) return [];
|
|
25420
25376
|
const r = Math.floor(o / 7) + 2, l = t(o), i = l === 145 ? 26 : Math.ceil((l - 13) / (2 * r - 2)) * 2, a = [l - 7];
|
|
25421
25377
|
for (let s = 1; s < r - 1; s++)
|
|
25422
25378
|
a[s] = a[s - 1] - i;
|
|
@@ -25499,8 +25455,7 @@ var H0 = {};
|
|
|
25499
25455
|
}, e.getPenaltyN4 = function(r) {
|
|
25500
25456
|
let l = 0;
|
|
25501
25457
|
const i = r.data.length;
|
|
25502
|
-
for (let s = 0; s < i; s++)
|
|
25503
|
-
l += r.data[s];
|
|
25458
|
+
for (let s = 0; s < i; s++) l += r.data[s];
|
|
25504
25459
|
return Math.abs(Math.ceil(l * 100 / i / 5) - 10) * t.N4;
|
|
25505
25460
|
};
|
|
25506
25461
|
function n(o, r, l) {
|
|
@@ -25905,8 +25860,7 @@ const ki = new Uint8Array(512), Qa = new Uint8Array(256);
|
|
|
25905
25860
|
ki[n] = ki[n - 255];
|
|
25906
25861
|
})();
|
|
25907
25862
|
yc.log = function(t) {
|
|
25908
|
-
if (t < 1)
|
|
25909
|
-
throw new Error("log(" + t + ")");
|
|
25863
|
+
if (t < 1) throw new Error("log(" + t + ")");
|
|
25910
25864
|
return Qa[t];
|
|
25911
25865
|
};
|
|
25912
25866
|
yc.exp = function(t) {
|
|
@@ -25930,8 +25884,7 @@ yc.mul = function(t, n) {
|
|
|
25930
25884
|
for (let s = 0; s < r.length; s++)
|
|
25931
25885
|
l[s] ^= t.mul(r[s], i);
|
|
25932
25886
|
let a = 0;
|
|
25933
|
-
for (; a < l.length && l[a] === 0; )
|
|
25934
|
-
a++;
|
|
25887
|
+
for (; a < l.length && l[a] === 0; ) a++;
|
|
25935
25888
|
l = l.slice(a);
|
|
25936
25889
|
}
|
|
25937
25890
|
return l;
|
|
@@ -26007,16 +25960,14 @@ cr.testAlphanumeric = function(t) {
|
|
|
26007
25960
|
}, e.MIXED = {
|
|
26008
25961
|
bit: -1
|
|
26009
25962
|
}, e.getCharCountIndicator = function(l, i) {
|
|
26010
|
-
if (!l.ccBits)
|
|
26011
|
-
throw new Error("Invalid mode: " + l);
|
|
25963
|
+
if (!l.ccBits) throw new Error("Invalid mode: " + l);
|
|
26012
25964
|
if (!t.isValid(i))
|
|
26013
25965
|
throw new Error("Invalid version: " + i);
|
|
26014
25966
|
return i >= 1 && i < 10 ? l.ccBits[0] : i < 27 ? l.ccBits[1] : l.ccBits[2];
|
|
26015
25967
|
}, e.getBestModeForData = function(l) {
|
|
26016
25968
|
return n.testNumeric(l) ? e.NUMERIC : n.testAlphanumeric(l) ? e.ALPHANUMERIC : n.testKanji(l) ? e.KANJI : e.BYTE;
|
|
26017
25969
|
}, e.toString = function(l) {
|
|
26018
|
-
if (l && l.id)
|
|
26019
|
-
return l.id;
|
|
25970
|
+
if (l && l.id) return l.id;
|
|
26020
25971
|
throw new Error("Invalid mode");
|
|
26021
25972
|
}, e.isValid = function(l) {
|
|
26022
25973
|
return l && l.bit && l.ccBits;
|
|
@@ -26076,8 +26027,7 @@ cr.testAlphanumeric = function(t) {
|
|
|
26076
26027
|
throw new Error("Invalid QR Code version");
|
|
26077
26028
|
typeof C > "u" && (C = r.BYTE);
|
|
26078
26029
|
const M = t.getSymbolTotalCodewords(y), w = n.getTotalCodewordsCount(y, x), O = (M - w) * 8;
|
|
26079
|
-
if (C === r.MIXED)
|
|
26080
|
-
return O;
|
|
26030
|
+
if (C === r.MIXED) return O;
|
|
26081
26031
|
const b = O - u(C, y);
|
|
26082
26032
|
switch (C) {
|
|
26083
26033
|
case r.NUMERIC:
|
|
@@ -26956,8 +26906,7 @@ const R9 = ["src"], I9 = {
|
|
|
26956
26906
|
}
|
|
26957
26907
|
};
|
|
26958
26908
|
function of(e) {
|
|
26959
|
-
if (e.type)
|
|
26960
|
-
return e.type;
|
|
26909
|
+
if (e.type) return e.type;
|
|
26961
26910
|
const t = e.name || e.url.split("?")[0], n = t.substring(t.lastIndexOf(".") + 1).toLowerCase(), o = ["jpg", "png", "gif", "jpeg", "bpm", "webp", "svg"], r = ["js", "mjs", "cjs", "ts", "jsx", "tsx"], l = ["css", "scss", "sass", "less"], i = ["doc", "docx"], a = ["xls", "xlsx"], s = ["ppt", "pptx"], u = ["zip", "rar"], c = ["mp4", "wmv"], h = ["mp3", "wma"], v = ["pdf", "json"];
|
|
26962
26911
|
return o.includes(n) ? "img" : r.includes(n) ? "js" : l.includes(n) ? "css" : i.includes(n) ? "word" : a.includes(n) ? "excel" : s.includes(n) ? "ppt" : u.includes(n) ? "zip" : c.includes(n) ? "video" : h.includes(n) ? "audio" : v.includes(n) ? n : "unknow";
|
|
26963
26912
|
}
|
|
@@ -27070,8 +27019,7 @@ const B9 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
27070
27019
|
}, B = async (j) => {
|
|
27071
27020
|
if (!await ei.confirm("确定删除文件?", "提示", {
|
|
27072
27021
|
type: "warning"
|
|
27073
|
-
}).catch(() => !1))
|
|
27074
|
-
return;
|
|
27022
|
+
}).catch(() => !1)) return;
|
|
27075
27023
|
const Y = y.value.filter((U) => U.uid !== j.uid || U.url !== j.url).map((U) => qs(U.response || U));
|
|
27076
27024
|
y.value = Y, l("remove", j), l("change", Y), l("update:modelValue", Y), $(j), s.value = Symbol();
|
|
27077
27025
|
}, ie = (j) => {
|