yxuse 3.0.2 → 3.0.4
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/README.md +1 -0
- package/lib/index.cjs2.js +3 -3
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.es2.js +291 -281
- package/lib/index.es2.js.gz +0 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/package.json +151 -150
- package/types/components/YxDialog/index.vue.d.ts +1 -1
- package/types/components/YxDialog/type.d.ts +4 -0
- package/types/components/YxSearchForm/type.d.ts +8 -0
- package/types/components/YxTable/type.d.ts +2 -0
- package/types/theme/index.d.ts +1 -1
package/lib/index.es2.js
CHANGED
|
@@ -46,7 +46,7 @@ var we = (t, e, n) => new Promise((o, r) => {
|
|
|
46
46
|
import { y as rn, u as Fn } from "./index.es3.js";
|
|
47
47
|
import { i as Vn } from "./index.es4.js";
|
|
48
48
|
import { g as $n, a as an, b as Hn } from "./index.es5.js";
|
|
49
|
-
import { defineComponent as Ae, reactive as Xn, resolveComponent as j, openBlock as S, createBlock as X, createSlots as Yn, withCtx as W, renderSlot as sn, createElementVNode as P, createVNode as O, createTextVNode as
|
|
49
|
+
import { defineComponent as Ae, reactive as Xn, resolveComponent as j, openBlock as S, createBlock as X, createSlots as Yn, withCtx as W, renderSlot as sn, createElementVNode as P, createVNode as O, createTextVNode as Q, watch as ln, resolveDynamicComponent as K, mergeProps as De, createElementBlock as N, Fragment as ne, renderList as le, createCommentVNode as te, useSlots as un, useAttrs as Ln, ref as xt, onMounted as jn, nextTick as zn, isVNode as Rn, withModifiers as Un, computed as Wn, unref as st, normalizeStyle as Ye, toDisplayString as re, withKeys as Gn, toHandlers as qn, pushScopeId as Zn, popScopeId as Jn, createStaticVNode as Kn, withDirectives as cn, vShow as dn, Transition as Qn, normalizeClass as lt, useCssVars as eo, version as to, createApp as no } from "vue";
|
|
50
50
|
import "./index.es6.js";
|
|
51
51
|
import { d as oo } from "./index.es7.js";
|
|
52
52
|
const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699612675710_ALIBABAPUHUITI-2-105-HEAVY.TTF') format('woff'), url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699612675710_ALIBABAPUHUITI-2-105-HEAVY.TTF') format('woff2'); font-style: normal;font-display: swap;}", io = "@font-face { font-family: 'YX-SP-TITLE'; font-size: 16px; src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699844184489_bt.ttf') format('woff'),url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699844184489_bt.ttf') format('woff2');font-style: normal; font-display: swap;}", ao = "@font-face {font-family: 'YX-TEXT'; font-size: 16px;src: url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699611032932_ALIBABAPUHUITI-2-65-MEDIUM.TTF') format('woff'),url('https://yx-picture.obs.cn-north-4.myhuaweicloud.com/ttc/bucket/1699611032932_ALIBABAPUHUITI-2-65-MEDIUM.TTF') format('woff2'); font-style: normal; font-display: swap;}", so = ro + io + ao, lo = { class: "dialog-footer flex justify-end" }, uo = /* @__PURE__ */ Ae({
|
|
@@ -62,16 +62,18 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
62
62
|
}), o = () => {
|
|
63
63
|
n.show = !1;
|
|
64
64
|
}, r = {}, i = () => we(this, null, function* () {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
if (!(r.beforeSubmit && !r.beforeSubmit())) {
|
|
66
|
+
n.loading = !0;
|
|
67
|
+
try {
|
|
68
|
+
r.submit && (yield r.submit()), n.loading = !1, n.autoClose && o();
|
|
69
|
+
} catch (s) {
|
|
70
|
+
n.loading = !1;
|
|
71
|
+
}
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
74
|
return e({
|
|
73
|
-
show: ({ width: s, title: l, submit: u, cancel: c, showFooter: d, autoClose:
|
|
74
|
-
s && (n.width = s), l && (n.title = l), d !== void 0 && (n.showFooter = d),
|
|
75
|
+
show: ({ width: s, title: l, submit: u, cancel: c, showFooter: d, autoClose: g, beforeOpen: T, beforeSubmit: w }) => {
|
|
76
|
+
s && (n.width = s), l && (n.title = l), d !== void 0 && (n.showFooter = d), g !== void 0 && (n.autoClose = g), u && (r.submit = u), c && (r.cancel = c), w && (r.beforeSubmit = w), T && T(), n.show = !0;
|
|
75
77
|
},
|
|
76
78
|
close: o
|
|
77
79
|
}), (s, l) => {
|
|
@@ -99,7 +101,7 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
99
101
|
onClick: o
|
|
100
102
|
}, {
|
|
101
103
|
default: W(() => [
|
|
102
|
-
|
|
104
|
+
Q("取消")
|
|
103
105
|
]),
|
|
104
106
|
_: 1
|
|
105
107
|
}),
|
|
@@ -109,7 +111,7 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
109
111
|
onClick: i
|
|
110
112
|
}, {
|
|
111
113
|
default: W(() => [
|
|
112
|
-
|
|
114
|
+
Q("确认")
|
|
113
115
|
]),
|
|
114
116
|
_: 1
|
|
115
117
|
}, 8, ["loading"])
|
|
@@ -149,11 +151,11 @@ const ro = "@font-face {font-family: 'YX-TITLE';font-size: 16px; src: url('https
|
|
|
149
151
|
default: W(() => {
|
|
150
152
|
var u, c, d;
|
|
151
153
|
return [
|
|
152
|
-
r.conf.renderType === "select" ? (S(!0), N(
|
|
153
|
-
key:
|
|
154
|
-
label:
|
|
155
|
-
value:
|
|
156
|
-
}, null, 8, ["label", "value"]))), 128)) :
|
|
154
|
+
r.conf.renderType === "select" ? (S(!0), N(ne, { key: 0 }, le((d = (c = (u = r.conf) == null ? void 0 : u.config) == null ? void 0 : c.options) != null ? d : [], (g) => (S(), X(K("el-option"), {
|
|
155
|
+
key: g.value,
|
|
156
|
+
label: g.label,
|
|
157
|
+
value: g.value
|
|
158
|
+
}, null, 8, ["label", "value"]))), 128)) : te("", !0)
|
|
157
159
|
];
|
|
158
160
|
}),
|
|
159
161
|
_: 1
|
|
@@ -177,7 +179,7 @@ function Rt(t, e) {
|
|
|
177
179
|
}
|
|
178
180
|
return n;
|
|
179
181
|
}
|
|
180
|
-
function
|
|
182
|
+
function ae(t) {
|
|
181
183
|
for (var e = 1; e < arguments.length; e++) {
|
|
182
184
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
183
185
|
e % 2 ? Rt(Object(n), !0).forEach(function(o) {
|
|
@@ -204,15 +206,15 @@ function co(t, e, n) {
|
|
|
204
206
|
writable: !0
|
|
205
207
|
}) : t[e] = n, t;
|
|
206
208
|
}
|
|
207
|
-
function
|
|
208
|
-
return
|
|
209
|
+
function ce() {
|
|
210
|
+
return ce = Object.assign || function(t) {
|
|
209
211
|
for (var e = 1; e < arguments.length; e++) {
|
|
210
212
|
var n = arguments[e];
|
|
211
213
|
for (var o in n)
|
|
212
214
|
Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
213
215
|
}
|
|
214
216
|
return t;
|
|
215
|
-
},
|
|
217
|
+
}, ce.apply(this, arguments);
|
|
216
218
|
}
|
|
217
219
|
function fo(t, e) {
|
|
218
220
|
if (t == null)
|
|
@@ -234,19 +236,19 @@ function ho(t, e) {
|
|
|
234
236
|
return n;
|
|
235
237
|
}
|
|
236
238
|
var po = "1.15.0";
|
|
237
|
-
function
|
|
239
|
+
function ue(t) {
|
|
238
240
|
if (typeof window != "undefined" && window.navigator)
|
|
239
241
|
return !!/* @__PURE__ */ navigator.userAgent.match(t);
|
|
240
242
|
}
|
|
241
|
-
var
|
|
243
|
+
var de = ue(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), We = ue(/Edge/i), Ut = ue(/firefox/i), Le = ue(/safari/i) && !ue(/chrome/i) && !ue(/android/i), hn = ue(/iP(ad|od|hone)/i), pn = ue(/chrome/i) && ue(/android/i), mn = {
|
|
242
244
|
capture: !1,
|
|
243
245
|
passive: !1
|
|
244
246
|
};
|
|
245
|
-
function
|
|
246
|
-
t.addEventListener(e, n, !
|
|
247
|
+
function x(t, e, n) {
|
|
248
|
+
t.addEventListener(e, n, !de && mn);
|
|
247
249
|
}
|
|
248
|
-
function
|
|
249
|
-
t.removeEventListener(e, n, !
|
|
250
|
+
function D(t, e, n) {
|
|
251
|
+
t.removeEventListener(e, n, !de && mn);
|
|
250
252
|
}
|
|
251
253
|
function ut(t, e) {
|
|
252
254
|
if (e) {
|
|
@@ -267,7 +269,7 @@ function ut(t, e) {
|
|
|
267
269
|
function mo(t) {
|
|
268
270
|
return t.host && t !== document && t.host.nodeType ? t.host : t.parentNode;
|
|
269
271
|
}
|
|
270
|
-
function
|
|
272
|
+
function oe(t, e, n, o) {
|
|
271
273
|
if (t) {
|
|
272
274
|
n = n || document;
|
|
273
275
|
do {
|
|
@@ -319,24 +321,24 @@ function gn(t, e, n) {
|
|
|
319
321
|
}
|
|
320
322
|
return [];
|
|
321
323
|
}
|
|
322
|
-
function
|
|
324
|
+
function ie() {
|
|
323
325
|
var t = document.scrollingElement;
|
|
324
326
|
return t || document.documentElement;
|
|
325
327
|
}
|
|
326
328
|
function $(t, e, n, o, r) {
|
|
327
329
|
if (!(!t.getBoundingClientRect && t !== window)) {
|
|
328
330
|
var i, a, s, l, u, c, d;
|
|
329
|
-
if (t !== window && t.parentNode && t !==
|
|
331
|
+
if (t !== window && t.parentNode && t !== ie() ? (i = t.getBoundingClientRect(), a = i.top, s = i.left, l = i.bottom, u = i.right, c = i.height, d = i.width) : (a = 0, s = 0, l = window.innerHeight, u = window.innerWidth, c = window.innerHeight, d = window.innerWidth), (e || n) && t !== window && (r = r || t.parentNode, !de))
|
|
330
332
|
do
|
|
331
333
|
if (r && r.getBoundingClientRect && (v(r, "transform") !== "none" || n && v(r, "position") !== "static")) {
|
|
332
|
-
var
|
|
333
|
-
a -=
|
|
334
|
+
var g = r.getBoundingClientRect();
|
|
335
|
+
a -= g.top + parseInt(v(r, "border-top-width")), s -= g.left + parseInt(v(r, "border-left-width")), l = a + i.height, u = s + i.width;
|
|
334
336
|
break;
|
|
335
337
|
}
|
|
336
338
|
while (r = r.parentNode);
|
|
337
339
|
if (o && t !== window) {
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
+
var T = Pe(r || t), w = T && T.a, y = T && T.d;
|
|
341
|
+
T && (a /= y, s /= w, d /= w, c /= y, l = a + c, u = s + d);
|
|
340
342
|
}
|
|
341
343
|
return {
|
|
342
344
|
top: a,
|
|
@@ -349,19 +351,19 @@ function $(t, e, n, o, r) {
|
|
|
349
351
|
}
|
|
350
352
|
}
|
|
351
353
|
function Gt(t, e, n) {
|
|
352
|
-
for (var o =
|
|
354
|
+
for (var o = ge(t, !0), r = $(t)[e]; o; ) {
|
|
353
355
|
var i = $(o)[n], a = void 0;
|
|
354
356
|
if (n === "top" || n === "left" ? a = r >= i : a = r <= i, !a)
|
|
355
357
|
return o;
|
|
356
|
-
if (o ===
|
|
358
|
+
if (o === ie())
|
|
357
359
|
break;
|
|
358
|
-
o =
|
|
360
|
+
o = ge(o, !1);
|
|
359
361
|
}
|
|
360
362
|
return !1;
|
|
361
363
|
}
|
|
362
364
|
function ke(t, e, n, o) {
|
|
363
365
|
for (var r = 0, i = 0, a = t.children; i < a.length; ) {
|
|
364
|
-
if (a[i].style.display !== "none" && a[i] !== b.ghost && (o || a[i] !== b.dragged) &&
|
|
366
|
+
if (a[i].style.display !== "none" && a[i] !== b.ghost && (o || a[i] !== b.dragged) && oe(a[i], n.draggable, t, !1)) {
|
|
365
367
|
if (r === e)
|
|
366
368
|
return a[i];
|
|
367
369
|
r++;
|
|
@@ -384,7 +386,7 @@ function J(t, e) {
|
|
|
384
386
|
return n;
|
|
385
387
|
}
|
|
386
388
|
function qt(t) {
|
|
387
|
-
var e = 0, n = 0, o =
|
|
389
|
+
var e = 0, n = 0, o = ie();
|
|
388
390
|
if (t)
|
|
389
391
|
do {
|
|
390
392
|
var r = Pe(t), i = r.a, a = r.d;
|
|
@@ -401,23 +403,23 @@ function go(t, e) {
|
|
|
401
403
|
}
|
|
402
404
|
return -1;
|
|
403
405
|
}
|
|
404
|
-
function
|
|
406
|
+
function ge(t, e) {
|
|
405
407
|
if (!t || !t.getBoundingClientRect)
|
|
406
|
-
return
|
|
408
|
+
return ie();
|
|
407
409
|
var n = t, o = !1;
|
|
408
410
|
do
|
|
409
411
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
410
412
|
var r = v(n);
|
|
411
413
|
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
412
414
|
if (!n.getBoundingClientRect || n === document.body)
|
|
413
|
-
return
|
|
415
|
+
return ie();
|
|
414
416
|
if (o || e)
|
|
415
417
|
return n;
|
|
416
418
|
o = !0;
|
|
417
419
|
}
|
|
418
420
|
}
|
|
419
421
|
while (n = n.parentNode);
|
|
420
|
-
return
|
|
422
|
+
return ie();
|
|
421
423
|
}
|
|
422
424
|
function vo(t, e) {
|
|
423
425
|
if (t && e)
|
|
@@ -462,7 +464,7 @@ function wo() {
|
|
|
462
464
|
target: r,
|
|
463
465
|
rect: $(r)
|
|
464
466
|
});
|
|
465
|
-
var i =
|
|
467
|
+
var i = ae({}, t[t.length - 1].rect);
|
|
466
468
|
if (r.thisAnimationDuration) {
|
|
467
469
|
var a = Pe(r, !0);
|
|
468
470
|
a && (i.top -= a.f, i.left -= a.e);
|
|
@@ -488,9 +490,9 @@ function wo() {
|
|
|
488
490
|
}
|
|
489
491
|
var i = !1, a = 0;
|
|
490
492
|
t.forEach(function(s) {
|
|
491
|
-
var l = 0, u = s.target, c = u.fromRect, d = $(u),
|
|
492
|
-
y && (d.top -= y.f, d.left -= y.e), u.toRect = d, u.thisAnimationDuration && vt(
|
|
493
|
-
(
|
|
493
|
+
var l = 0, u = s.target, c = u.fromRect, d = $(u), g = u.prevFromRect, T = u.prevToRect, w = s.rect, y = Pe(u, !0);
|
|
494
|
+
y && (d.top -= y.f, d.left -= y.e), u.toRect = d, u.thisAnimationDuration && vt(g, d) && !vt(c, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
495
|
+
(w.top - d.top) / (w.left - d.left) === (c.top - d.top) / (c.left - d.left) && (l = _o(w, g, T, r.options)), vt(d, c) || (u.prevFromRect = c, u.prevToRect = d, l || (l = r.options.animation), r.animate(u, w, d, l)), l && (i = !0, a = Math.max(a, l), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
494
496
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
495
497
|
}, l), u.thisAnimationDuration = l);
|
|
496
498
|
}), clearTimeout(e), i ? e = setTimeout(function() {
|
|
@@ -532,9 +534,9 @@ var Ee = [], bt = {
|
|
|
532
534
|
};
|
|
533
535
|
var i = e + "Global";
|
|
534
536
|
Ee.forEach(function(a) {
|
|
535
|
-
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](
|
|
537
|
+
n[a.pluginName] && (n[a.pluginName][i] && n[a.pluginName][i](ae({
|
|
536
538
|
sortable: n
|
|
537
|
-
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](
|
|
539
|
+
}, o)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](ae({
|
|
538
540
|
sortable: n
|
|
539
541
|
}, o)));
|
|
540
542
|
});
|
|
@@ -544,7 +546,7 @@ var Ee = [], bt = {
|
|
|
544
546
|
var l = s.pluginName;
|
|
545
547
|
if (!(!e.options[l] && !s.initializeByDefault)) {
|
|
546
548
|
var u = new s(e, n, e.options);
|
|
547
|
-
u.sortable = e, u.options = e.options, e[l] = u,
|
|
549
|
+
u.sortable = e, u.options = e.options, e[l] = u, ce(o, u.defaults);
|
|
548
550
|
}
|
|
549
551
|
});
|
|
550
552
|
for (var i in e.options)
|
|
@@ -556,7 +558,7 @@ var Ee = [], bt = {
|
|
|
556
558
|
getEventProperties: function(e, n) {
|
|
557
559
|
var o = {};
|
|
558
560
|
return Ee.forEach(function(r) {
|
|
559
|
-
typeof r.eventProperties == "function" &&
|
|
561
|
+
typeof r.eventProperties == "function" && ce(o, r.eventProperties.call(n[r.pluginName], e));
|
|
560
562
|
}), o;
|
|
561
563
|
},
|
|
562
564
|
modifyOption: function(e, n, o) {
|
|
@@ -567,22 +569,22 @@ var Ee = [], bt = {
|
|
|
567
569
|
}
|
|
568
570
|
};
|
|
569
571
|
function So(t) {
|
|
570
|
-
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex, c = t.oldDraggableIndex, d = t.newDraggableIndex,
|
|
572
|
+
var e = t.sortable, n = t.rootEl, o = t.name, r = t.targetEl, i = t.cloneEl, a = t.toEl, s = t.fromEl, l = t.oldIndex, u = t.newIndex, c = t.oldDraggableIndex, d = t.newDraggableIndex, g = t.originalEvent, T = t.putSortable, w = t.extraEventProperties;
|
|
571
573
|
if (e = e || n && n[Z], !!e) {
|
|
572
|
-
var y,
|
|
573
|
-
window.CustomEvent && !
|
|
574
|
+
var y, C = e.options, E = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
575
|
+
window.CustomEvent && !de && !We ? y = new CustomEvent(o, {
|
|
574
576
|
bubbles: !0,
|
|
575
577
|
cancelable: !0
|
|
576
|
-
}) : (y = document.createEvent("Event"), y.initEvent(o, !0, !0)), y.to = a || n, y.from = s || n, y.item = r || n, y.clone = i, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex = c, y.newDraggableIndex = d, y.originalEvent =
|
|
577
|
-
var
|
|
578
|
-
for (var H in
|
|
579
|
-
y[H] =
|
|
580
|
-
n && n.dispatchEvent(y),
|
|
578
|
+
}) : (y = document.createEvent("Event"), y.initEvent(o, !0, !0)), y.to = a || n, y.from = s || n, y.item = r || n, y.clone = i, y.oldIndex = l, y.newIndex = u, y.oldDraggableIndex = c, y.newDraggableIndex = d, y.originalEvent = g, y.pullMode = T ? T.lastPutMode : void 0;
|
|
579
|
+
var m = ae(ae({}, w), Ge.getEventProperties(o, e));
|
|
580
|
+
for (var H in m)
|
|
581
|
+
y[H] = m[H];
|
|
582
|
+
n && n.dispatchEvent(y), C[E] && C[E].call(e, y);
|
|
581
583
|
}
|
|
582
584
|
}
|
|
583
585
|
var Eo = ["evt"], U = function(e, n) {
|
|
584
586
|
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, i = ho(o, Eo);
|
|
585
|
-
Ge.pluginEvent.bind(b)(e, n,
|
|
587
|
+
Ge.pluginEvent.bind(b)(e, n, ae({
|
|
586
588
|
dragEl: f,
|
|
587
589
|
parentEl: F,
|
|
588
590
|
ghostEl: _,
|
|
@@ -590,7 +592,7 @@ var Eo = ["evt"], U = function(e, n) {
|
|
|
590
592
|
nextEl: Se,
|
|
591
593
|
lastDownEl: ot,
|
|
592
594
|
cloneEl: B,
|
|
593
|
-
cloneHidden:
|
|
595
|
+
cloneHidden: me,
|
|
594
596
|
dragStarted: $e,
|
|
595
597
|
putSortable: Y,
|
|
596
598
|
activeSortable: b.active,
|
|
@@ -598,14 +600,14 @@ var Eo = ["evt"], U = function(e, n) {
|
|
|
598
600
|
oldIndex: xe,
|
|
599
601
|
oldDraggableIndex: ze,
|
|
600
602
|
newIndex: q,
|
|
601
|
-
newDraggableIndex:
|
|
603
|
+
newDraggableIndex: pe,
|
|
602
604
|
hideGhostForTarget: En,
|
|
603
605
|
unhideGhostForTarget: Tn,
|
|
604
606
|
cloneNowHidden: function() {
|
|
605
|
-
|
|
607
|
+
me = !0;
|
|
606
608
|
},
|
|
607
609
|
cloneNowShown: function() {
|
|
608
|
-
|
|
610
|
+
me = !1;
|
|
609
611
|
},
|
|
610
612
|
dispatchSortableEvent: function(s) {
|
|
611
613
|
z({
|
|
@@ -617,7 +619,7 @@ var Eo = ["evt"], U = function(e, n) {
|
|
|
617
619
|
}, i));
|
|
618
620
|
};
|
|
619
621
|
function z(t) {
|
|
620
|
-
So(
|
|
622
|
+
So(ae({
|
|
621
623
|
putSortable: Y,
|
|
622
624
|
cloneEl: B,
|
|
623
625
|
targetEl: f,
|
|
@@ -625,12 +627,12 @@ function z(t) {
|
|
|
625
627
|
oldIndex: xe,
|
|
626
628
|
oldDraggableIndex: ze,
|
|
627
629
|
newIndex: q,
|
|
628
|
-
newDraggableIndex:
|
|
630
|
+
newDraggableIndex: pe
|
|
629
631
|
}, t));
|
|
630
632
|
}
|
|
631
|
-
var f, F, _, A, Se, ot, B,
|
|
633
|
+
var f, F, _, A, Se, ot, B, me, xe, q, ze, pe, Ke, Y, Ce = !1, ct = !1, dt = [], ye, ee, wt, yt, Zt, Jt, $e, Te, Re, Ue = !1, Qe = !1, rt, L, _t = [], It = !1, ft = [], gt = typeof document != "undefined", et = hn, Kt = We || de ? "cssFloat" : "float", To = gt && !pn && !hn && "draggable" in document.createElement("div"), yn = function() {
|
|
632
634
|
if (gt) {
|
|
633
|
-
if (
|
|
635
|
+
if (de)
|
|
634
636
|
return !1;
|
|
635
637
|
var t = document.createElement("x");
|
|
636
638
|
return t.style.cssText = "pointer-events:auto", t.style.pointerEvents === "auto";
|
|
@@ -671,8 +673,8 @@ var f, F, _, A, Se, ot, B, pe, xe, q, ze, he, Ke, Y, Ce = !1, ct = !1, dt = [],
|
|
|
671
673
|
return i;
|
|
672
674
|
if (typeof i == "function")
|
|
673
675
|
return n(i(s, l, u, c), a)(s, l, u, c);
|
|
674
|
-
var
|
|
675
|
-
return i === !0 || typeof i == "string" && i ===
|
|
676
|
+
var g = (a ? s : l).options.group.name;
|
|
677
|
+
return i === !0 || typeof i == "string" && i === g || i.join && i.indexOf(g) > -1;
|
|
676
678
|
};
|
|
677
679
|
}
|
|
678
680
|
var o = {}, r = e.group;
|
|
@@ -705,7 +707,7 @@ var _e = function(e) {
|
|
|
705
707
|
function b(t, e) {
|
|
706
708
|
if (!(t && t.nodeType && t.nodeType === 1))
|
|
707
709
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));
|
|
708
|
-
this.el = t, this.options = e =
|
|
710
|
+
this.el = t, this.options = e = ce({}, e), t[Z] = this;
|
|
709
711
|
var n = {
|
|
710
712
|
group: null,
|
|
711
713
|
sort: !0,
|
|
@@ -757,7 +759,7 @@ function b(t, e) {
|
|
|
757
759
|
Sn(e);
|
|
758
760
|
for (var r in this)
|
|
759
761
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
760
|
-
this.nativeDraggable = e.forceFallback ? !1 : To, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ?
|
|
762
|
+
this.nativeDraggable = e.forceFallback ? !1 : To, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? x(t, "pointerdown", this._onTapStart) : (x(t, "mousedown", this._onTapStart), x(t, "touchstart", this._onTapStart)), this.nativeDraggable && (x(t, "dragover", this), x(t, "dragenter", this)), dt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), ce(this, wo());
|
|
761
763
|
}
|
|
762
764
|
b.prototype = /** @lends Sortable.prototype */
|
|
763
765
|
{
|
|
@@ -771,7 +773,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
771
773
|
_onTapStart: function(e) {
|
|
772
774
|
if (e.cancelable) {
|
|
773
775
|
var n = this, o = this.el, r = this.options, i = r.preventOnFilter, a = e.type, s = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (s || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l, c = r.filter;
|
|
774
|
-
if (Bo(o), !f && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Le && l && l.tagName.toUpperCase() === "SELECT") && (l =
|
|
776
|
+
if (Bo(o), !f && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Le && l && l.tagName.toUpperCase() === "SELECT") && (l = oe(l, r.draggable, o, !1), !(l && l.animated) && ot !== l)) {
|
|
775
777
|
if (xe = J(l), ze = J(l, r.draggable), typeof c == "function") {
|
|
776
778
|
if (c.call(this, e, l, this)) {
|
|
777
779
|
z({
|
|
@@ -787,7 +789,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
787
789
|
return;
|
|
788
790
|
}
|
|
789
791
|
} else if (c && (c = c.split(",").some(function(d) {
|
|
790
|
-
if (d =
|
|
792
|
+
if (d = oe(u, d.trim(), o, !1), d)
|
|
791
793
|
return z({
|
|
792
794
|
sortable: n,
|
|
793
795
|
rootEl: d,
|
|
@@ -802,7 +804,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
802
804
|
i && e.cancelable && e.preventDefault();
|
|
803
805
|
return;
|
|
804
806
|
}
|
|
805
|
-
r.handle && !
|
|
807
|
+
r.handle && !oe(u, r.handle, o, !1) || this._prepareDragStart(e, s, l);
|
|
806
808
|
}
|
|
807
809
|
}
|
|
808
810
|
},
|
|
@@ -828,14 +830,14 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
828
830
|
}), G(f, a.chosenClass, !0);
|
|
829
831
|
}, a.ignore.split(",").forEach(function(c) {
|
|
830
832
|
gn(f, c.trim(), St);
|
|
831
|
-
}),
|
|
833
|
+
}), x(s, "dragover", _e), x(s, "mousemove", _e), x(s, "touchmove", _e), x(s, "mouseup", r._onDrop), x(s, "touchend", r._onDrop), x(s, "touchcancel", r._onDrop), Ut && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), U("delayStart", this, {
|
|
832
834
|
evt: e
|
|
833
|
-
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(We ||
|
|
835
|
+
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(We || de))) {
|
|
834
836
|
if (b.eventCanceled) {
|
|
835
837
|
this._onDrop();
|
|
836
838
|
return;
|
|
837
839
|
}
|
|
838
|
-
|
|
840
|
+
x(s, "mouseup", r._disableDelayedDrag), x(s, "touchend", r._disableDelayedDrag), x(s, "touchcancel", r._disableDelayedDrag), x(s, "mousemove", r._delayedDragTouchMoveHandler), x(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && x(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
|
|
839
841
|
} else
|
|
840
842
|
l();
|
|
841
843
|
}
|
|
@@ -849,10 +851,10 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
849
851
|
},
|
|
850
852
|
_disableDelayedDragEvents: function() {
|
|
851
853
|
var e = this.el.ownerDocument;
|
|
852
|
-
|
|
854
|
+
D(e, "mouseup", this._disableDelayedDrag), D(e, "touchend", this._disableDelayedDrag), D(e, "touchcancel", this._disableDelayedDrag), D(e, "mousemove", this._delayedDragTouchMoveHandler), D(e, "touchmove", this._delayedDragTouchMoveHandler), D(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
853
855
|
},
|
|
854
856
|
_triggerDragStart: function(e, n) {
|
|
855
|
-
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ?
|
|
857
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : n ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(f, "dragend", this), x(A, "dragstart", this._onDragStart));
|
|
856
858
|
try {
|
|
857
859
|
document.selection ? it(function() {
|
|
858
860
|
document.selection.empty();
|
|
@@ -864,7 +866,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
864
866
|
if (Ce = !1, A && f) {
|
|
865
867
|
U("dragStarted", this, {
|
|
866
868
|
evt: n
|
|
867
|
-
}), this.nativeDraggable &&
|
|
869
|
+
}), this.nativeDraggable && x(document, "dragover", xo);
|
|
868
870
|
var o = this.options;
|
|
869
871
|
!e && G(f, o.dragClass, !1), G(f, o.ghostClass, !0), b.active = this, e && this._appendGhost(), z({
|
|
870
872
|
sortable: this,
|
|
@@ -875,17 +877,17 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
875
877
|
this._nulling();
|
|
876
878
|
},
|
|
877
879
|
_emulateDragOver: function() {
|
|
878
|
-
if (
|
|
879
|
-
this._lastX =
|
|
880
|
-
for (var e = document.elementFromPoint(
|
|
880
|
+
if (ee) {
|
|
881
|
+
this._lastX = ee.clientX, this._lastY = ee.clientY, En();
|
|
882
|
+
for (var e = document.elementFromPoint(ee.clientX, ee.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ee.clientX, ee.clientY), e !== n); )
|
|
881
883
|
n = e;
|
|
882
884
|
if (f.parentNode[Z]._isOutsideThisEl(e), n)
|
|
883
885
|
do {
|
|
884
886
|
if (n[Z]) {
|
|
885
887
|
var o = void 0;
|
|
886
888
|
if (o = n[Z]._onDragOver({
|
|
887
|
-
clientX:
|
|
888
|
-
clientY:
|
|
889
|
+
clientX: ee.clientX,
|
|
890
|
+
clientY: ee.clientY,
|
|
889
891
|
target: e,
|
|
890
892
|
rootEl: n
|
|
891
893
|
}), o && !this.options.dragoverBubble)
|
|
@@ -913,8 +915,8 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
913
915
|
e: c,
|
|
914
916
|
f: d
|
|
915
917
|
};
|
|
916
|
-
var
|
|
917
|
-
v(_, "webkitTransform",
|
|
918
|
+
var g = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
919
|
+
v(_, "webkitTransform", g), v(_, "mozTransform", g), v(_, "msTransform", g), v(_, "transform", g), wt = c, yt = d, ee = i;
|
|
918
920
|
}
|
|
919
921
|
e.cancelable && e.preventDefault();
|
|
920
922
|
}
|
|
@@ -925,7 +927,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
925
927
|
if (et) {
|
|
926
928
|
for (L = e; v(L, "position") === "static" && v(L, "transform") === "none" && L !== document; )
|
|
927
929
|
L = L.parentNode;
|
|
928
|
-
L !== document.body && L !== document.documentElement ? (L === document && (L =
|
|
930
|
+
L !== document.body && L !== document.documentElement ? (L === document && (L = ie()), n.top += L.scrollTop, n.left += L.scrollLeft) : L = ie(), _t = qt(L);
|
|
929
931
|
}
|
|
930
932
|
_ = f.cloneNode(!0), G(_, o.ghostClass, !1), G(_, o.fallbackClass, !0), G(_, o.dragClass, !0), v(_, "transition", ""), v(_, "transform", ""), v(_, "box-sizing", "border-box"), v(_, "margin", 0), v(_, "top", n.top), v(_, "left", n.left), v(_, "width", n.width), v(_, "height", n.height), v(_, "opacity", "0.8"), v(_, "position", et ? "absolute" : "fixed"), v(_, "zIndex", "100000"), v(_, "pointerEvents", "none"), b.ghost = _, e.appendChild(_), v(_, "transform-origin", Zt / parseInt(_.style.width) * 100 + "% " + Jt / parseInt(_.style.height) * 100 + "%");
|
|
931
933
|
}
|
|
@@ -943,114 +945,114 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
943
945
|
sortable: o,
|
|
944
946
|
name: "clone"
|
|
945
947
|
}));
|
|
946
|
-
}), !n && G(f, i.dragClass, !0), n ? (ct = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (
|
|
948
|
+
}), !n && G(f, i.dragClass, !0), n ? (ct = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (D(document, "mouseup", o._onDrop), D(document, "touchend", o._onDrop), D(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(o, r, f)), x(document, "drop", o), v(f, "transform", "translateZ(0)")), Ce = !0, o._dragStartId = it(o._dragStarted.bind(o, n, e)), x(document, "selectstart", o), $e = !0, Le && v(document.body, "user-select", "none");
|
|
947
949
|
},
|
|
948
950
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
949
951
|
_onDragOver: function(e) {
|
|
950
|
-
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u = b.active, c = Ke === l, d = s.sort,
|
|
952
|
+
var n = this.el, o = e.target, r, i, a, s = this.options, l = s.group, u = b.active, c = Ke === l, d = s.sort, g = Y || u, T, w = this, y = !1;
|
|
951
953
|
if (It)
|
|
952
954
|
return;
|
|
953
|
-
function
|
|
954
|
-
U(Fe,
|
|
955
|
+
function C(Fe, An) {
|
|
956
|
+
U(Fe, w, ae({
|
|
955
957
|
evt: e,
|
|
956
958
|
isOwner: c,
|
|
957
|
-
axis:
|
|
959
|
+
axis: T ? "vertical" : "horizontal",
|
|
958
960
|
revert: a,
|
|
959
961
|
dragRect: r,
|
|
960
962
|
targetRect: i,
|
|
961
963
|
canSort: d,
|
|
962
|
-
fromSortable:
|
|
964
|
+
fromSortable: g,
|
|
963
965
|
target: o,
|
|
964
|
-
completed:
|
|
966
|
+
completed: m,
|
|
965
967
|
onMove: function(Ht, Nn) {
|
|
966
968
|
return tt(A, n, f, r, Ht, $(Ht), e, Nn);
|
|
967
969
|
},
|
|
968
970
|
changed: H
|
|
969
971
|
}, An));
|
|
970
972
|
}
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
+
function E() {
|
|
974
|
+
C("dragOverAnimationCapture"), w.captureAnimationState(), w !== g && g.captureAnimationState();
|
|
973
975
|
}
|
|
974
|
-
function
|
|
975
|
-
return
|
|
976
|
+
function m(Fe) {
|
|
977
|
+
return C("dragOverCompleted", {
|
|
976
978
|
insertion: Fe
|
|
977
|
-
}), Fe && (c ? u._hideClone() : u._showClone(
|
|
978
|
-
|
|
979
|
-
}),
|
|
979
|
+
}), Fe && (c ? u._hideClone() : u._showClone(w), w !== g && (G(f, Y ? Y.options.ghostClass : u.options.ghostClass, !1), G(f, s.ghostClass, !0)), Y !== w && w !== b.active ? Y = w : w === b.active && Y && (Y = null), g === w && (w._ignoreWhileAnimating = o), w.animateAll(function() {
|
|
980
|
+
C("dragOverAnimationComplete"), w._ignoreWhileAnimating = null;
|
|
981
|
+
}), w !== g && (g.animateAll(), g._ignoreWhileAnimating = null)), (o === f && !f.animated || o === n && !o.animated) && (Te = null), !s.dragoverBubble && !e.rootEl && o !== document && (f.parentNode[Z]._isOutsideThisEl(e.target), !Fe && _e(e)), !s.dragoverBubble && e.stopPropagation && e.stopPropagation(), y = !0;
|
|
980
982
|
}
|
|
981
983
|
function H() {
|
|
982
|
-
q = J(f),
|
|
983
|
-
sortable:
|
|
984
|
+
q = J(f), pe = J(f, s.draggable), z({
|
|
985
|
+
sortable: w,
|
|
984
986
|
name: "change",
|
|
985
987
|
toEl: n,
|
|
986
988
|
newIndex: q,
|
|
987
|
-
newDraggableIndex:
|
|
989
|
+
newDraggableIndex: pe,
|
|
988
990
|
originalEvent: e
|
|
989
991
|
});
|
|
990
992
|
}
|
|
991
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o =
|
|
993
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), o = oe(o, s.draggable, n, !0), C("dragOver"), b.eventCanceled)
|
|
992
994
|
return y;
|
|
993
|
-
if (f.contains(e.target) || o.animated && o.animatingX && o.animatingY ||
|
|
994
|
-
return
|
|
995
|
+
if (f.contains(e.target) || o.animated && o.animatingX && o.animatingY || w._ignoreWhileAnimating === o)
|
|
996
|
+
return m(!1);
|
|
995
997
|
if (ct = !1, u && !s.disabled && (c ? d || (a = F !== A) : Y === this || (this.lastPutMode = Ke.checkPull(this, u, f, e)) && l.checkPut(this, u, f, e))) {
|
|
996
|
-
if (
|
|
998
|
+
if (T = this._getDirection(e, o) === "vertical", r = $(f), C("dragOverValid"), b.eventCanceled)
|
|
997
999
|
return y;
|
|
998
1000
|
if (a)
|
|
999
|
-
return F = A,
|
|
1001
|
+
return F = A, E(), this._hideClone(), C("revert"), b.eventCanceled || (Se ? A.insertBefore(f, Se) : A.appendChild(f)), m(!0);
|
|
1000
1002
|
var k = Nt(n, s.draggable);
|
|
1001
|
-
if (!k || ko(e,
|
|
1003
|
+
if (!k || ko(e, T, this) && !k.animated) {
|
|
1002
1004
|
if (k === f)
|
|
1003
|
-
return
|
|
1005
|
+
return m(!1);
|
|
1004
1006
|
if (k && n === e.target && (o = k), o && (i = $(o)), tt(A, n, f, r, o, i, e, !!o) !== !1)
|
|
1005
|
-
return
|
|
1006
|
-
} else if (k && Oo(e,
|
|
1007
|
+
return E(), k && k.nextSibling ? n.insertBefore(f, k.nextSibling) : n.appendChild(f), F = n, H(), m(!0);
|
|
1008
|
+
} else if (k && Oo(e, T, this)) {
|
|
1007
1009
|
var h = ke(n, 0, s, !0);
|
|
1008
1010
|
if (h === f)
|
|
1009
|
-
return
|
|
1011
|
+
return m(!1);
|
|
1010
1012
|
if (o = h, i = $(o), tt(A, n, f, r, o, i, e, !1) !== !1)
|
|
1011
|
-
return
|
|
1013
|
+
return E(), n.insertBefore(f, h), F = n, H(), m(!0);
|
|
1012
1014
|
} else if (o.parentNode === n) {
|
|
1013
1015
|
i = $(o);
|
|
1014
|
-
var p = 0, I, R = f.parentNode !== n, M = !Co(f.animated && f.toRect || r, o.animated && o.toRect || i,
|
|
1015
|
-
Te !== o && (I = i[ve], Ue = !1, Qe = !M && s.invertSwap || R), p = Ao(e, o, i,
|
|
1016
|
-
var
|
|
1016
|
+
var p = 0, I, R = f.parentNode !== n, M = !Co(f.animated && f.toRect || r, o.animated && o.toRect || i, T), ve = T ? "top" : "left", fe = Gt(o, "top", "top") || Gt(f, "top", "top"), Me = fe ? fe.scrollTop : void 0;
|
|
1017
|
+
Te !== o && (I = i[ve], Ue = !1, Qe = !M && s.invertSwap || R), p = Ao(e, o, i, T, M ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Qe, Te === o);
|
|
1018
|
+
var se;
|
|
1017
1019
|
if (p !== 0) {
|
|
1018
1020
|
var be = J(f);
|
|
1019
1021
|
do
|
|
1020
|
-
be -= p,
|
|
1021
|
-
while (
|
|
1022
|
+
be -= p, se = F.children[be];
|
|
1023
|
+
while (se && (v(se, "display") === "none" || se === _));
|
|
1022
1024
|
}
|
|
1023
|
-
if (p === 0 ||
|
|
1024
|
-
return
|
|
1025
|
+
if (p === 0 || se === o)
|
|
1026
|
+
return m(!1);
|
|
1025
1027
|
Te = o, Re = p;
|
|
1026
|
-
var Be = o.nextElementSibling,
|
|
1027
|
-
|
|
1028
|
-
var qe = tt(A, n, f, r, o, i, e,
|
|
1028
|
+
var Be = o.nextElementSibling, he = !1;
|
|
1029
|
+
he = p === 1;
|
|
1030
|
+
var qe = tt(A, n, f, r, o, i, e, he);
|
|
1029
1031
|
if (qe !== !1)
|
|
1030
|
-
return (qe === 1 || qe === -1) && (
|
|
1032
|
+
return (qe === 1 || qe === -1) && (he = qe === 1), It = !0, setTimeout(Po, 30), E(), he && !Be ? n.appendChild(f) : o.parentNode.insertBefore(f, he ? Be : o), fe && bn(fe, 0, Me - fe.scrollTop), F = f.parentNode, I !== void 0 && !Qe && (rt = Math.abs(I - $(o)[ve])), H(), m(!0);
|
|
1031
1033
|
}
|
|
1032
1034
|
if (n.contains(f))
|
|
1033
|
-
return
|
|
1035
|
+
return m(!1);
|
|
1034
1036
|
}
|
|
1035
1037
|
return !1;
|
|
1036
1038
|
},
|
|
1037
1039
|
_ignoreWhileAnimating: null,
|
|
1038
1040
|
_offMoveEvents: function() {
|
|
1039
|
-
|
|
1041
|
+
D(document, "mousemove", this._onTouchMove), D(document, "touchmove", this._onTouchMove), D(document, "pointermove", this._onTouchMove), D(document, "dragover", _e), D(document, "mousemove", _e), D(document, "touchmove", _e);
|
|
1040
1042
|
},
|
|
1041
1043
|
_offUpEvents: function() {
|
|
1042
1044
|
var e = this.el.ownerDocument;
|
|
1043
|
-
|
|
1045
|
+
D(e, "mouseup", this._onDrop), D(e, "touchend", this._onDrop), D(e, "pointerup", this._onDrop), D(e, "touchcancel", this._onDrop), D(document, "selectstart", this);
|
|
1044
1046
|
},
|
|
1045
1047
|
_onDrop: function(e) {
|
|
1046
1048
|
var n = this.el, o = this.options;
|
|
1047
|
-
if (q = J(f),
|
|
1049
|
+
if (q = J(f), pe = J(f, o.draggable), U("drop", this, {
|
|
1048
1050
|
evt: e
|
|
1049
|
-
}), F = f && f.parentNode, q = J(f),
|
|
1051
|
+
}), F = f && f.parentNode, q = J(f), pe = J(f, o.draggable), b.eventCanceled) {
|
|
1050
1052
|
this._nulling();
|
|
1051
1053
|
return;
|
|
1052
1054
|
}
|
|
1053
|
-
Ce = !1, Qe = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (
|
|
1055
|
+
Ce = !1, Qe = !1, Ue = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Pt(this.cloneId), Pt(this._dragStartId), this.nativeDraggable && (D(document, "drop", this), D(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Le && v(document.body, "user-select", ""), v(f, "transform", ""), e && ($e && (e.cancelable && e.preventDefault(), !o.dropBubble && e.stopPropagation()), _ && _.parentNode && _.parentNode.removeChild(_), (A === F || Y && Y.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), f && (this.nativeDraggable && D(f, "dragend", this), St(f), f.style["will-change"] = "", $e && !Ce && G(f, Y ? Y.options.ghostClass : this.options.ghostClass, !1), G(f, this.options.chosenClass, !1), z({
|
|
1054
1056
|
sortable: this,
|
|
1055
1057
|
name: "unchoose",
|
|
1056
1058
|
toEl: F,
|
|
@@ -1089,7 +1091,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1089
1091
|
name: "sort",
|
|
1090
1092
|
toEl: F,
|
|
1091
1093
|
originalEvent: e
|
|
1092
|
-
})), b.active && ((q == null || q === -1) && (q = xe,
|
|
1094
|
+
})), b.active && ((q == null || q === -1) && (q = xe, pe = ze), z({
|
|
1093
1095
|
sortable: this,
|
|
1094
1096
|
name: "end",
|
|
1095
1097
|
toEl: F,
|
|
@@ -1097,7 +1099,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1097
1099
|
}), this.save()))), this._nulling();
|
|
1098
1100
|
},
|
|
1099
1101
|
_nulling: function() {
|
|
1100
|
-
U("nulling", this), A = f = F = _ = Se = B = ot =
|
|
1102
|
+
U("nulling", this), A = f = F = _ = Se = B = ot = me = ye = ee = $e = q = pe = xe = ze = Te = Re = Y = Ke = b.dragged = b.ghost = b.clone = b.active = null, ft.forEach(function(e) {
|
|
1101
1103
|
e.checked = !0;
|
|
1102
1104
|
}), ft.length = wt = yt = 0;
|
|
1103
1105
|
},
|
|
@@ -1122,7 +1124,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1122
1124
|
*/
|
|
1123
1125
|
toArray: function() {
|
|
1124
1126
|
for (var e = [], n, o = this.el.children, r = 0, i = o.length, a = this.options; r < i; r++)
|
|
1125
|
-
n = o[r],
|
|
1127
|
+
n = o[r], oe(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || Mo(n));
|
|
1126
1128
|
return e;
|
|
1127
1129
|
},
|
|
1128
1130
|
/**
|
|
@@ -1133,7 +1135,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1133
1135
|
var o = {}, r = this.el;
|
|
1134
1136
|
this.toArray().forEach(function(i, a) {
|
|
1135
1137
|
var s = r.children[a];
|
|
1136
|
-
|
|
1138
|
+
oe(s, this.options.draggable, r, !1) && (o[i] = s);
|
|
1137
1139
|
}, this), n && this.captureAnimationState(), e.forEach(function(i) {
|
|
1138
1140
|
o[i] && (r.removeChild(o[i]), r.appendChild(o[i]));
|
|
1139
1141
|
}), n && this.animateAll();
|
|
@@ -1152,7 +1154,7 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1152
1154
|
* @returns {HTMLElement|null}
|
|
1153
1155
|
*/
|
|
1154
1156
|
closest: function(e, n) {
|
|
1155
|
-
return
|
|
1157
|
+
return oe(e, n || this.options.draggable, this.el, !1);
|
|
1156
1158
|
},
|
|
1157
1159
|
/**
|
|
1158
1160
|
* Set/get option
|
|
@@ -1173,15 +1175,15 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1173
1175
|
destroy: function() {
|
|
1174
1176
|
U("destroy", this);
|
|
1175
1177
|
var e = this.el;
|
|
1176
|
-
e[Z] = null,
|
|
1178
|
+
e[Z] = null, D(e, "mousedown", this._onTapStart), D(e, "touchstart", this._onTapStart), D(e, "pointerdown", this._onTapStart), this.nativeDraggable && (D(e, "dragover", this), D(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1177
1179
|
n.removeAttribute("draggable");
|
|
1178
1180
|
}), this._onDrop(), this._disableDelayedDragEvents(), dt.splice(dt.indexOf(this.el), 1), this.el = e = null;
|
|
1179
1181
|
},
|
|
1180
1182
|
_hideClone: function() {
|
|
1181
|
-
if (!
|
|
1183
|
+
if (!me) {
|
|
1182
1184
|
if (U("hideClone", this), b.eventCanceled)
|
|
1183
1185
|
return;
|
|
1184
|
-
v(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B),
|
|
1186
|
+
v(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B), me = !0;
|
|
1185
1187
|
}
|
|
1186
1188
|
},
|
|
1187
1189
|
_showClone: function(e) {
|
|
@@ -1189,10 +1191,10 @@ b.prototype = /** @lends Sortable.prototype */
|
|
|
1189
1191
|
this._hideClone();
|
|
1190
1192
|
return;
|
|
1191
1193
|
}
|
|
1192
|
-
if (
|
|
1194
|
+
if (me) {
|
|
1193
1195
|
if (U("showClone", this), b.eventCanceled)
|
|
1194
1196
|
return;
|
|
1195
|
-
f.parentNode == A && !this.options.group.revertClone ? A.insertBefore(B, f) : Se ? A.insertBefore(B, Se) : A.appendChild(B), this.options.group.revertClone && this.animate(f, B), v(B, "display", ""),
|
|
1197
|
+
f.parentNode == A && !this.options.group.revertClone ? A.insertBefore(B, f) : Se ? A.insertBefore(B, Se) : A.appendChild(B), this.options.group.revertClone && this.animate(f, B), v(B, "display", ""), me = !1;
|
|
1196
1198
|
}
|
|
1197
1199
|
}
|
|
1198
1200
|
};
|
|
@@ -1201,7 +1203,7 @@ function Io(t) {
|
|
|
1201
1203
|
}
|
|
1202
1204
|
function tt(t, e, n, o, r, i, a, s) {
|
|
1203
1205
|
var l, u = t[Z], c = u.options.onMove, d;
|
|
1204
|
-
return window.CustomEvent && !
|
|
1206
|
+
return window.CustomEvent && !de && !We ? l = new CustomEvent("move", {
|
|
1205
1207
|
bubbles: !0,
|
|
1206
1208
|
cancelable: !0
|
|
1207
1209
|
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = e, l.from = t, l.dragged = n, l.draggedRect = o, l.related = r || e, l.relatedRect = i || $(e), l.willInsertAfter = s, l.originalEvent = a, t.dispatchEvent(l), c && (d = c.call(u, l, a)), d;
|
|
@@ -1221,17 +1223,17 @@ function ko(t, e, n) {
|
|
|
1221
1223
|
return e ? t.clientX > o.right + r || t.clientX <= o.right && t.clientY > o.bottom && t.clientX >= o.left : t.clientX > o.right && t.clientY > o.top || t.clientX <= o.right && t.clientY > o.bottom + r;
|
|
1222
1224
|
}
|
|
1223
1225
|
function Ao(t, e, n, o, r, i, a, s) {
|
|
1224
|
-
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width, c = o ? n.top : n.left, d = o ? n.bottom : n.right,
|
|
1226
|
+
var l = o ? t.clientY : t.clientX, u = o ? n.height : n.width, c = o ? n.top : n.left, d = o ? n.bottom : n.right, g = !1;
|
|
1225
1227
|
if (!a) {
|
|
1226
1228
|
if (s && rt < u * r) {
|
|
1227
1229
|
if (!Ue && (Re === 1 ? l > c + u * i / 2 : l < d - u * i / 2) && (Ue = !0), Ue)
|
|
1228
|
-
|
|
1230
|
+
g = !0;
|
|
1229
1231
|
else if (Re === 1 ? l < c + rt : l > d - rt)
|
|
1230
1232
|
return -Re;
|
|
1231
1233
|
} else if (l > c + u * (1 - r) / 2 && l < d - u * (1 - r) / 2)
|
|
1232
1234
|
return No(e);
|
|
1233
1235
|
}
|
|
1234
|
-
return
|
|
1236
|
+
return g = g || a, g && (l < c + u * i / 2 || l > d - u * i / 2) ? l > c + u / 2 ? 1 : -1 : 0;
|
|
1235
1237
|
}
|
|
1236
1238
|
function No(t) {
|
|
1237
1239
|
return J(f) < J(t) ? 1 : -1;
|
|
@@ -1254,20 +1256,20 @@ function it(t) {
|
|
|
1254
1256
|
function Pt(t) {
|
|
1255
1257
|
return clearTimeout(t);
|
|
1256
1258
|
}
|
|
1257
|
-
gt &&
|
|
1259
|
+
gt && x(document, "touchmove", function(t) {
|
|
1258
1260
|
(b.active || Ce) && t.cancelable && t.preventDefault();
|
|
1259
1261
|
});
|
|
1260
1262
|
b.utils = {
|
|
1261
|
-
on:
|
|
1262
|
-
off:
|
|
1263
|
+
on: x,
|
|
1264
|
+
off: D,
|
|
1263
1265
|
css: v,
|
|
1264
1266
|
find: gn,
|
|
1265
1267
|
is: function(e, n) {
|
|
1266
|
-
return !!
|
|
1268
|
+
return !!oe(e, n, e, !1);
|
|
1267
1269
|
},
|
|
1268
1270
|
extend: vo,
|
|
1269
1271
|
throttle: vn,
|
|
1270
|
-
closest:
|
|
1272
|
+
closest: oe,
|
|
1271
1273
|
toggleClass: G,
|
|
1272
1274
|
clone: wn,
|
|
1273
1275
|
index: J,
|
|
@@ -1285,7 +1287,7 @@ b.mount = function() {
|
|
|
1285
1287
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(o) {
|
|
1286
1288
|
if (!o.prototype || !o.prototype.constructor)
|
|
1287
1289
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
1288
|
-
o.utils && (b.utils =
|
|
1290
|
+
o.utils && (b.utils = ae(ae({}, b.utils), o.utils)), Ge.mount(o);
|
|
1289
1291
|
});
|
|
1290
1292
|
};
|
|
1291
1293
|
b.create = function(t, e) {
|
|
@@ -1308,14 +1310,14 @@ function Fo() {
|
|
|
1308
1310
|
return t.prototype = {
|
|
1309
1311
|
dragStarted: function(n) {
|
|
1310
1312
|
var o = n.originalEvent;
|
|
1311
|
-
this.sortable.nativeDraggable ?
|
|
1313
|
+
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? x(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? x(document, "touchmove", this._handleFallbackAutoScroll) : x(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1312
1314
|
},
|
|
1313
1315
|
dragOverCompleted: function(n) {
|
|
1314
1316
|
var o = n.originalEvent;
|
|
1315
1317
|
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
1316
1318
|
},
|
|
1317
1319
|
drop: function() {
|
|
1318
|
-
this.sortable.nativeDraggable ?
|
|
1320
|
+
this.sortable.nativeDraggable ? D(document, "dragover", this._handleAutoScroll) : (D(document, "pointermove", this._handleFallbackAutoScroll), D(document, "touchmove", this._handleFallbackAutoScroll), D(document, "mousemove", this._handleFallbackAutoScroll)), Qt(), at(), bo();
|
|
1319
1321
|
},
|
|
1320
1322
|
nulling: function() {
|
|
1321
1323
|
ht = Ot = He = kt = Xe = Et = Tt = null, V.length = 0;
|
|
@@ -1325,22 +1327,22 @@ function Fo() {
|
|
|
1325
1327
|
},
|
|
1326
1328
|
_handleAutoScroll: function(n, o) {
|
|
1327
1329
|
var r = this, i = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, s = document.elementFromPoint(i, a);
|
|
1328
|
-
if (ht = n, o || this.options.forceAutoScrollFallback || We ||
|
|
1330
|
+
if (ht = n, o || this.options.forceAutoScrollFallback || We || de || Le) {
|
|
1329
1331
|
Ct(n, this.options, s, o);
|
|
1330
|
-
var l =
|
|
1332
|
+
var l = ge(s, !0);
|
|
1331
1333
|
kt && (!Xe || i !== Et || a !== Tt) && (Xe && Qt(), Xe = setInterval(function() {
|
|
1332
|
-
var u =
|
|
1334
|
+
var u = ge(document.elementFromPoint(i, a), !0);
|
|
1333
1335
|
u !== l && (l = u, at()), Ct(n, r.options, u, o);
|
|
1334
1336
|
}, 10), Et = i, Tt = a);
|
|
1335
1337
|
} else {
|
|
1336
|
-
if (!this.options.bubbleScroll ||
|
|
1338
|
+
if (!this.options.bubbleScroll || ge(s, !0) === ie()) {
|
|
1337
1339
|
at();
|
|
1338
1340
|
return;
|
|
1339
1341
|
}
|
|
1340
|
-
Ct(n, this.options,
|
|
1342
|
+
Ct(n, this.options, ge(s, !1), !1);
|
|
1341
1343
|
}
|
|
1342
1344
|
}
|
|
1343
|
-
},
|
|
1345
|
+
}, ce(t, {
|
|
1344
1346
|
pluginName: "scroll",
|
|
1345
1347
|
initializeByDefault: !0
|
|
1346
1348
|
});
|
|
@@ -1355,24 +1357,24 @@ function Qt() {
|
|
|
1355
1357
|
}
|
|
1356
1358
|
var Ct = vn(function(t, e, n, o) {
|
|
1357
1359
|
if (e.scroll) {
|
|
1358
|
-
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l =
|
|
1359
|
-
Ot !== n && (Ot = n, at(), He = e.scroll, c = e.scrollFn, He === !0 && (He =
|
|
1360
|
-
var d = 0,
|
|
1360
|
+
var r = (t.touches ? t.touches[0] : t).clientX, i = (t.touches ? t.touches[0] : t).clientY, a = e.scrollSensitivity, s = e.scrollSpeed, l = ie(), u = !1, c;
|
|
1361
|
+
Ot !== n && (Ot = n, at(), He = e.scroll, c = e.scrollFn, He === !0 && (He = ge(n, !0)));
|
|
1362
|
+
var d = 0, g = He;
|
|
1361
1363
|
do {
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1364
|
-
var Me = h && (Math.abs(
|
|
1364
|
+
var T = g, w = $(T), y = w.top, C = w.bottom, E = w.left, m = w.right, H = w.width, k = w.height, h = void 0, p = void 0, I = T.scrollWidth, R = T.scrollHeight, M = v(T), ve = T.scrollLeft, fe = T.scrollTop;
|
|
1365
|
+
T === l ? (h = H < I && (M.overflowX === "auto" || M.overflowX === "scroll" || M.overflowX === "visible"), p = k < R && (M.overflowY === "auto" || M.overflowY === "scroll" || M.overflowY === "visible")) : (h = H < I && (M.overflowX === "auto" || M.overflowX === "scroll"), p = k < R && (M.overflowY === "auto" || M.overflowY === "scroll"));
|
|
1366
|
+
var Me = h && (Math.abs(m - r) <= a && ve + H < I) - (Math.abs(E - r) <= a && !!ve), se = p && (Math.abs(C - i) <= a && fe + k < R) - (Math.abs(y - i) <= a && !!fe);
|
|
1365
1367
|
if (!V[d])
|
|
1366
1368
|
for (var be = 0; be <= d; be++)
|
|
1367
1369
|
V[be] || (V[be] = {});
|
|
1368
|
-
(V[d].vx != Me || V[d].vy !=
|
|
1370
|
+
(V[d].vx != Me || V[d].vy != se || V[d].el !== T) && (V[d].el = T, V[d].vx = Me, V[d].vy = se, clearInterval(V[d].pid), (Me != 0 || se != 0) && (u = !0, V[d].pid = setInterval(function() {
|
|
1369
1371
|
o && this.layer === 0 && b.active._onTouchMove(ht);
|
|
1370
|
-
var Be = V[this.layer].vy ? V[this.layer].vy * s : 0,
|
|
1371
|
-
typeof c == "function" && c.call(b.dragged.parentNode[Z],
|
|
1372
|
+
var Be = V[this.layer].vy ? V[this.layer].vy * s : 0, he = V[this.layer].vx ? V[this.layer].vx * s : 0;
|
|
1373
|
+
typeof c == "function" && c.call(b.dragged.parentNode[Z], he, Be, t, ht, V[this.layer].el) !== "continue" || bn(V[this.layer].el, he, Be);
|
|
1372
1374
|
}.bind({
|
|
1373
1375
|
layer: d
|
|
1374
1376
|
}), 24))), d++;
|
|
1375
|
-
} while (e.bubbleScroll &&
|
|
1377
|
+
} while (e.bubbleScroll && g !== l && (g = ge(g, !1)));
|
|
1376
1378
|
kt = u;
|
|
1377
1379
|
}
|
|
1378
1380
|
}, 30), Cn = function(e) {
|
|
@@ -1403,7 +1405,7 @@ Mt.prototype = {
|
|
|
1403
1405
|
},
|
|
1404
1406
|
drop: Cn
|
|
1405
1407
|
};
|
|
1406
|
-
|
|
1408
|
+
ce(Mt, {
|
|
1407
1409
|
pluginName: "revertOnSpill"
|
|
1408
1410
|
});
|
|
1409
1411
|
function Bt() {
|
|
@@ -1415,7 +1417,7 @@ Bt.prototype = {
|
|
|
1415
1417
|
},
|
|
1416
1418
|
drop: Cn
|
|
1417
1419
|
};
|
|
1418
|
-
|
|
1420
|
+
ce(Bt, {
|
|
1419
1421
|
pluginName: "removeOnSpill"
|
|
1420
1422
|
});
|
|
1421
1423
|
b.mount(new Fo());
|
|
@@ -1461,22 +1463,22 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1461
1463
|
handle: o.sortHandle ? `.${o.sortHandle}` : null,
|
|
1462
1464
|
onEnd: ({
|
|
1463
1465
|
oldIndex: d,
|
|
1464
|
-
newIndex:
|
|
1466
|
+
newIndex: g
|
|
1465
1467
|
}) => {
|
|
1466
|
-
s("sort-end", d,
|
|
1468
|
+
s("sort-end", d, g);
|
|
1467
1469
|
}
|
|
1468
1470
|
});
|
|
1469
1471
|
}, u = (c) => {
|
|
1470
1472
|
let d;
|
|
1471
1473
|
const {
|
|
1472
|
-
columns:
|
|
1473
|
-
rowKey:
|
|
1474
|
-
tableData:
|
|
1474
|
+
columns: g,
|
|
1475
|
+
rowKey: T,
|
|
1476
|
+
tableData: w,
|
|
1475
1477
|
pageInfo: y
|
|
1476
|
-
} = c,
|
|
1478
|
+
} = c, C = (k, h) => {
|
|
1477
1479
|
var p;
|
|
1478
1480
|
return k.slotName && ((p = r[k.slotName]) == null ? void 0 : p.call(r, h));
|
|
1479
|
-
},
|
|
1481
|
+
}, E = (k) => k.map((h) => {
|
|
1480
1482
|
const R = h, {
|
|
1481
1483
|
children: p
|
|
1482
1484
|
} = R, I = jt(R, [
|
|
@@ -1485,7 +1487,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1485
1487
|
return O(j("el-table-column"), I, {
|
|
1486
1488
|
default: (M) => {
|
|
1487
1489
|
if ((h == null ? void 0 : h.renderType) === "operate")
|
|
1488
|
-
return
|
|
1490
|
+
return m(h, M);
|
|
1489
1491
|
if (h != null && h.renderType && (h == null ? void 0 : h.renderType) !== "operate") {
|
|
1490
1492
|
const ve = {
|
|
1491
1493
|
renderType: h.renderType,
|
|
@@ -1498,13 +1500,13 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1498
1500
|
onChange: h == null ? void 0 : h.change
|
|
1499
1501
|
}, null);
|
|
1500
1502
|
}
|
|
1501
|
-
return h != null && h.render ? h == null ? void 0 : h.render(M) : p && (p == null ? void 0 : p.length) > 0 ?
|
|
1503
|
+
return h != null && h.render ? h == null ? void 0 : h.render(M) : p && (p == null ? void 0 : p.length) > 0 ? E(p) : (h == null ? void 0 : h.slotName) && C(h, M);
|
|
1502
1504
|
}
|
|
1503
1505
|
});
|
|
1504
|
-
}),
|
|
1506
|
+
}), m = (k, h) => {
|
|
1505
1507
|
var p;
|
|
1506
1508
|
return O("div", {
|
|
1507
|
-
class: "flex justify-center cursor-pointer"
|
|
1509
|
+
class: "flex justify-center items-center cursor-pointer"
|
|
1508
1510
|
}, [(p = k.operate) == null ? void 0 : p.filter((I) => !I.show || I.show(h.row)).map((I) => I != null && I.render ? I.render(h.row) : O("span", {
|
|
1509
1511
|
onClick: Un(() => {
|
|
1510
1512
|
I != null && I.onClick && (I == null || I.onClick(h.row)), s("operate-handle", I.key, h.row);
|
|
@@ -1513,7 +1515,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1513
1515
|
color: I.key == "del" ? "var(--table-operate-warning-text-color)" : "var(--table-operate-text-color)"
|
|
1514
1516
|
},
|
|
1515
1517
|
class: "mr-10 whitespace-nowrap"
|
|
1516
|
-
}, [I.label]))]);
|
|
1518
|
+
}, [Q(" "), I.label, Q(" ")]))]);
|
|
1517
1519
|
}, H = () => {
|
|
1518
1520
|
if (!y)
|
|
1519
1521
|
return null;
|
|
@@ -1539,12 +1541,12 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1539
1541
|
onCurrentChange: h
|
|
1540
1542
|
}, null)]);
|
|
1541
1543
|
};
|
|
1542
|
-
return O(
|
|
1544
|
+
return O(ne, null, [O(j("el-table"), De({
|
|
1543
1545
|
ref: a
|
|
1544
1546
|
}, i, {
|
|
1545
|
-
"row-key":
|
|
1546
|
-
data:
|
|
1547
|
-
}), Vo(d =
|
|
1547
|
+
"row-key": T,
|
|
1548
|
+
data: w
|
|
1549
|
+
}), Vo(d = E(g)) ? d : {
|
|
1548
1550
|
default: () => [d]
|
|
1549
1551
|
}), H()]);
|
|
1550
1552
|
};
|
|
@@ -1564,7 +1566,11 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1564
1566
|
showAddBtn: {
|
|
1565
1567
|
type: Boolean,
|
|
1566
1568
|
default: !0
|
|
1567
|
-
}
|
|
1569
|
+
},
|
|
1570
|
+
style: {},
|
|
1571
|
+
labelStyle: {},
|
|
1572
|
+
className: {},
|
|
1573
|
+
classLabelName: {}
|
|
1568
1574
|
},
|
|
1569
1575
|
emits: ["search", "add"],
|
|
1570
1576
|
setup(t, {
|
|
@@ -1575,24 +1581,30 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1575
1581
|
searchColumns: s,
|
|
1576
1582
|
searchParams: l,
|
|
1577
1583
|
showSearchBtn: u,
|
|
1578
|
-
showAddBtn: c
|
|
1584
|
+
showAddBtn: c,
|
|
1585
|
+
style: d,
|
|
1586
|
+
labelStyle: g,
|
|
1587
|
+
className: T,
|
|
1588
|
+
classLabelName: w
|
|
1579
1589
|
} = a;
|
|
1580
|
-
return O(
|
|
1590
|
+
return O(ne, null, [O("div", {
|
|
1581
1591
|
class: "table-search flex gap-10"
|
|
1582
|
-
}, [((
|
|
1583
|
-
const
|
|
1584
|
-
renderType:
|
|
1585
|
-
prop:
|
|
1586
|
-
config:
|
|
1592
|
+
}, [((C) => C.filter((E) => !E.show || E.show()).map((E) => {
|
|
1593
|
+
const m = {
|
|
1594
|
+
renderType: E.renderType,
|
|
1595
|
+
prop: E.key,
|
|
1596
|
+
config: E.config
|
|
1587
1597
|
};
|
|
1588
1598
|
return O("div", {
|
|
1589
|
-
class:
|
|
1599
|
+
class: `flex items-center ${T && T.join(" ")}`,
|
|
1600
|
+
style: d
|
|
1590
1601
|
}, [O("span", {
|
|
1591
|
-
class:
|
|
1592
|
-
|
|
1593
|
-
|
|
1602
|
+
class: `mr-10 whitespace-nowrap ${w && w.join(" ")}`,
|
|
1603
|
+
style: g
|
|
1604
|
+
}, [Q(" "), E.label, Q(" ")]), O(fn, {
|
|
1605
|
+
conf: m,
|
|
1594
1606
|
model: l,
|
|
1595
|
-
onChange:
|
|
1607
|
+
onChange: E == null ? void 0 : E.change
|
|
1596
1608
|
}, null)]);
|
|
1597
1609
|
}))(s), u && O(j("el-button"), {
|
|
1598
1610
|
onClick: () => r("search")
|
|
@@ -1602,13 +1614,12 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1602
1614
|
}, {
|
|
1603
1615
|
default: () => [O("svg", {
|
|
1604
1616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1605
|
-
viewBox: "0 0 1024 1024"
|
|
1606
|
-
"data-v-ea893728": ""
|
|
1617
|
+
viewBox: "0 0 1024 1024"
|
|
1607
1618
|
}, [O("path", {
|
|
1608
1619
|
fill: "currentColor",
|
|
1609
1620
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
|
|
1610
|
-
},
|
|
1611
|
-
}),
|
|
1621
|
+
}, [" "])])]
|
|
1622
|
+
}), Q("搜索"), " "]
|
|
1612
1623
|
}), c && O(j("el-button"), {
|
|
1613
1624
|
onClick: () => r("add")
|
|
1614
1625
|
}, {
|
|
@@ -1617,13 +1628,12 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1617
1628
|
}, {
|
|
1618
1629
|
default: () => [O("svg", {
|
|
1619
1630
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1620
|
-
viewBox: "0 0 1024 1024"
|
|
1621
|
-
"data-v-ea893728": ""
|
|
1631
|
+
viewBox: "0 0 1024 1024"
|
|
1622
1632
|
}, [O("path", {
|
|
1623
1633
|
fill: "currentColor",
|
|
1624
1634
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
1625
|
-
},
|
|
1626
|
-
}),
|
|
1635
|
+
}, [" "])])]
|
|
1636
|
+
}), Q("添加")]
|
|
1627
1637
|
}), n.default && n.default()])]);
|
|
1628
1638
|
};
|
|
1629
1639
|
return (a, s) => (S(), X(K(i(o))));
|
|
@@ -1633,7 +1643,7 @@ const $o = /* @__PURE__ */ Ae({
|
|
|
1633
1643
|
for (const [o, r] of e)
|
|
1634
1644
|
n[o] = r;
|
|
1635
1645
|
return n;
|
|
1636
|
-
}, Xo = /* @__PURE__ */ Ne(Ho, [["__scopeId", "data-v-
|
|
1646
|
+
}, Xo = /* @__PURE__ */ Ne(Ho, [["__scopeId", "data-v-3725b4a5"]]), Yo = {
|
|
1637
1647
|
required: jo,
|
|
1638
1648
|
isNumber: zo,
|
|
1639
1649
|
isInt: Ro,
|
|
@@ -1734,56 +1744,56 @@ const Qo = { render: Ko }, er = {
|
|
|
1734
1744
|
},
|
|
1735
1745
|
setup(t, { expose: e }) {
|
|
1736
1746
|
const n = ["date-picker"], o = t, r = xt(), i = xt(l()), a = u(), s = Wn(() => {
|
|
1737
|
-
const
|
|
1738
|
-
return
|
|
1739
|
-
(typeof
|
|
1740
|
-
}),
|
|
1747
|
+
const C = o.formConfig.compList, E = {};
|
|
1748
|
+
return C.forEach((m) => {
|
|
1749
|
+
(typeof m.hidden == "function" ? !m.hidden(i.value, o.status) : !m.hidden) && m.name && (E[m.name] = i.value[m.name]);
|
|
1750
|
+
}), E;
|
|
1741
1751
|
});
|
|
1742
1752
|
function l() {
|
|
1743
1753
|
return o.status === "ADD" ? d() : o.formData;
|
|
1744
1754
|
}
|
|
1745
1755
|
function u() {
|
|
1746
|
-
return
|
|
1756
|
+
return g();
|
|
1747
1757
|
}
|
|
1748
1758
|
function c() {
|
|
1749
1759
|
i.value = d();
|
|
1750
1760
|
}
|
|
1751
1761
|
function d() {
|
|
1752
|
-
const
|
|
1753
|
-
return
|
|
1754
|
-
|
|
1755
|
-
}),
|
|
1762
|
+
const C = o.formConfig.compList, E = {};
|
|
1763
|
+
return C.forEach((m) => {
|
|
1764
|
+
m.name && (E[m.name] = m.defaultValue);
|
|
1765
|
+
}), E;
|
|
1756
1766
|
}
|
|
1757
|
-
function
|
|
1758
|
-
const
|
|
1759
|
-
return
|
|
1767
|
+
function g() {
|
|
1768
|
+
const C = o.formConfig.compList, E = {};
|
|
1769
|
+
return C.forEach((m) => {
|
|
1760
1770
|
var h, p, I;
|
|
1761
|
-
const H = ((h =
|
|
1762
|
-
if ((H || k) && !
|
|
1763
|
-
for (const R in
|
|
1764
|
-
if (
|
|
1771
|
+
const H = ((h = m.rule) == null ? void 0 : h.constructor) === Object && Object.keys(m.rule).length > 0, k = Array.isArray(m.customRules) && m.customRules.length > 0;
|
|
1772
|
+
if ((H || k) && !E[m.name] && (E[m.name] = []), H)
|
|
1773
|
+
for (const R in m.rule) {
|
|
1774
|
+
if (m.rule[R] === !1)
|
|
1765
1775
|
break;
|
|
1766
|
-
const M = typeof
|
|
1767
|
-
(p =
|
|
1776
|
+
const M = typeof m.label == "function" ? y(m.label) : m.label;
|
|
1777
|
+
(p = E[m.name]) == null || p.push(Lo(M, R, m.rule[R]));
|
|
1768
1778
|
}
|
|
1769
|
-
k && ((I =
|
|
1779
|
+
k && ((I = m.customRules) == null || I.forEach((R) => {
|
|
1770
1780
|
var M;
|
|
1771
|
-
(M =
|
|
1781
|
+
(M = E[m.name]) == null || M.push(R);
|
|
1772
1782
|
}));
|
|
1773
|
-
}),
|
|
1783
|
+
}), E;
|
|
1774
1784
|
}
|
|
1775
|
-
function
|
|
1776
|
-
return new Promise((
|
|
1777
|
-
r.value.validate((
|
|
1778
|
-
|
|
1785
|
+
function T() {
|
|
1786
|
+
return new Promise((C, E) => {
|
|
1787
|
+
r.value.validate((m) => {
|
|
1788
|
+
m ? C("") : E();
|
|
1779
1789
|
});
|
|
1780
1790
|
});
|
|
1781
1791
|
}
|
|
1782
|
-
function
|
|
1783
|
-
return
|
|
1792
|
+
function w(C) {
|
|
1793
|
+
return C.filter((E) => !y(E.hidden));
|
|
1784
1794
|
}
|
|
1785
|
-
function y(
|
|
1786
|
-
return typeof
|
|
1795
|
+
function y(C) {
|
|
1796
|
+
return typeof C == "function" ? C(i.value, o.status) : C;
|
|
1787
1797
|
}
|
|
1788
1798
|
return ln(
|
|
1789
1799
|
() => i,
|
|
@@ -1797,34 +1807,34 @@ const Qo = { render: Ko }, er = {
|
|
|
1797
1807
|
form: i,
|
|
1798
1808
|
formValue: s,
|
|
1799
1809
|
resetForm: c,
|
|
1800
|
-
validateForm:
|
|
1801
|
-
}), (
|
|
1802
|
-
const
|
|
1810
|
+
validateForm: T
|
|
1811
|
+
}), (C, E) => {
|
|
1812
|
+
const m = j("el-popover"), H = j("el-form-item"), k = j("el-form");
|
|
1803
1813
|
return S(), X(k, De({
|
|
1804
1814
|
ref_key: "formRef",
|
|
1805
1815
|
ref: r,
|
|
1806
1816
|
model: i.value
|
|
1807
|
-
},
|
|
1817
|
+
}, C.formConfig.formProps, { rules: st(a) }), {
|
|
1808
1818
|
default: W(() => [
|
|
1809
1819
|
P("div", {
|
|
1810
1820
|
class: "form-wrap",
|
|
1811
|
-
style: Ye(
|
|
1821
|
+
style: Ye(C.formConfig.wrapStyle)
|
|
1812
1822
|
}, [
|
|
1813
|
-
(S(!0), N(
|
|
1823
|
+
(S(!0), N(ne, null, le(w(C.formConfig.compList), (h) => (S(), N("div", {
|
|
1814
1824
|
class: "form-item",
|
|
1815
1825
|
key: h.name,
|
|
1816
|
-
style: Ye(Ve(Ve({},
|
|
1826
|
+
style: Ye(Ve(Ve({}, C.formConfig.itemStyle), h.style))
|
|
1817
1827
|
}, [
|
|
1818
|
-
O(H, De(Ve(Ve({},
|
|
1828
|
+
O(H, De(Ve(Ve({}, C.formConfig.formItemProps), h.formItemProps), {
|
|
1819
1829
|
prop: h.name,
|
|
1820
|
-
style:
|
|
1821
|
-
class:
|
|
1830
|
+
style: C.formConfig.formItemStyle,
|
|
1831
|
+
class: C.formConfig.layout
|
|
1822
1832
|
}), {
|
|
1823
1833
|
label: W(() => [
|
|
1824
1834
|
P("span", {
|
|
1825
1835
|
style: Ye(h.labelStyle)
|
|
1826
|
-
},
|
|
1827
|
-
h.hint ? (S(), X(
|
|
1836
|
+
}, re(y(h.label)), 5),
|
|
1837
|
+
h.hint ? (S(), X(m, {
|
|
1828
1838
|
key: 0,
|
|
1829
1839
|
placement: "top-start",
|
|
1830
1840
|
trigger: "hover",
|
|
@@ -1833,13 +1843,13 @@ const Qo = { render: Ko }, er = {
|
|
|
1833
1843
|
reference: W(() => [
|
|
1834
1844
|
h.hint ? (S(), N("span", er, [
|
|
1835
1845
|
O(st(Qo), { color: "#ccc" })
|
|
1836
|
-
])) :
|
|
1846
|
+
])) : te("", !0)
|
|
1837
1847
|
]),
|
|
1838
1848
|
_: 2
|
|
1839
|
-
}, 1032, ["content"])) :
|
|
1849
|
+
}, 1032, ["content"])) : te("", !0)
|
|
1840
1850
|
]),
|
|
1841
1851
|
default: W(() => [
|
|
1842
|
-
h.slotName ? sn(
|
|
1852
|
+
h.slotName ? sn(C.$slots, h.slotName, {
|
|
1843
1853
|
key: 0,
|
|
1844
1854
|
form: i.value
|
|
1845
1855
|
}, void 0, !0) : n.includes(h.ctype || "") ? (S(), X(K(`el-${h.ctype}`), De({ key: 1 }, h.config, {
|
|
@@ -1852,28 +1862,28 @@ const Qo = { render: Ko }, er = {
|
|
|
1852
1862
|
onKeyup: Gn((p) => y(h == null ? void 0 : h.enter), ["enter"])
|
|
1853
1863
|
}, qn(h.event)), {
|
|
1854
1864
|
default: W(() => [
|
|
1855
|
-
h.ctype === "select" ? (S(!0), N(
|
|
1865
|
+
h.ctype === "select" ? (S(!0), N(ne, { key: 0 }, le(h.selectOptions, (p) => (S(), X(K("el-option"), {
|
|
1856
1866
|
key: p.value,
|
|
1857
1867
|
label: p.label,
|
|
1858
1868
|
value: p.value
|
|
1859
|
-
}, null, 8, ["label", "value"]))), 128)) :
|
|
1860
|
-
h.ctype === "radio-group" ? (S(!0), N(
|
|
1869
|
+
}, null, 8, ["label", "value"]))), 128)) : te("", !0),
|
|
1870
|
+
h.ctype === "radio-group" ? (S(!0), N(ne, { key: 1 }, le(h.radioList, (p) => (S(), X(K("el-radio"), {
|
|
1861
1871
|
key: p.value,
|
|
1862
1872
|
label: p.value
|
|
1863
1873
|
}, {
|
|
1864
1874
|
default: W(() => [
|
|
1865
|
-
|
|
1875
|
+
Q(re(p.label), 1)
|
|
1866
1876
|
]),
|
|
1867
1877
|
_: 2
|
|
1868
|
-
}, 1032, ["label"]))), 128)) :
|
|
1869
|
-
h.ctype === "checkbox-group" ? (S(!0), N(
|
|
1878
|
+
}, 1032, ["label"]))), 128)) : te("", !0),
|
|
1879
|
+
h.ctype === "checkbox-group" ? (S(!0), N(ne, { key: 2 }, le(h.checkboxList, (p) => (S(), X(K("el-checkbox"), {
|
|
1870
1880
|
key: p,
|
|
1871
1881
|
label: p
|
|
1872
|
-
}, null, 8, ["label"]))), 128)) :
|
|
1873
|
-
h.ctype === "input" ? (S(!0), N(
|
|
1882
|
+
}, null, 8, ["label"]))), 128)) : te("", !0),
|
|
1883
|
+
h.ctype === "input" ? (S(!0), N(ne, { key: 3 }, le((h.slots || []).filter((p) => p.type === "text"), (p) => (S(), N("div", {
|
|
1874
1884
|
slot: p.name,
|
|
1875
1885
|
key: p.name
|
|
1876
|
-
},
|
|
1886
|
+
}, re(p.inner), 9, tr))), 128)) : te("", !0)
|
|
1877
1887
|
]),
|
|
1878
1888
|
_: 2
|
|
1879
1889
|
}, 1040, ["disabled", "modelValue", "onUpdate:modelValue", "onKeyup"]))
|
|
@@ -1887,7 +1897,7 @@ const Qo = { render: Ko }, er = {
|
|
|
1887
1897
|
}, 16, ["model", "rules"]);
|
|
1888
1898
|
};
|
|
1889
1899
|
}
|
|
1890
|
-
}), or = /* @__PURE__ */ Ne(nr, [["__scopeId", "data-v-
|
|
1900
|
+
}), or = /* @__PURE__ */ Ne(nr, [["__scopeId", "data-v-e683c43e"]]);
|
|
1891
1901
|
let Dn, xn, rr;
|
|
1892
1902
|
const ir = () => {
|
|
1893
1903
|
localStorage.setItem(Dn, xn), window.location.reload(!0);
|
|
@@ -1907,28 +1917,28 @@ const ir = () => {
|
|
|
1907
1917
|
const r = j("el-button");
|
|
1908
1918
|
return S(), N("div", lr, [
|
|
1909
1919
|
P("div", ur, [
|
|
1910
|
-
P("div", cr,
|
|
1920
|
+
P("div", cr, re(e == null ? void 0 : e.title), 1),
|
|
1911
1921
|
P("div", dr, [
|
|
1912
|
-
P("div", fr,
|
|
1913
|
-
(S(!0), N(
|
|
1914
|
-
P("span", null,
|
|
1915
|
-
|
|
1916
|
-
P("span", null,
|
|
1922
|
+
P("div", fr, re(e == null ? void 0 : e.description), 1),
|
|
1923
|
+
(S(!0), N(ne, null, le(e == null ? void 0 : e.content, (i, a) => (S(), N("div", hr, [
|
|
1924
|
+
P("span", null, re(a) + ":", 1),
|
|
1925
|
+
Q(),
|
|
1926
|
+
P("span", null, re(i), 1)
|
|
1917
1927
|
]))), 256)),
|
|
1918
|
-
P("div", pr,
|
|
1928
|
+
P("div", pr, re(e.time) + " 软件专业部", 1),
|
|
1919
1929
|
P("div", mr, [
|
|
1920
1930
|
O(r, {
|
|
1921
1931
|
plain: "",
|
|
1922
1932
|
onClick: st(ar)
|
|
1923
1933
|
}, {
|
|
1924
1934
|
default: W(() => [
|
|
1925
|
-
|
|
1935
|
+
Q("暂不更新")
|
|
1926
1936
|
]),
|
|
1927
1937
|
_: 1
|
|
1928
1938
|
}, 8, ["onClick"]),
|
|
1929
1939
|
O(r, { onClick: st(ir) }, {
|
|
1930
1940
|
default: W(() => [
|
|
1931
|
-
|
|
1941
|
+
Q("立即更新")
|
|
1932
1942
|
]),
|
|
1933
1943
|
_: 1
|
|
1934
1944
|
}, 8, ["onClick"])
|
|
@@ -2036,7 +2046,7 @@ const kr = { render: Or }, Ar = {
|
|
|
2036
2046
|
}, Nr = { class: "badge-container" };
|
|
2037
2047
|
function Mr(t, e, n, o, r, i) {
|
|
2038
2048
|
return cn((S(), N("div", Nr, [
|
|
2039
|
-
P("sup", null,
|
|
2049
|
+
P("sup", null, re(n.value), 1)
|
|
2040
2050
|
], 512)), [
|
|
2041
2051
|
[dn, n.value > 0]
|
|
2042
2052
|
]);
|
|
@@ -2154,12 +2164,12 @@ function zr(t, e, n, o, r, i) {
|
|
|
2154
2164
|
cn(P("div", {
|
|
2155
2165
|
class: lt(["toolbar-container", n.showTool ? "zoom-in" : "zoom-out "])
|
|
2156
2166
|
}, [
|
|
2157
|
-
r.curComponent.name ?
|
|
2167
|
+
r.curComponent.name ? te("", !0) : (S(), N("div", {
|
|
2158
2168
|
key: 0,
|
|
2159
2169
|
style: Ye({ "grid-template-columns": `repeat(${i.configList.length}, 1fr)` }),
|
|
2160
2170
|
class: "toolbar-wrap"
|
|
2161
2171
|
}, [
|
|
2162
|
-
(S(!0), N(
|
|
2172
|
+
(S(!0), N(ne, null, le(i.configList, (s) => (S(), N("div", {
|
|
2163
2173
|
class: "flex justify-center items-center",
|
|
2164
2174
|
onClick: (l) => i.configHandle(s)
|
|
2165
2175
|
}, [
|
|
@@ -2174,9 +2184,9 @@ function zr(t, e, n, o, r, i) {
|
|
|
2174
2184
|
s.isShowBadge ? (S(), X(a, {
|
|
2175
2185
|
key: 0,
|
|
2176
2186
|
value: n.badgeValue
|
|
2177
|
-
}, null, 8, ["value"])) :
|
|
2187
|
+
}, null, 8, ["value"])) : te("", !0)
|
|
2178
2188
|
]),
|
|
2179
|
-
P("span", Xr,
|
|
2189
|
+
P("span", Xr, re(s.label), 1)
|
|
2180
2190
|
], 8, Vr)
|
|
2181
2191
|
], 8, Fr))), 256))
|
|
2182
2192
|
], 4)),
|
|
@@ -2190,13 +2200,13 @@ function zr(t, e, n, o, r, i) {
|
|
|
2190
2200
|
(S(), X(K(r.curComponent.icon)))
|
|
2191
2201
|
])
|
|
2192
2202
|
]),
|
|
2193
|
-
(S(!0), N(
|
|
2203
|
+
(S(!0), N(ne, null, le(r.curComponent.data, (s, l) => (S(), N("div", {
|
|
2194
2204
|
style: Ye([{ background: s.themeColor, boxShadow: `0px 4px 7px 0px ${s.themeColor}` }, i.getPosition(l)]),
|
|
2195
2205
|
title: s.name,
|
|
2196
2206
|
class: lt(["theme", r.curTheme === s.id ? "select" : ""]),
|
|
2197
2207
|
onClick: (u) => i.chooseTheme(s)
|
|
2198
2208
|
}, null, 14, jr))), 256))
|
|
2199
|
-
])) :
|
|
2209
|
+
])) : te("", !0)
|
|
2200
2210
|
], 2), [
|
|
2201
2211
|
[dn, n.showTool]
|
|
2202
2212
|
])
|
|
@@ -2315,7 +2325,7 @@ function Qr(t, e, n, o, r, i) {
|
|
|
2315
2325
|
r.showBadge ? (S(), X(a, {
|
|
2316
2326
|
key: 0,
|
|
2317
2327
|
value: r.badgeValue
|
|
2318
|
-
}, null, 8, ["value"])) :
|
|
2328
|
+
}, null, 8, ["value"])) : te("", !0)
|
|
2319
2329
|
], 34),
|
|
2320
2330
|
P("div", {
|
|
2321
2331
|
class: lt(["mask", `${i.showClass}`]),
|