ss-component-new 1.3.697 → 1.3.698
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/header-R5IfoKTX.js +4029 -0
- package/dist/{index-DpYqhPhA.js → index-B9isvN1d.js} +2 -2
- package/dist/{index-Dh-XsS5U.js → index-BKKAvqK3.js} +31 -32
- package/dist/{index-z0_YrIG2.js → index-By70dOai.js} +4 -4
- package/dist/{index-D7JA6c9V.js → index-Cc1nPEpp.js} +22500 -26514
- package/dist/index-RUwH0Fls.js +365 -0
- package/dist/{origin-eVVoOCRz.js → index.vue_vue_type_script_setup_true_lang-Dj5jZLRU.js} +8338 -8284
- package/dist/{menu-BwJj321q.js → menu-Blo579Ai.js} +12 -12
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +2 -2
- package/dist/ss-component2.js +2 -2
- package/package.json +1 -1
- package/dist/index-Q71ALCnS.js +0 -213
- package/dist/index.vue_vue_type_script_setup_true_lang-DRzriV-s.js +0 -55
|
@@ -0,0 +1,4029 @@
|
|
|
1
|
+
import { resolveComponent as Se, createBlock as ie, openBlock as C, withCtx as W, renderSlot as De, defineComponent as Ke, ref as Q, onMounted as Xn, watch as Ue, createElementBlock as q, computed as Oe, createVNode as Ce, createElementVNode as ue, Fragment as $e, renderList as Ve, withModifiers as qe, normalizeClass as Nt, toDisplayString as Me, createSlots as hn, nextTick as Ge, isRef as $l, isReactive as Ml, toRaw as Rl, createCommentVNode as ae, unref as it, mergeProps as Ba, reactive as Pl, onBeforeUnmount as Yl, inject as ua, withDirectives as Cn, vShow as xn, normalizeStyle as $t, createTextVNode as Kt, resolveDynamicComponent as Fa } from "vue";
|
|
2
|
+
import { _ as an, E as Ua, j as Ll, u as Nl, g as Bl, f as Fl, c as Ul, G as qn, H as Vl, I as lt, J as ca, K as Hl } from "./index.vue_vue_type_script_setup_true_lang-Dj5jZLRU.js";
|
|
3
|
+
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { M as zl, S as da, e as Xl, U as fa, g as pa, f as ha, i as ga, h as Tn, j as ql, k as va, l as gn, m as Va, n as Wl, o as ma, c as mt, s as Bn, p as Fn, b as Gl, u as jl } from "./menu-Blo579Ai.js";
|
|
5
|
+
var Zl = "__lodash_hash_undefined__";
|
|
6
|
+
function Kl(e) {
|
|
7
|
+
return this.__data__.set(e, Zl), this;
|
|
8
|
+
}
|
|
9
|
+
function Jl(e) {
|
|
10
|
+
return this.__data__.has(e);
|
|
11
|
+
}
|
|
12
|
+
function vn(e) {
|
|
13
|
+
var t = -1, a = e == null ? 0 : e.length;
|
|
14
|
+
for (this.__data__ = new zl(); ++t < a; )
|
|
15
|
+
this.add(e[t]);
|
|
16
|
+
}
|
|
17
|
+
vn.prototype.add = vn.prototype.push = Kl;
|
|
18
|
+
vn.prototype.has = Jl;
|
|
19
|
+
function Ql(e, t) {
|
|
20
|
+
for (var a = -1, n = e == null ? 0 : e.length; ++a < n; )
|
|
21
|
+
if (t(e[a], a, e))
|
|
22
|
+
return !0;
|
|
23
|
+
return !1;
|
|
24
|
+
}
|
|
25
|
+
function er(e, t) {
|
|
26
|
+
return e.has(t);
|
|
27
|
+
}
|
|
28
|
+
var tr = 1, nr = 2;
|
|
29
|
+
function Ha(e, t, a, n, l, r) {
|
|
30
|
+
var i = a & tr, c = e.length, o = t.length;
|
|
31
|
+
if (c != o && !(i && o > c))
|
|
32
|
+
return !1;
|
|
33
|
+
var u = r.get(e), d = r.get(t);
|
|
34
|
+
if (u && d)
|
|
35
|
+
return u == t && d == e;
|
|
36
|
+
var g = -1, p = !0, m = a & nr ? new vn() : void 0;
|
|
37
|
+
for (r.set(e, t), r.set(t, e); ++g < c; ) {
|
|
38
|
+
var f = e[g], h = t[g];
|
|
39
|
+
if (n)
|
|
40
|
+
var x = i ? n(h, f, g, t, e, r) : n(f, h, g, e, t, r);
|
|
41
|
+
if (x !== void 0) {
|
|
42
|
+
if (x)
|
|
43
|
+
continue;
|
|
44
|
+
p = !1;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (m) {
|
|
48
|
+
if (!Ql(t, function(b, E) {
|
|
49
|
+
if (!er(m, E) && (f === b || l(f, b, a, n, r)))
|
|
50
|
+
return m.push(E);
|
|
51
|
+
})) {
|
|
52
|
+
p = !1;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
} else if (!(f === h || l(f, h, a, n, r))) {
|
|
56
|
+
p = !1;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return r.delete(e), r.delete(t), p;
|
|
61
|
+
}
|
|
62
|
+
function ar(e) {
|
|
63
|
+
var t = -1, a = Array(e.size);
|
|
64
|
+
return e.forEach(function(n, l) {
|
|
65
|
+
a[++t] = [l, n];
|
|
66
|
+
}), a;
|
|
67
|
+
}
|
|
68
|
+
function lr(e) {
|
|
69
|
+
var t = -1, a = Array(e.size);
|
|
70
|
+
return e.forEach(function(n) {
|
|
71
|
+
a[++t] = n;
|
|
72
|
+
}), a;
|
|
73
|
+
}
|
|
74
|
+
var rr = 1, ir = 2, or = "[object Boolean]", sr = "[object Date]", ur = "[object Error]", cr = "[object Map]", dr = "[object Number]", fr = "[object RegExp]", pr = "[object Set]", hr = "[object String]", gr = "[object Symbol]", vr = "[object ArrayBuffer]", mr = "[object DataView]", ya = da ? da.prototype : void 0, An = ya ? ya.valueOf : void 0;
|
|
75
|
+
function yr(e, t, a, n, l, r, i) {
|
|
76
|
+
switch (a) {
|
|
77
|
+
case mr:
|
|
78
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
79
|
+
return !1;
|
|
80
|
+
e = e.buffer, t = t.buffer;
|
|
81
|
+
case vr:
|
|
82
|
+
return !(e.byteLength != t.byteLength || !r(new fa(e), new fa(t)));
|
|
83
|
+
case or:
|
|
84
|
+
case sr:
|
|
85
|
+
case dr:
|
|
86
|
+
return Xl(+e, +t);
|
|
87
|
+
case ur:
|
|
88
|
+
return e.name == t.name && e.message == t.message;
|
|
89
|
+
case fr:
|
|
90
|
+
case hr:
|
|
91
|
+
return e == t + "";
|
|
92
|
+
case cr:
|
|
93
|
+
var c = ar;
|
|
94
|
+
case pr:
|
|
95
|
+
var o = n & rr;
|
|
96
|
+
if (c || (c = lr), e.size != t.size && !o)
|
|
97
|
+
return !1;
|
|
98
|
+
var u = i.get(e);
|
|
99
|
+
if (u)
|
|
100
|
+
return u == t;
|
|
101
|
+
n |= ir, i.set(e, t);
|
|
102
|
+
var d = Ha(c(e), c(t), n, l, r, i);
|
|
103
|
+
return i.delete(e), d;
|
|
104
|
+
case gr:
|
|
105
|
+
if (An)
|
|
106
|
+
return An.call(e) == An.call(t);
|
|
107
|
+
}
|
|
108
|
+
return !1;
|
|
109
|
+
}
|
|
110
|
+
var br = 1, Sr = Object.prototype, wr = Sr.hasOwnProperty;
|
|
111
|
+
function Dr(e, t, a, n, l, r) {
|
|
112
|
+
var i = a & br, c = pa(e), o = c.length, u = pa(t), d = u.length;
|
|
113
|
+
if (o != d && !i)
|
|
114
|
+
return !1;
|
|
115
|
+
for (var g = o; g--; ) {
|
|
116
|
+
var p = c[g];
|
|
117
|
+
if (!(i ? p in t : wr.call(t, p)))
|
|
118
|
+
return !1;
|
|
119
|
+
}
|
|
120
|
+
var m = r.get(e), f = r.get(t);
|
|
121
|
+
if (m && f)
|
|
122
|
+
return m == t && f == e;
|
|
123
|
+
var h = !0;
|
|
124
|
+
r.set(e, t), r.set(t, e);
|
|
125
|
+
for (var x = i; ++g < o; ) {
|
|
126
|
+
p = c[g];
|
|
127
|
+
var b = e[p], E = t[p];
|
|
128
|
+
if (n)
|
|
129
|
+
var Y = i ? n(E, b, p, t, e, r) : n(b, E, p, e, t, r);
|
|
130
|
+
if (!(Y === void 0 ? b === E || l(b, E, a, n, r) : Y)) {
|
|
131
|
+
h = !1;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
x || (x = p == "constructor");
|
|
135
|
+
}
|
|
136
|
+
if (h && !x) {
|
|
137
|
+
var L = e.constructor, P = t.constructor;
|
|
138
|
+
L != P && "constructor" in e && "constructor" in t && !(typeof L == "function" && L instanceof L && typeof P == "function" && P instanceof P) && (h = !1);
|
|
139
|
+
}
|
|
140
|
+
return r.delete(e), r.delete(t), h;
|
|
141
|
+
}
|
|
142
|
+
var _r = 1, ba = "[object Arguments]", Sa = "[object Array]", Jt = "[object Object]", Er = Object.prototype, wa = Er.hasOwnProperty;
|
|
143
|
+
function Cr(e, t, a, n, l, r) {
|
|
144
|
+
var i = va(e), c = va(t), o = i ? Sa : ha(e), u = c ? Sa : ha(t);
|
|
145
|
+
o = o == ba ? Jt : o, u = u == ba ? Jt : u;
|
|
146
|
+
var d = o == Jt, g = u == Jt, p = o == u;
|
|
147
|
+
if (p && ga(e)) {
|
|
148
|
+
if (!ga(t))
|
|
149
|
+
return !1;
|
|
150
|
+
i = !0, d = !1;
|
|
151
|
+
}
|
|
152
|
+
if (p && !d)
|
|
153
|
+
return r || (r = new Tn()), i || ql(e) ? Ha(e, t, a, n, l, r) : yr(e, t, o, a, n, l, r);
|
|
154
|
+
if (!(a & _r)) {
|
|
155
|
+
var m = d && wa.call(e, "__wrapped__"), f = g && wa.call(t, "__wrapped__");
|
|
156
|
+
if (m || f) {
|
|
157
|
+
var h = m ? e.value() : e, x = f ? t.value() : t;
|
|
158
|
+
return r || (r = new Tn()), l(h, x, a, n, r);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return p ? (r || (r = new Tn()), Dr(e, t, a, n, l, r)) : !1;
|
|
162
|
+
}
|
|
163
|
+
function za(e, t, a, n, l) {
|
|
164
|
+
return e === t ? !0 : e == null || t == null || !gn(e) && !gn(t) ? e !== e && t !== t : Cr(e, t, a, n, za, l);
|
|
165
|
+
}
|
|
166
|
+
var xr = "[object Date]";
|
|
167
|
+
function Tr(e) {
|
|
168
|
+
return gn(e) && Va(e) == xr;
|
|
169
|
+
}
|
|
170
|
+
var Da = ma && ma.isDate, Ar = Da ? Wl(Da) : Tr;
|
|
171
|
+
function kr(e, t) {
|
|
172
|
+
return za(e, t);
|
|
173
|
+
}
|
|
174
|
+
var Ir = "[object Number]";
|
|
175
|
+
function _a(e) {
|
|
176
|
+
return typeof e == "number" || gn(e) && Va(e) == Ir;
|
|
177
|
+
}
|
|
178
|
+
/**!
|
|
179
|
+
* Sortable 1.15.6
|
|
180
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
181
|
+
* @author owenm <owen23355@gmail.com>
|
|
182
|
+
* @license MIT
|
|
183
|
+
*/
|
|
184
|
+
function Ea(e, t) {
|
|
185
|
+
var a = Object.keys(e);
|
|
186
|
+
if (Object.getOwnPropertySymbols) {
|
|
187
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
188
|
+
t && (n = n.filter(function(l) {
|
|
189
|
+
return Object.getOwnPropertyDescriptor(e, l).enumerable;
|
|
190
|
+
})), a.push.apply(a, n);
|
|
191
|
+
}
|
|
192
|
+
return a;
|
|
193
|
+
}
|
|
194
|
+
function Ze(e) {
|
|
195
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
196
|
+
var a = arguments[t] != null ? arguments[t] : {};
|
|
197
|
+
t % 2 ? Ea(Object(a), !0).forEach(function(n) {
|
|
198
|
+
Or(e, n, a[n]);
|
|
199
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(a)) : Ea(Object(a)).forEach(function(n) {
|
|
200
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(a, n));
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return e;
|
|
204
|
+
}
|
|
205
|
+
function ln(e) {
|
|
206
|
+
"@babel/helpers - typeof";
|
|
207
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ln = function(t) {
|
|
208
|
+
return typeof t;
|
|
209
|
+
} : ln = function(t) {
|
|
210
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
211
|
+
}, ln(e);
|
|
212
|
+
}
|
|
213
|
+
function Or(e, t, a) {
|
|
214
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
215
|
+
value: a,
|
|
216
|
+
enumerable: !0,
|
|
217
|
+
configurable: !0,
|
|
218
|
+
writable: !0
|
|
219
|
+
}) : e[t] = a, e;
|
|
220
|
+
}
|
|
221
|
+
function et() {
|
|
222
|
+
return et = Object.assign || function(e) {
|
|
223
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
224
|
+
var a = arguments[t];
|
|
225
|
+
for (var n in a)
|
|
226
|
+
Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);
|
|
227
|
+
}
|
|
228
|
+
return e;
|
|
229
|
+
}, et.apply(this, arguments);
|
|
230
|
+
}
|
|
231
|
+
function $r(e, t) {
|
|
232
|
+
if (e == null) return {};
|
|
233
|
+
var a = {}, n = Object.keys(e), l, r;
|
|
234
|
+
for (r = 0; r < n.length; r++)
|
|
235
|
+
l = n[r], !(t.indexOf(l) >= 0) && (a[l] = e[l]);
|
|
236
|
+
return a;
|
|
237
|
+
}
|
|
238
|
+
function Mr(e, t) {
|
|
239
|
+
if (e == null) return {};
|
|
240
|
+
var a = $r(e, t), n, l;
|
|
241
|
+
if (Object.getOwnPropertySymbols) {
|
|
242
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
243
|
+
for (l = 0; l < r.length; l++)
|
|
244
|
+
n = r[l], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (a[n] = e[n]);
|
|
245
|
+
}
|
|
246
|
+
return a;
|
|
247
|
+
}
|
|
248
|
+
var Rr = "1.15.6";
|
|
249
|
+
function Qe(e) {
|
|
250
|
+
if (typeof window < "u" && window.navigator)
|
|
251
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
252
|
+
}
|
|
253
|
+
var tt = Qe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Bt = Qe(/Edge/i), Ca = Qe(/firefox/i), Mt = Qe(/safari/i) && !Qe(/chrome/i) && !Qe(/android/i), Wn = Qe(/iP(ad|od|hone)/i), Xa = Qe(/chrome/i) && Qe(/android/i), qa = {
|
|
254
|
+
capture: !1,
|
|
255
|
+
passive: !1
|
|
256
|
+
};
|
|
257
|
+
function ne(e, t, a) {
|
|
258
|
+
e.addEventListener(t, a, !tt && qa);
|
|
259
|
+
}
|
|
260
|
+
function te(e, t, a) {
|
|
261
|
+
e.removeEventListener(t, a, !tt && qa);
|
|
262
|
+
}
|
|
263
|
+
function mn(e, t) {
|
|
264
|
+
if (t) {
|
|
265
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
266
|
+
try {
|
|
267
|
+
if (e.matches)
|
|
268
|
+
return e.matches(t);
|
|
269
|
+
if (e.msMatchesSelector)
|
|
270
|
+
return e.msMatchesSelector(t);
|
|
271
|
+
if (e.webkitMatchesSelector)
|
|
272
|
+
return e.webkitMatchesSelector(t);
|
|
273
|
+
} catch {
|
|
274
|
+
return !1;
|
|
275
|
+
}
|
|
276
|
+
return !1;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function Wa(e) {
|
|
280
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
281
|
+
}
|
|
282
|
+
function Xe(e, t, a, n) {
|
|
283
|
+
if (e) {
|
|
284
|
+
a = a || document;
|
|
285
|
+
do {
|
|
286
|
+
if (t != null && (t[0] === ">" ? e.parentNode === a && mn(e, t) : mn(e, t)) || n && e === a)
|
|
287
|
+
return e;
|
|
288
|
+
if (e === a) break;
|
|
289
|
+
} while (e = Wa(e));
|
|
290
|
+
}
|
|
291
|
+
return null;
|
|
292
|
+
}
|
|
293
|
+
var xa = /\s+/g;
|
|
294
|
+
function Ne(e, t, a) {
|
|
295
|
+
if (e && t)
|
|
296
|
+
if (e.classList)
|
|
297
|
+
e.classList[a ? "add" : "remove"](t);
|
|
298
|
+
else {
|
|
299
|
+
var n = (" " + e.className + " ").replace(xa, " ").replace(" " + t + " ", " ");
|
|
300
|
+
e.className = (n + (a ? " " + t : "")).replace(xa, " ");
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function B(e, t, a) {
|
|
304
|
+
var n = e && e.style;
|
|
305
|
+
if (n) {
|
|
306
|
+
if (a === void 0)
|
|
307
|
+
return document.defaultView && document.defaultView.getComputedStyle ? a = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (a = e.currentStyle), t === void 0 ? a : a[t];
|
|
308
|
+
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = a + (typeof a == "string" ? "" : "px");
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function xt(e, t) {
|
|
312
|
+
var a = "";
|
|
313
|
+
if (typeof e == "string")
|
|
314
|
+
a = e;
|
|
315
|
+
else
|
|
316
|
+
do {
|
|
317
|
+
var n = B(e, "transform");
|
|
318
|
+
n && n !== "none" && (a = n + " " + a);
|
|
319
|
+
} while (!t && (e = e.parentNode));
|
|
320
|
+
var l = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
321
|
+
return l && new l(a);
|
|
322
|
+
}
|
|
323
|
+
function Ga(e, t, a) {
|
|
324
|
+
if (e) {
|
|
325
|
+
var n = e.getElementsByTagName(t), l = 0, r = n.length;
|
|
326
|
+
if (a)
|
|
327
|
+
for (; l < r; l++)
|
|
328
|
+
a(n[l], l);
|
|
329
|
+
return n;
|
|
330
|
+
}
|
|
331
|
+
return [];
|
|
332
|
+
}
|
|
333
|
+
function je() {
|
|
334
|
+
var e = document.scrollingElement;
|
|
335
|
+
return e || document.documentElement;
|
|
336
|
+
}
|
|
337
|
+
function Ee(e, t, a, n, l) {
|
|
338
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
339
|
+
var r, i, c, o, u, d, g;
|
|
340
|
+
if (e !== window && e.parentNode && e !== je() ? (r = e.getBoundingClientRect(), i = r.top, c = r.left, o = r.bottom, u = r.right, d = r.height, g = r.width) : (i = 0, c = 0, o = window.innerHeight, u = window.innerWidth, d = window.innerHeight, g = window.innerWidth), (t || a) && e !== window && (l = l || e.parentNode, !tt))
|
|
341
|
+
do
|
|
342
|
+
if (l && l.getBoundingClientRect && (B(l, "transform") !== "none" || a && B(l, "position") !== "static")) {
|
|
343
|
+
var p = l.getBoundingClientRect();
|
|
344
|
+
i -= p.top + parseInt(B(l, "border-top-width")), c -= p.left + parseInt(B(l, "border-left-width")), o = i + r.height, u = c + r.width;
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
while (l = l.parentNode);
|
|
348
|
+
if (n && e !== window) {
|
|
349
|
+
var m = xt(l || e), f = m && m.a, h = m && m.d;
|
|
350
|
+
m && (i /= h, c /= f, g /= f, d /= h, o = i + d, u = c + g);
|
|
351
|
+
}
|
|
352
|
+
return {
|
|
353
|
+
top: i,
|
|
354
|
+
left: c,
|
|
355
|
+
bottom: o,
|
|
356
|
+
right: u,
|
|
357
|
+
width: g,
|
|
358
|
+
height: d
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function Ta(e, t, a) {
|
|
363
|
+
for (var n = st(e, !0), l = Ee(e)[t]; n; ) {
|
|
364
|
+
var r = Ee(n)[a], i = void 0;
|
|
365
|
+
if (i = l >= r, !i) return n;
|
|
366
|
+
if (n === je()) break;
|
|
367
|
+
n = st(n, !1);
|
|
368
|
+
}
|
|
369
|
+
return !1;
|
|
370
|
+
}
|
|
371
|
+
function Tt(e, t, a, n) {
|
|
372
|
+
for (var l = 0, r = 0, i = e.children; r < i.length; ) {
|
|
373
|
+
if (i[r].style.display !== "none" && i[r] !== N.ghost && (n || i[r] !== N.dragged) && Xe(i[r], a.draggable, e, !1)) {
|
|
374
|
+
if (l === t)
|
|
375
|
+
return i[r];
|
|
376
|
+
l++;
|
|
377
|
+
}
|
|
378
|
+
r++;
|
|
379
|
+
}
|
|
380
|
+
return null;
|
|
381
|
+
}
|
|
382
|
+
function Gn(e, t) {
|
|
383
|
+
for (var a = e.lastElementChild; a && (a === N.ghost || B(a, "display") === "none" || t && !mn(a, t)); )
|
|
384
|
+
a = a.previousElementSibling;
|
|
385
|
+
return a || null;
|
|
386
|
+
}
|
|
387
|
+
function Fe(e, t) {
|
|
388
|
+
var a = 0;
|
|
389
|
+
if (!e || !e.parentNode)
|
|
390
|
+
return -1;
|
|
391
|
+
for (; e = e.previousElementSibling; )
|
|
392
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== N.clone && (!t || mn(e, t)) && a++;
|
|
393
|
+
return a;
|
|
394
|
+
}
|
|
395
|
+
function Aa(e) {
|
|
396
|
+
var t = 0, a = 0, n = je();
|
|
397
|
+
if (e)
|
|
398
|
+
do {
|
|
399
|
+
var l = xt(e), r = l.a, i = l.d;
|
|
400
|
+
t += e.scrollLeft * r, a += e.scrollTop * i;
|
|
401
|
+
} while (e !== n && (e = e.parentNode));
|
|
402
|
+
return [t, a];
|
|
403
|
+
}
|
|
404
|
+
function Pr(e, t) {
|
|
405
|
+
for (var a in e)
|
|
406
|
+
if (e.hasOwnProperty(a)) {
|
|
407
|
+
for (var n in t)
|
|
408
|
+
if (t.hasOwnProperty(n) && t[n] === e[a][n]) return Number(a);
|
|
409
|
+
}
|
|
410
|
+
return -1;
|
|
411
|
+
}
|
|
412
|
+
function st(e, t) {
|
|
413
|
+
if (!e || !e.getBoundingClientRect) return je();
|
|
414
|
+
var a = e, n = !1;
|
|
415
|
+
do
|
|
416
|
+
if (a.clientWidth < a.scrollWidth || a.clientHeight < a.scrollHeight) {
|
|
417
|
+
var l = B(a);
|
|
418
|
+
if (a.clientWidth < a.scrollWidth && (l.overflowX == "auto" || l.overflowX == "scroll") || a.clientHeight < a.scrollHeight && (l.overflowY == "auto" || l.overflowY == "scroll")) {
|
|
419
|
+
if (!a.getBoundingClientRect || a === document.body) return je();
|
|
420
|
+
if (n || t) return a;
|
|
421
|
+
n = !0;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
while (a = a.parentNode);
|
|
425
|
+
return je();
|
|
426
|
+
}
|
|
427
|
+
function Yr(e, t) {
|
|
428
|
+
if (e && t)
|
|
429
|
+
for (var a in t)
|
|
430
|
+
t.hasOwnProperty(a) && (e[a] = t[a]);
|
|
431
|
+
return e;
|
|
432
|
+
}
|
|
433
|
+
function kn(e, t) {
|
|
434
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
435
|
+
}
|
|
436
|
+
var Rt;
|
|
437
|
+
function ja(e, t) {
|
|
438
|
+
return function() {
|
|
439
|
+
if (!Rt) {
|
|
440
|
+
var a = arguments, n = this;
|
|
441
|
+
a.length === 1 ? e.call(n, a[0]) : e.apply(n, a), Rt = setTimeout(function() {
|
|
442
|
+
Rt = void 0;
|
|
443
|
+
}, t);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
function Lr() {
|
|
448
|
+
clearTimeout(Rt), Rt = void 0;
|
|
449
|
+
}
|
|
450
|
+
function Za(e, t, a) {
|
|
451
|
+
e.scrollLeft += t, e.scrollTop += a;
|
|
452
|
+
}
|
|
453
|
+
function Ka(e) {
|
|
454
|
+
var t = window.Polymer, a = window.jQuery || window.Zepto;
|
|
455
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : a ? a(e).clone(!0)[0] : e.cloneNode(!0);
|
|
456
|
+
}
|
|
457
|
+
function Ja(e, t, a) {
|
|
458
|
+
var n = {};
|
|
459
|
+
return Array.from(e.children).forEach(function(l) {
|
|
460
|
+
var r, i, c, o;
|
|
461
|
+
if (!(!Xe(l, t.draggable, e, !1) || l.animated || l === a)) {
|
|
462
|
+
var u = Ee(l);
|
|
463
|
+
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, u.left), n.top = Math.min((i = n.top) !== null && i !== void 0 ? i : 1 / 0, u.top), n.right = Math.max((c = n.right) !== null && c !== void 0 ? c : -1 / 0, u.right), n.bottom = Math.max((o = n.bottom) !== null && o !== void 0 ? o : -1 / 0, u.bottom);
|
|
464
|
+
}
|
|
465
|
+
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
466
|
+
}
|
|
467
|
+
var Ye = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
468
|
+
function Nr() {
|
|
469
|
+
var e = [], t;
|
|
470
|
+
return {
|
|
471
|
+
captureAnimationState: function() {
|
|
472
|
+
if (e = [], !!this.options.animation) {
|
|
473
|
+
var n = [].slice.call(this.el.children);
|
|
474
|
+
n.forEach(function(l) {
|
|
475
|
+
if (!(B(l, "display") === "none" || l === N.ghost)) {
|
|
476
|
+
e.push({
|
|
477
|
+
target: l,
|
|
478
|
+
rect: Ee(l)
|
|
479
|
+
});
|
|
480
|
+
var r = Ze({}, e[e.length - 1].rect);
|
|
481
|
+
if (l.thisAnimationDuration) {
|
|
482
|
+
var i = xt(l, !0);
|
|
483
|
+
i && (r.top -= i.f, r.left -= i.e);
|
|
484
|
+
}
|
|
485
|
+
l.fromRect = r;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
addAnimationState: function(n) {
|
|
491
|
+
e.push(n);
|
|
492
|
+
},
|
|
493
|
+
removeAnimationState: function(n) {
|
|
494
|
+
e.splice(Pr(e, {
|
|
495
|
+
target: n
|
|
496
|
+
}), 1);
|
|
497
|
+
},
|
|
498
|
+
animateAll: function(n) {
|
|
499
|
+
var l = this;
|
|
500
|
+
if (!this.options.animation) {
|
|
501
|
+
clearTimeout(t), typeof n == "function" && n();
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
var r = !1, i = 0;
|
|
505
|
+
e.forEach(function(c) {
|
|
506
|
+
var o = 0, u = c.target, d = u.fromRect, g = Ee(u), p = u.prevFromRect, m = u.prevToRect, f = c.rect, h = xt(u, !0);
|
|
507
|
+
h && (g.top -= h.f, g.left -= h.e), u.toRect = g, u.thisAnimationDuration && kn(p, g) && !kn(d, g) && // Make sure animatingRect is on line between toRect & fromRect
|
|
508
|
+
(f.top - g.top) / (f.left - g.left) === (d.top - g.top) / (d.left - g.left) && (o = Fr(f, p, m, l.options)), kn(g, d) || (u.prevFromRect = d, u.prevToRect = g, o || (o = l.options.animation), l.animate(u, f, g, o)), o && (r = !0, i = Math.max(i, o), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
509
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
510
|
+
}, o), u.thisAnimationDuration = o);
|
|
511
|
+
}), clearTimeout(t), r ? t = setTimeout(function() {
|
|
512
|
+
typeof n == "function" && n();
|
|
513
|
+
}, i) : typeof n == "function" && n(), e = [];
|
|
514
|
+
},
|
|
515
|
+
animate: function(n, l, r, i) {
|
|
516
|
+
if (i) {
|
|
517
|
+
B(n, "transition", ""), B(n, "transform", "");
|
|
518
|
+
var c = xt(this.el), o = c && c.a, u = c && c.d, d = (l.left - r.left) / (o || 1), g = (l.top - r.top) / (u || 1);
|
|
519
|
+
n.animatingX = !!d, n.animatingY = !!g, B(n, "transform", "translate3d(" + d + "px," + g + "px,0)"), this.forRepaintDummy = Br(n), B(n, "transition", "transform " + i + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
520
|
+
B(n, "transition", ""), B(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
521
|
+
}, i);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
function Br(e) {
|
|
527
|
+
return e.offsetWidth;
|
|
528
|
+
}
|
|
529
|
+
function Fr(e, t, a, n) {
|
|
530
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - a.top, 2) + Math.pow(t.left - a.left, 2)) * n.animation;
|
|
531
|
+
}
|
|
532
|
+
var Dt = [], In = {
|
|
533
|
+
initializeByDefault: !0
|
|
534
|
+
}, Ft = {
|
|
535
|
+
mount: function(t) {
|
|
536
|
+
for (var a in In)
|
|
537
|
+
In.hasOwnProperty(a) && !(a in t) && (t[a] = In[a]);
|
|
538
|
+
Dt.forEach(function(n) {
|
|
539
|
+
if (n.pluginName === t.pluginName)
|
|
540
|
+
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
541
|
+
}), Dt.push(t);
|
|
542
|
+
},
|
|
543
|
+
pluginEvent: function(t, a, n) {
|
|
544
|
+
var l = this;
|
|
545
|
+
this.eventCanceled = !1, n.cancel = function() {
|
|
546
|
+
l.eventCanceled = !0;
|
|
547
|
+
};
|
|
548
|
+
var r = t + "Global";
|
|
549
|
+
Dt.forEach(function(i) {
|
|
550
|
+
a[i.pluginName] && (a[i.pluginName][r] && a[i.pluginName][r](Ze({
|
|
551
|
+
sortable: a
|
|
552
|
+
}, n)), a.options[i.pluginName] && a[i.pluginName][t] && a[i.pluginName][t](Ze({
|
|
553
|
+
sortable: a
|
|
554
|
+
}, n)));
|
|
555
|
+
});
|
|
556
|
+
},
|
|
557
|
+
initializePlugins: function(t, a, n, l) {
|
|
558
|
+
Dt.forEach(function(c) {
|
|
559
|
+
var o = c.pluginName;
|
|
560
|
+
if (!(!t.options[o] && !c.initializeByDefault)) {
|
|
561
|
+
var u = new c(t, a, t.options);
|
|
562
|
+
u.sortable = t, u.options = t.options, t[o] = u, et(n, u.defaults);
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
for (var r in t.options)
|
|
566
|
+
if (t.options.hasOwnProperty(r)) {
|
|
567
|
+
var i = this.modifyOption(t, r, t.options[r]);
|
|
568
|
+
typeof i < "u" && (t.options[r] = i);
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
getEventProperties: function(t, a) {
|
|
572
|
+
var n = {};
|
|
573
|
+
return Dt.forEach(function(l) {
|
|
574
|
+
typeof l.eventProperties == "function" && et(n, l.eventProperties.call(a[l.pluginName], t));
|
|
575
|
+
}), n;
|
|
576
|
+
},
|
|
577
|
+
modifyOption: function(t, a, n) {
|
|
578
|
+
var l;
|
|
579
|
+
return Dt.forEach(function(r) {
|
|
580
|
+
t[r.pluginName] && r.optionListeners && typeof r.optionListeners[a] == "function" && (l = r.optionListeners[a].call(t[r.pluginName], n));
|
|
581
|
+
}), l;
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
function Ur(e) {
|
|
585
|
+
var t = e.sortable, a = e.rootEl, n = e.name, l = e.targetEl, r = e.cloneEl, i = e.toEl, c = e.fromEl, o = e.oldIndex, u = e.newIndex, d = e.oldDraggableIndex, g = e.newDraggableIndex, p = e.originalEvent, m = e.putSortable, f = e.extraEventProperties;
|
|
586
|
+
if (t = t || a && a[Ye], !!t) {
|
|
587
|
+
var h, x = t.options, b = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
588
|
+
window.CustomEvent && !tt && !Bt ? h = new CustomEvent(n, {
|
|
589
|
+
bubbles: !0,
|
|
590
|
+
cancelable: !0
|
|
591
|
+
}) : (h = document.createEvent("Event"), h.initEvent(n, !0, !0)), h.to = i || a, h.from = c || a, h.item = l || a, h.clone = r, h.oldIndex = o, h.newIndex = u, h.oldDraggableIndex = d, h.newDraggableIndex = g, h.originalEvent = p, h.pullMode = m ? m.lastPutMode : void 0;
|
|
592
|
+
var E = Ze(Ze({}, f), Ft.getEventProperties(n, t));
|
|
593
|
+
for (var Y in E)
|
|
594
|
+
h[Y] = E[Y];
|
|
595
|
+
a && a.dispatchEvent(h), x[b] && x[b].call(t, h);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
var Vr = ["evt"], Pe = function(t, a) {
|
|
599
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, l = n.evt, r = Mr(n, Vr);
|
|
600
|
+
Ft.pluginEvent.bind(N)(t, a, Ze({
|
|
601
|
+
dragEl: D,
|
|
602
|
+
parentEl: be,
|
|
603
|
+
ghostEl: X,
|
|
604
|
+
rootEl: pe,
|
|
605
|
+
nextEl: ht,
|
|
606
|
+
lastDownEl: rn,
|
|
607
|
+
cloneEl: me,
|
|
608
|
+
cloneHidden: ot,
|
|
609
|
+
dragStarted: kt,
|
|
610
|
+
putSortable: Te,
|
|
611
|
+
activeSortable: N.active,
|
|
612
|
+
originalEvent: l,
|
|
613
|
+
oldIndex: Ct,
|
|
614
|
+
oldDraggableIndex: Pt,
|
|
615
|
+
newIndex: Be,
|
|
616
|
+
newDraggableIndex: rt,
|
|
617
|
+
hideGhostForTarget: nl,
|
|
618
|
+
unhideGhostForTarget: al,
|
|
619
|
+
cloneNowHidden: function() {
|
|
620
|
+
ot = !0;
|
|
621
|
+
},
|
|
622
|
+
cloneNowShown: function() {
|
|
623
|
+
ot = !1;
|
|
624
|
+
},
|
|
625
|
+
dispatchSortableEvent: function(c) {
|
|
626
|
+
Ie({
|
|
627
|
+
sortable: a,
|
|
628
|
+
name: c,
|
|
629
|
+
originalEvent: l
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
}, r));
|
|
633
|
+
};
|
|
634
|
+
function Ie(e) {
|
|
635
|
+
Ur(Ze({
|
|
636
|
+
putSortable: Te,
|
|
637
|
+
cloneEl: me,
|
|
638
|
+
targetEl: D,
|
|
639
|
+
rootEl: pe,
|
|
640
|
+
oldIndex: Ct,
|
|
641
|
+
oldDraggableIndex: Pt,
|
|
642
|
+
newIndex: Be,
|
|
643
|
+
newDraggableIndex: rt
|
|
644
|
+
}, e));
|
|
645
|
+
}
|
|
646
|
+
var D, be, X, pe, ht, rn, me, ot, Ct, Be, Pt, rt, Qt, Te, Et = !1, yn = !1, bn = [], ft, ze, On, $n, ka, Ia, kt, _t, Yt, Lt = !1, en = !1, on, ke, Mn = [], Un = !1, Sn = [], Dn = typeof document < "u", tn = Wn, Oa = Bt || tt ? "cssFloat" : "float", Hr = Dn && !Xa && !Wn && "draggable" in document.createElement("div"), Qa = function() {
|
|
647
|
+
if (Dn) {
|
|
648
|
+
if (tt)
|
|
649
|
+
return !1;
|
|
650
|
+
var e = document.createElement("x");
|
|
651
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
652
|
+
}
|
|
653
|
+
}(), el = function(t, a) {
|
|
654
|
+
var n = B(t), l = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), r = Tt(t, 0, a), i = Tt(t, 1, a), c = r && B(r), o = i && B(i), u = c && parseInt(c.marginLeft) + parseInt(c.marginRight) + Ee(r).width, d = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + Ee(i).width;
|
|
655
|
+
if (n.display === "flex")
|
|
656
|
+
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
657
|
+
if (n.display === "grid")
|
|
658
|
+
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
659
|
+
if (r && c.float && c.float !== "none") {
|
|
660
|
+
var g = c.float === "left" ? "left" : "right";
|
|
661
|
+
return i && (o.clear === "both" || o.clear === g) ? "vertical" : "horizontal";
|
|
662
|
+
}
|
|
663
|
+
return r && (c.display === "block" || c.display === "flex" || c.display === "table" || c.display === "grid" || u >= l && n[Oa] === "none" || i && n[Oa] === "none" && u + d > l) ? "vertical" : "horizontal";
|
|
664
|
+
}, zr = function(t, a, n) {
|
|
665
|
+
var l = n ? t.left : t.top, r = n ? t.right : t.bottom, i = n ? t.width : t.height, c = n ? a.left : a.top, o = n ? a.right : a.bottom, u = n ? a.width : a.height;
|
|
666
|
+
return l === c || r === o || l + i / 2 === c + u / 2;
|
|
667
|
+
}, Xr = function(t, a) {
|
|
668
|
+
var n;
|
|
669
|
+
return bn.some(function(l) {
|
|
670
|
+
var r = l[Ye].options.emptyInsertThreshold;
|
|
671
|
+
if (!(!r || Gn(l))) {
|
|
672
|
+
var i = Ee(l), c = t >= i.left - r && t <= i.right + r, o = a >= i.top - r && a <= i.bottom + r;
|
|
673
|
+
if (c && o)
|
|
674
|
+
return n = l;
|
|
675
|
+
}
|
|
676
|
+
}), n;
|
|
677
|
+
}, tl = function(t) {
|
|
678
|
+
function a(r, i) {
|
|
679
|
+
return function(c, o, u, d) {
|
|
680
|
+
var g = c.options.group.name && o.options.group.name && c.options.group.name === o.options.group.name;
|
|
681
|
+
if (r == null && (i || g))
|
|
682
|
+
return !0;
|
|
683
|
+
if (r == null || r === !1)
|
|
684
|
+
return !1;
|
|
685
|
+
if (i && r === "clone")
|
|
686
|
+
return r;
|
|
687
|
+
if (typeof r == "function")
|
|
688
|
+
return a(r(c, o, u, d), i)(c, o, u, d);
|
|
689
|
+
var p = (i ? c : o).options.group.name;
|
|
690
|
+
return r === !0 || typeof r == "string" && r === p || r.join && r.indexOf(p) > -1;
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
var n = {}, l = t.group;
|
|
694
|
+
(!l || ln(l) != "object") && (l = {
|
|
695
|
+
name: l
|
|
696
|
+
}), n.name = l.name, n.checkPull = a(l.pull, !0), n.checkPut = a(l.put), n.revertClone = l.revertClone, t.group = n;
|
|
697
|
+
}, nl = function() {
|
|
698
|
+
!Qa && X && B(X, "display", "none");
|
|
699
|
+
}, al = function() {
|
|
700
|
+
!Qa && X && B(X, "display", "");
|
|
701
|
+
};
|
|
702
|
+
Dn && !Xa && document.addEventListener("click", function(e) {
|
|
703
|
+
if (yn)
|
|
704
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), yn = !1, !1;
|
|
705
|
+
}, !0);
|
|
706
|
+
var pt = function(t) {
|
|
707
|
+
if (D) {
|
|
708
|
+
t = t.touches ? t.touches[0] : t;
|
|
709
|
+
var a = Xr(t.clientX, t.clientY);
|
|
710
|
+
if (a) {
|
|
711
|
+
var n = {};
|
|
712
|
+
for (var l in t)
|
|
713
|
+
t.hasOwnProperty(l) && (n[l] = t[l]);
|
|
714
|
+
n.target = n.rootEl = a, n.preventDefault = void 0, n.stopPropagation = void 0, a[Ye]._onDragOver(n);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}, qr = function(t) {
|
|
718
|
+
D && D.parentNode[Ye]._isOutsideThisEl(t.target);
|
|
719
|
+
};
|
|
720
|
+
function N(e, t) {
|
|
721
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
722
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
723
|
+
this.el = e, this.options = t = et({}, t), e[Ye] = this;
|
|
724
|
+
var a = {
|
|
725
|
+
group: null,
|
|
726
|
+
sort: !0,
|
|
727
|
+
disabled: !1,
|
|
728
|
+
store: null,
|
|
729
|
+
handle: null,
|
|
730
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
731
|
+
swapThreshold: 1,
|
|
732
|
+
// percentage; 0 <= x <= 1
|
|
733
|
+
invertSwap: !1,
|
|
734
|
+
// invert always
|
|
735
|
+
invertedSwapThreshold: null,
|
|
736
|
+
// will be set to same as swapThreshold if default
|
|
737
|
+
removeCloneOnHide: !0,
|
|
738
|
+
direction: function() {
|
|
739
|
+
return el(e, this.options);
|
|
740
|
+
},
|
|
741
|
+
ghostClass: "sortable-ghost",
|
|
742
|
+
chosenClass: "sortable-chosen",
|
|
743
|
+
dragClass: "sortable-drag",
|
|
744
|
+
ignore: "a, img",
|
|
745
|
+
filter: null,
|
|
746
|
+
preventOnFilter: !0,
|
|
747
|
+
animation: 0,
|
|
748
|
+
easing: null,
|
|
749
|
+
setData: function(i, c) {
|
|
750
|
+
i.setData("Text", c.textContent);
|
|
751
|
+
},
|
|
752
|
+
dropBubble: !1,
|
|
753
|
+
dragoverBubble: !1,
|
|
754
|
+
dataIdAttr: "data-id",
|
|
755
|
+
delay: 0,
|
|
756
|
+
delayOnTouchOnly: !1,
|
|
757
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
758
|
+
forceFallback: !1,
|
|
759
|
+
fallbackClass: "sortable-fallback",
|
|
760
|
+
fallbackOnBody: !1,
|
|
761
|
+
fallbackTolerance: 0,
|
|
762
|
+
fallbackOffset: {
|
|
763
|
+
x: 0,
|
|
764
|
+
y: 0
|
|
765
|
+
},
|
|
766
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
767
|
+
supportPointer: N.supportPointer !== !1 && "PointerEvent" in window && (!Mt || Wn),
|
|
768
|
+
emptyInsertThreshold: 5
|
|
769
|
+
};
|
|
770
|
+
Ft.initializePlugins(this, e, a);
|
|
771
|
+
for (var n in a)
|
|
772
|
+
!(n in t) && (t[n] = a[n]);
|
|
773
|
+
tl(t);
|
|
774
|
+
for (var l in this)
|
|
775
|
+
l.charAt(0) === "_" && typeof this[l] == "function" && (this[l] = this[l].bind(this));
|
|
776
|
+
this.nativeDraggable = t.forceFallback ? !1 : Hr, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? ne(e, "pointerdown", this._onTapStart) : (ne(e, "mousedown", this._onTapStart), ne(e, "touchstart", this._onTapStart)), this.nativeDraggable && (ne(e, "dragover", this), ne(e, "dragenter", this)), bn.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), et(this, Nr());
|
|
777
|
+
}
|
|
778
|
+
N.prototype = /** @lends Sortable.prototype */
|
|
779
|
+
{
|
|
780
|
+
constructor: N,
|
|
781
|
+
_isOutsideThisEl: function(t) {
|
|
782
|
+
!this.el.contains(t) && t !== this.el && (_t = null);
|
|
783
|
+
},
|
|
784
|
+
_getDirection: function(t, a) {
|
|
785
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, a, D) : this.options.direction;
|
|
786
|
+
},
|
|
787
|
+
_onTapStart: function(t) {
|
|
788
|
+
if (t.cancelable) {
|
|
789
|
+
var a = this, n = this.el, l = this.options, r = l.preventOnFilter, i = t.type, c = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, o = (c || t).target, u = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || o, d = l.filter;
|
|
790
|
+
if (ei(n), !D && !(/mousedown|pointerdown/.test(i) && t.button !== 0 || l.disabled) && !u.isContentEditable && !(!this.nativeDraggable && Mt && o && o.tagName.toUpperCase() === "SELECT") && (o = Xe(o, l.draggable, n, !1), !(o && o.animated) && rn !== o)) {
|
|
791
|
+
if (Ct = Fe(o), Pt = Fe(o, l.draggable), typeof d == "function") {
|
|
792
|
+
if (d.call(this, t, o, this)) {
|
|
793
|
+
Ie({
|
|
794
|
+
sortable: a,
|
|
795
|
+
rootEl: u,
|
|
796
|
+
name: "filter",
|
|
797
|
+
targetEl: o,
|
|
798
|
+
toEl: n,
|
|
799
|
+
fromEl: n
|
|
800
|
+
}), Pe("filter", a, {
|
|
801
|
+
evt: t
|
|
802
|
+
}), r && t.preventDefault();
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
} else if (d && (d = d.split(",").some(function(g) {
|
|
806
|
+
if (g = Xe(u, g.trim(), n, !1), g)
|
|
807
|
+
return Ie({
|
|
808
|
+
sortable: a,
|
|
809
|
+
rootEl: g,
|
|
810
|
+
name: "filter",
|
|
811
|
+
targetEl: o,
|
|
812
|
+
fromEl: n,
|
|
813
|
+
toEl: n
|
|
814
|
+
}), Pe("filter", a, {
|
|
815
|
+
evt: t
|
|
816
|
+
}), !0;
|
|
817
|
+
}), d)) {
|
|
818
|
+
r && t.preventDefault();
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
l.handle && !Xe(u, l.handle, n, !1) || this._prepareDragStart(t, c, o);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
_prepareDragStart: function(t, a, n) {
|
|
826
|
+
var l = this, r = l.el, i = l.options, c = r.ownerDocument, o;
|
|
827
|
+
if (n && !D && n.parentNode === r) {
|
|
828
|
+
var u = Ee(n);
|
|
829
|
+
if (pe = r, D = n, be = D.parentNode, ht = D.nextSibling, rn = n, Qt = i.group, N.dragged = D, ft = {
|
|
830
|
+
target: D,
|
|
831
|
+
clientX: (a || t).clientX,
|
|
832
|
+
clientY: (a || t).clientY
|
|
833
|
+
}, ka = ft.clientX - u.left, Ia = ft.clientY - u.top, this._lastX = (a || t).clientX, this._lastY = (a || t).clientY, D.style["will-change"] = "all", o = function() {
|
|
834
|
+
if (Pe("delayEnded", l, {
|
|
835
|
+
evt: t
|
|
836
|
+
}), N.eventCanceled) {
|
|
837
|
+
l._onDrop();
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
l._disableDelayedDragEvents(), !Ca && l.nativeDraggable && (D.draggable = !0), l._triggerDragStart(t, a), Ie({
|
|
841
|
+
sortable: l,
|
|
842
|
+
name: "choose",
|
|
843
|
+
originalEvent: t
|
|
844
|
+
}), Ne(D, i.chosenClass, !0);
|
|
845
|
+
}, i.ignore.split(",").forEach(function(d) {
|
|
846
|
+
Ga(D, d.trim(), Rn);
|
|
847
|
+
}), ne(c, "dragover", pt), ne(c, "mousemove", pt), ne(c, "touchmove", pt), i.supportPointer ? (ne(c, "pointerup", l._onDrop), !this.nativeDraggable && ne(c, "pointercancel", l._onDrop)) : (ne(c, "mouseup", l._onDrop), ne(c, "touchend", l._onDrop), ne(c, "touchcancel", l._onDrop)), Ca && this.nativeDraggable && (this.options.touchStartThreshold = 4, D.draggable = !0), Pe("delayStart", this, {
|
|
848
|
+
evt: t
|
|
849
|
+
}), i.delay && (!i.delayOnTouchOnly || a) && (!this.nativeDraggable || !(Bt || tt))) {
|
|
850
|
+
if (N.eventCanceled) {
|
|
851
|
+
this._onDrop();
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
i.supportPointer ? (ne(c, "pointerup", l._disableDelayedDrag), ne(c, "pointercancel", l._disableDelayedDrag)) : (ne(c, "mouseup", l._disableDelayedDrag), ne(c, "touchend", l._disableDelayedDrag), ne(c, "touchcancel", l._disableDelayedDrag)), ne(c, "mousemove", l._delayedDragTouchMoveHandler), ne(c, "touchmove", l._delayedDragTouchMoveHandler), i.supportPointer && ne(c, "pointermove", l._delayedDragTouchMoveHandler), l._dragStartTimer = setTimeout(o, i.delay);
|
|
855
|
+
} else
|
|
856
|
+
o();
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
_delayedDragTouchMoveHandler: function(t) {
|
|
860
|
+
var a = t.touches ? t.touches[0] : t;
|
|
861
|
+
Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
862
|
+
},
|
|
863
|
+
_disableDelayedDrag: function() {
|
|
864
|
+
D && Rn(D), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
865
|
+
},
|
|
866
|
+
_disableDelayedDragEvents: function() {
|
|
867
|
+
var t = this.el.ownerDocument;
|
|
868
|
+
te(t, "mouseup", this._disableDelayedDrag), te(t, "touchend", this._disableDelayedDrag), te(t, "touchcancel", this._disableDelayedDrag), te(t, "pointerup", this._disableDelayedDrag), te(t, "pointercancel", this._disableDelayedDrag), te(t, "mousemove", this._delayedDragTouchMoveHandler), te(t, "touchmove", this._delayedDragTouchMoveHandler), te(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
869
|
+
},
|
|
870
|
+
_triggerDragStart: function(t, a) {
|
|
871
|
+
a = a || t.pointerType == "touch" && t, !this.nativeDraggable || a ? this.options.supportPointer ? ne(document, "pointermove", this._onTouchMove) : a ? ne(document, "touchmove", this._onTouchMove) : ne(document, "mousemove", this._onTouchMove) : (ne(D, "dragend", this), ne(pe, "dragstart", this._onDragStart));
|
|
872
|
+
try {
|
|
873
|
+
document.selection ? sn(function() {
|
|
874
|
+
document.selection.empty();
|
|
875
|
+
}) : window.getSelection().removeAllRanges();
|
|
876
|
+
} catch {
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
_dragStarted: function(t, a) {
|
|
880
|
+
if (Et = !1, pe && D) {
|
|
881
|
+
Pe("dragStarted", this, {
|
|
882
|
+
evt: a
|
|
883
|
+
}), this.nativeDraggable && ne(document, "dragover", qr);
|
|
884
|
+
var n = this.options;
|
|
885
|
+
!t && Ne(D, n.dragClass, !1), Ne(D, n.ghostClass, !0), N.active = this, t && this._appendGhost(), Ie({
|
|
886
|
+
sortable: this,
|
|
887
|
+
name: "start",
|
|
888
|
+
originalEvent: a
|
|
889
|
+
});
|
|
890
|
+
} else
|
|
891
|
+
this._nulling();
|
|
892
|
+
},
|
|
893
|
+
_emulateDragOver: function() {
|
|
894
|
+
if (ze) {
|
|
895
|
+
this._lastX = ze.clientX, this._lastY = ze.clientY, nl();
|
|
896
|
+
for (var t = document.elementFromPoint(ze.clientX, ze.clientY), a = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(ze.clientX, ze.clientY), t !== a); )
|
|
897
|
+
a = t;
|
|
898
|
+
if (D.parentNode[Ye]._isOutsideThisEl(t), a)
|
|
899
|
+
do {
|
|
900
|
+
if (a[Ye]) {
|
|
901
|
+
var n = void 0;
|
|
902
|
+
if (n = a[Ye]._onDragOver({
|
|
903
|
+
clientX: ze.clientX,
|
|
904
|
+
clientY: ze.clientY,
|
|
905
|
+
target: t,
|
|
906
|
+
rootEl: a
|
|
907
|
+
}), n && !this.options.dragoverBubble)
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
t = a;
|
|
911
|
+
} while (a = Wa(a));
|
|
912
|
+
al();
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
_onTouchMove: function(t) {
|
|
916
|
+
if (ft) {
|
|
917
|
+
var a = this.options, n = a.fallbackTolerance, l = a.fallbackOffset, r = t.touches ? t.touches[0] : t, i = X && xt(X, !0), c = X && i && i.a, o = X && i && i.d, u = tn && ke && Aa(ke), d = (r.clientX - ft.clientX + l.x) / (c || 1) + (u ? u[0] - Mn[0] : 0) / (c || 1), g = (r.clientY - ft.clientY + l.y) / (o || 1) + (u ? u[1] - Mn[1] : 0) / (o || 1);
|
|
918
|
+
if (!N.active && !Et) {
|
|
919
|
+
if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
|
|
920
|
+
return;
|
|
921
|
+
this._onDragStart(t, !0);
|
|
922
|
+
}
|
|
923
|
+
if (X) {
|
|
924
|
+
i ? (i.e += d - (On || 0), i.f += g - ($n || 0)) : i = {
|
|
925
|
+
a: 1,
|
|
926
|
+
b: 0,
|
|
927
|
+
c: 0,
|
|
928
|
+
d: 1,
|
|
929
|
+
e: d,
|
|
930
|
+
f: g
|
|
931
|
+
};
|
|
932
|
+
var p = "matrix(".concat(i.a, ",").concat(i.b, ",").concat(i.c, ",").concat(i.d, ",").concat(i.e, ",").concat(i.f, ")");
|
|
933
|
+
B(X, "webkitTransform", p), B(X, "mozTransform", p), B(X, "msTransform", p), B(X, "transform", p), On = d, $n = g, ze = r;
|
|
934
|
+
}
|
|
935
|
+
t.cancelable && t.preventDefault();
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
_appendGhost: function() {
|
|
939
|
+
if (!X) {
|
|
940
|
+
var t = this.options.fallbackOnBody ? document.body : pe, a = Ee(D, !0, tn, !0, t), n = this.options;
|
|
941
|
+
if (tn) {
|
|
942
|
+
for (ke = t; B(ke, "position") === "static" && B(ke, "transform") === "none" && ke !== document; )
|
|
943
|
+
ke = ke.parentNode;
|
|
944
|
+
ke !== document.body && ke !== document.documentElement ? (ke === document && (ke = je()), a.top += ke.scrollTop, a.left += ke.scrollLeft) : ke = je(), Mn = Aa(ke);
|
|
945
|
+
}
|
|
946
|
+
X = D.cloneNode(!0), Ne(X, n.ghostClass, !1), Ne(X, n.fallbackClass, !0), Ne(X, n.dragClass, !0), B(X, "transition", ""), B(X, "transform", ""), B(X, "box-sizing", "border-box"), B(X, "margin", 0), B(X, "top", a.top), B(X, "left", a.left), B(X, "width", a.width), B(X, "height", a.height), B(X, "opacity", "0.8"), B(X, "position", tn ? "absolute" : "fixed"), B(X, "zIndex", "100000"), B(X, "pointerEvents", "none"), N.ghost = X, t.appendChild(X), B(X, "transform-origin", ka / parseInt(X.style.width) * 100 + "% " + Ia / parseInt(X.style.height) * 100 + "%");
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
_onDragStart: function(t, a) {
|
|
950
|
+
var n = this, l = t.dataTransfer, r = n.options;
|
|
951
|
+
if (Pe("dragStart", this, {
|
|
952
|
+
evt: t
|
|
953
|
+
}), N.eventCanceled) {
|
|
954
|
+
this._onDrop();
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
Pe("setupClone", this), N.eventCanceled || (me = Ka(D), me.removeAttribute("id"), me.draggable = !1, me.style["will-change"] = "", this._hideClone(), Ne(me, this.options.chosenClass, !1), N.clone = me), n.cloneId = sn(function() {
|
|
958
|
+
Pe("clone", n), !N.eventCanceled && (n.options.removeCloneOnHide || pe.insertBefore(me, D), n._hideClone(), Ie({
|
|
959
|
+
sortable: n,
|
|
960
|
+
name: "clone"
|
|
961
|
+
}));
|
|
962
|
+
}), !a && Ne(D, r.dragClass, !0), a ? (yn = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (te(document, "mouseup", n._onDrop), te(document, "touchend", n._onDrop), te(document, "touchcancel", n._onDrop), l && (l.effectAllowed = "move", r.setData && r.setData.call(n, l, D)), ne(document, "drop", n), B(D, "transform", "translateZ(0)")), Et = !0, n._dragStartId = sn(n._dragStarted.bind(n, a, t)), ne(document, "selectstart", n), kt = !0, window.getSelection().removeAllRanges(), Mt && B(document.body, "user-select", "none");
|
|
963
|
+
},
|
|
964
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
965
|
+
_onDragOver: function(t) {
|
|
966
|
+
var a = this.el, n = t.target, l, r, i, c = this.options, o = c.group, u = N.active, d = Qt === o, g = c.sort, p = Te || u, m, f = this, h = !1;
|
|
967
|
+
if (Un) return;
|
|
968
|
+
function x(oe, ce) {
|
|
969
|
+
Pe(oe, f, Ze({
|
|
970
|
+
evt: t,
|
|
971
|
+
isOwner: d,
|
|
972
|
+
axis: m ? "vertical" : "horizontal",
|
|
973
|
+
revert: i,
|
|
974
|
+
dragRect: l,
|
|
975
|
+
targetRect: r,
|
|
976
|
+
canSort: g,
|
|
977
|
+
fromSortable: p,
|
|
978
|
+
target: n,
|
|
979
|
+
completed: E,
|
|
980
|
+
onMove: function(nt, bt) {
|
|
981
|
+
return nn(pe, a, D, l, nt, Ee(nt), t, bt);
|
|
982
|
+
},
|
|
983
|
+
changed: Y
|
|
984
|
+
}, ce));
|
|
985
|
+
}
|
|
986
|
+
function b() {
|
|
987
|
+
x("dragOverAnimationCapture"), f.captureAnimationState(), f !== p && p.captureAnimationState();
|
|
988
|
+
}
|
|
989
|
+
function E(oe) {
|
|
990
|
+
return x("dragOverCompleted", {
|
|
991
|
+
insertion: oe
|
|
992
|
+
}), oe && (d ? u._hideClone() : u._showClone(f), f !== p && (Ne(D, Te ? Te.options.ghostClass : u.options.ghostClass, !1), Ne(D, c.ghostClass, !0)), Te !== f && f !== N.active ? Te = f : f === N.active && Te && (Te = null), p === f && (f._ignoreWhileAnimating = n), f.animateAll(function() {
|
|
993
|
+
x("dragOverAnimationComplete"), f._ignoreWhileAnimating = null;
|
|
994
|
+
}), f !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (n === D && !D.animated || n === a && !n.animated) && (_t = null), !c.dragoverBubble && !t.rootEl && n !== document && (D.parentNode[Ye]._isOutsideThisEl(t.target), !oe && pt(t)), !c.dragoverBubble && t.stopPropagation && t.stopPropagation(), h = !0;
|
|
995
|
+
}
|
|
996
|
+
function Y() {
|
|
997
|
+
Be = Fe(D), rt = Fe(D, c.draggable), Ie({
|
|
998
|
+
sortable: f,
|
|
999
|
+
name: "change",
|
|
1000
|
+
toEl: a,
|
|
1001
|
+
newIndex: Be,
|
|
1002
|
+
newDraggableIndex: rt,
|
|
1003
|
+
originalEvent: t
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Xe(n, c.draggable, a, !0), x("dragOver"), N.eventCanceled) return h;
|
|
1007
|
+
if (D.contains(t.target) || n.animated && n.animatingX && n.animatingY || f._ignoreWhileAnimating === n)
|
|
1008
|
+
return E(!1);
|
|
1009
|
+
if (yn = !1, u && !c.disabled && (d ? g || (i = be !== pe) : Te === this || (this.lastPutMode = Qt.checkPull(this, u, D, t)) && o.checkPut(this, u, D, t))) {
|
|
1010
|
+
if (m = this._getDirection(t, n) === "vertical", l = Ee(D), x("dragOverValid"), N.eventCanceled) return h;
|
|
1011
|
+
if (i)
|
|
1012
|
+
return be = pe, b(), this._hideClone(), x("revert"), N.eventCanceled || (ht ? pe.insertBefore(D, ht) : pe.appendChild(D)), E(!0);
|
|
1013
|
+
var L = Gn(a, c.draggable);
|
|
1014
|
+
if (!L || Zr(t, m, this) && !L.animated) {
|
|
1015
|
+
if (L === D)
|
|
1016
|
+
return E(!1);
|
|
1017
|
+
if (L && a === t.target && (n = L), n && (r = Ee(n)), nn(pe, a, D, l, n, r, t, !!n) !== !1)
|
|
1018
|
+
return b(), L && L.nextSibling ? a.insertBefore(D, L.nextSibling) : a.appendChild(D), be = a, Y(), E(!0);
|
|
1019
|
+
} else if (L && jr(t, m, this)) {
|
|
1020
|
+
var P = Tt(a, 0, c, !0);
|
|
1021
|
+
if (P === D)
|
|
1022
|
+
return E(!1);
|
|
1023
|
+
if (n = P, r = Ee(n), nn(pe, a, D, l, n, r, t, !1) !== !1)
|
|
1024
|
+
return b(), a.insertBefore(D, P), be = a, Y(), E(!0);
|
|
1025
|
+
} else if (n.parentNode === a) {
|
|
1026
|
+
r = Ee(n);
|
|
1027
|
+
var j = 0, R, se = D.parentNode !== a, V = !zr(D.animated && D.toRect || l, n.animated && n.toRect || r, m), he = m ? "top" : "left", ye = Ta(n, "top", "top") || Ta(D, "top", "top"), Re = ye ? ye.scrollTop : void 0;
|
|
1028
|
+
_t !== n && (R = r[he], Lt = !1, en = !V && c.invertSwap || se), j = Kr(t, n, r, m, V ? 1 : c.swapThreshold, c.invertedSwapThreshold == null ? c.swapThreshold : c.invertedSwapThreshold, en, _t === n);
|
|
1029
|
+
var Ae;
|
|
1030
|
+
if (j !== 0) {
|
|
1031
|
+
var M = Fe(D);
|
|
1032
|
+
do
|
|
1033
|
+
M -= j, Ae = be.children[M];
|
|
1034
|
+
while (Ae && (B(Ae, "display") === "none" || Ae === X));
|
|
1035
|
+
}
|
|
1036
|
+
if (j === 0 || Ae === n)
|
|
1037
|
+
return E(!1);
|
|
1038
|
+
_t = n, Yt = j;
|
|
1039
|
+
var H = n.nextElementSibling, ee = !1;
|
|
1040
|
+
ee = j === 1;
|
|
1041
|
+
var re = nn(pe, a, D, l, n, r, t, ee);
|
|
1042
|
+
if (re !== !1)
|
|
1043
|
+
return (re === 1 || re === -1) && (ee = re === 1), Un = !0, setTimeout(Gr, 30), b(), ee && !H ? a.appendChild(D) : n.parentNode.insertBefore(D, ee ? H : n), ye && Za(ye, 0, Re - ye.scrollTop), be = D.parentNode, R !== void 0 && !en && (on = Math.abs(R - Ee(n)[he])), Y(), E(!0);
|
|
1044
|
+
}
|
|
1045
|
+
if (a.contains(D))
|
|
1046
|
+
return E(!1);
|
|
1047
|
+
}
|
|
1048
|
+
return !1;
|
|
1049
|
+
},
|
|
1050
|
+
_ignoreWhileAnimating: null,
|
|
1051
|
+
_offMoveEvents: function() {
|
|
1052
|
+
te(document, "mousemove", this._onTouchMove), te(document, "touchmove", this._onTouchMove), te(document, "pointermove", this._onTouchMove), te(document, "dragover", pt), te(document, "mousemove", pt), te(document, "touchmove", pt);
|
|
1053
|
+
},
|
|
1054
|
+
_offUpEvents: function() {
|
|
1055
|
+
var t = this.el.ownerDocument;
|
|
1056
|
+
te(t, "mouseup", this._onDrop), te(t, "touchend", this._onDrop), te(t, "pointerup", this._onDrop), te(t, "pointercancel", this._onDrop), te(t, "touchcancel", this._onDrop), te(document, "selectstart", this);
|
|
1057
|
+
},
|
|
1058
|
+
_onDrop: function(t) {
|
|
1059
|
+
var a = this.el, n = this.options;
|
|
1060
|
+
if (Be = Fe(D), rt = Fe(D, n.draggable), Pe("drop", this, {
|
|
1061
|
+
evt: t
|
|
1062
|
+
}), be = D && D.parentNode, Be = Fe(D), rt = Fe(D, n.draggable), N.eventCanceled) {
|
|
1063
|
+
this._nulling();
|
|
1064
|
+
return;
|
|
1065
|
+
}
|
|
1066
|
+
Et = !1, en = !1, Lt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Vn(this.cloneId), Vn(this._dragStartId), this.nativeDraggable && (te(document, "drop", this), te(a, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Mt && B(document.body, "user-select", ""), B(D, "transform", ""), t && (kt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), X && X.parentNode && X.parentNode.removeChild(X), (pe === be || Te && Te.lastPutMode !== "clone") && me && me.parentNode && me.parentNode.removeChild(me), D && (this.nativeDraggable && te(D, "dragend", this), Rn(D), D.style["will-change"] = "", kt && !Et && Ne(D, Te ? Te.options.ghostClass : this.options.ghostClass, !1), Ne(D, this.options.chosenClass, !1), Ie({
|
|
1067
|
+
sortable: this,
|
|
1068
|
+
name: "unchoose",
|
|
1069
|
+
toEl: be,
|
|
1070
|
+
newIndex: null,
|
|
1071
|
+
newDraggableIndex: null,
|
|
1072
|
+
originalEvent: t
|
|
1073
|
+
}), pe !== be ? (Be >= 0 && (Ie({
|
|
1074
|
+
rootEl: be,
|
|
1075
|
+
name: "add",
|
|
1076
|
+
toEl: be,
|
|
1077
|
+
fromEl: pe,
|
|
1078
|
+
originalEvent: t
|
|
1079
|
+
}), Ie({
|
|
1080
|
+
sortable: this,
|
|
1081
|
+
name: "remove",
|
|
1082
|
+
toEl: be,
|
|
1083
|
+
originalEvent: t
|
|
1084
|
+
}), Ie({
|
|
1085
|
+
rootEl: be,
|
|
1086
|
+
name: "sort",
|
|
1087
|
+
toEl: be,
|
|
1088
|
+
fromEl: pe,
|
|
1089
|
+
originalEvent: t
|
|
1090
|
+
}), Ie({
|
|
1091
|
+
sortable: this,
|
|
1092
|
+
name: "sort",
|
|
1093
|
+
toEl: be,
|
|
1094
|
+
originalEvent: t
|
|
1095
|
+
})), Te && Te.save()) : Be !== Ct && Be >= 0 && (Ie({
|
|
1096
|
+
sortable: this,
|
|
1097
|
+
name: "update",
|
|
1098
|
+
toEl: be,
|
|
1099
|
+
originalEvent: t
|
|
1100
|
+
}), Ie({
|
|
1101
|
+
sortable: this,
|
|
1102
|
+
name: "sort",
|
|
1103
|
+
toEl: be,
|
|
1104
|
+
originalEvent: t
|
|
1105
|
+
})), N.active && ((Be == null || Be === -1) && (Be = Ct, rt = Pt), Ie({
|
|
1106
|
+
sortable: this,
|
|
1107
|
+
name: "end",
|
|
1108
|
+
toEl: be,
|
|
1109
|
+
originalEvent: t
|
|
1110
|
+
}), this.save()))), this._nulling();
|
|
1111
|
+
},
|
|
1112
|
+
_nulling: function() {
|
|
1113
|
+
Pe("nulling", this), pe = D = be = X = ht = me = rn = ot = ft = ze = kt = Be = rt = Ct = Pt = _t = Yt = Te = Qt = N.dragged = N.ghost = N.clone = N.active = null, Sn.forEach(function(t) {
|
|
1114
|
+
t.checked = !0;
|
|
1115
|
+
}), Sn.length = On = $n = 0;
|
|
1116
|
+
},
|
|
1117
|
+
handleEvent: function(t) {
|
|
1118
|
+
switch (t.type) {
|
|
1119
|
+
case "drop":
|
|
1120
|
+
case "dragend":
|
|
1121
|
+
this._onDrop(t);
|
|
1122
|
+
break;
|
|
1123
|
+
case "dragenter":
|
|
1124
|
+
case "dragover":
|
|
1125
|
+
D && (this._onDragOver(t), Wr(t));
|
|
1126
|
+
break;
|
|
1127
|
+
case "selectstart":
|
|
1128
|
+
t.preventDefault();
|
|
1129
|
+
break;
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
* Serializes the item into an array of string.
|
|
1134
|
+
* @returns {String[]}
|
|
1135
|
+
*/
|
|
1136
|
+
toArray: function() {
|
|
1137
|
+
for (var t = [], a, n = this.el.children, l = 0, r = n.length, i = this.options; l < r; l++)
|
|
1138
|
+
a = n[l], Xe(a, i.draggable, this.el, !1) && t.push(a.getAttribute(i.dataIdAttr) || Qr(a));
|
|
1139
|
+
return t;
|
|
1140
|
+
},
|
|
1141
|
+
/**
|
|
1142
|
+
* Sorts the elements according to the array.
|
|
1143
|
+
* @param {String[]} order order of the items
|
|
1144
|
+
*/
|
|
1145
|
+
sort: function(t, a) {
|
|
1146
|
+
var n = {}, l = this.el;
|
|
1147
|
+
this.toArray().forEach(function(r, i) {
|
|
1148
|
+
var c = l.children[i];
|
|
1149
|
+
Xe(c, this.options.draggable, l, !1) && (n[r] = c);
|
|
1150
|
+
}, this), a && this.captureAnimationState(), t.forEach(function(r) {
|
|
1151
|
+
n[r] && (l.removeChild(n[r]), l.appendChild(n[r]));
|
|
1152
|
+
}), a && this.animateAll();
|
|
1153
|
+
},
|
|
1154
|
+
/**
|
|
1155
|
+
* Save the current sorting
|
|
1156
|
+
*/
|
|
1157
|
+
save: function() {
|
|
1158
|
+
var t = this.options.store;
|
|
1159
|
+
t && t.set && t.set(this);
|
|
1160
|
+
},
|
|
1161
|
+
/**
|
|
1162
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
1163
|
+
* @param {HTMLElement} el
|
|
1164
|
+
* @param {String} [selector] default: `options.draggable`
|
|
1165
|
+
* @returns {HTMLElement|null}
|
|
1166
|
+
*/
|
|
1167
|
+
closest: function(t, a) {
|
|
1168
|
+
return Xe(t, a || this.options.draggable, this.el, !1);
|
|
1169
|
+
},
|
|
1170
|
+
/**
|
|
1171
|
+
* Set/get option
|
|
1172
|
+
* @param {string} name
|
|
1173
|
+
* @param {*} [value]
|
|
1174
|
+
* @returns {*}
|
|
1175
|
+
*/
|
|
1176
|
+
option: function(t, a) {
|
|
1177
|
+
var n = this.options;
|
|
1178
|
+
if (a === void 0)
|
|
1179
|
+
return n[t];
|
|
1180
|
+
var l = Ft.modifyOption(this, t, a);
|
|
1181
|
+
typeof l < "u" ? n[t] = l : n[t] = a, t === "group" && tl(n);
|
|
1182
|
+
},
|
|
1183
|
+
/**
|
|
1184
|
+
* Destroy
|
|
1185
|
+
*/
|
|
1186
|
+
destroy: function() {
|
|
1187
|
+
Pe("destroy", this);
|
|
1188
|
+
var t = this.el;
|
|
1189
|
+
t[Ye] = null, te(t, "mousedown", this._onTapStart), te(t, "touchstart", this._onTapStart), te(t, "pointerdown", this._onTapStart), this.nativeDraggable && (te(t, "dragover", this), te(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(a) {
|
|
1190
|
+
a.removeAttribute("draggable");
|
|
1191
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), bn.splice(bn.indexOf(this.el), 1), this.el = t = null;
|
|
1192
|
+
},
|
|
1193
|
+
_hideClone: function() {
|
|
1194
|
+
if (!ot) {
|
|
1195
|
+
if (Pe("hideClone", this), N.eventCanceled) return;
|
|
1196
|
+
B(me, "display", "none"), this.options.removeCloneOnHide && me.parentNode && me.parentNode.removeChild(me), ot = !0;
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
_showClone: function(t) {
|
|
1200
|
+
if (t.lastPutMode !== "clone") {
|
|
1201
|
+
this._hideClone();
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
if (ot) {
|
|
1205
|
+
if (Pe("showClone", this), N.eventCanceled) return;
|
|
1206
|
+
D.parentNode == pe && !this.options.group.revertClone ? pe.insertBefore(me, D) : ht ? pe.insertBefore(me, ht) : pe.appendChild(me), this.options.group.revertClone && this.animate(D, me), B(me, "display", ""), ot = !1;
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
function Wr(e) {
|
|
1211
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1212
|
+
}
|
|
1213
|
+
function nn(e, t, a, n, l, r, i, c) {
|
|
1214
|
+
var o, u = e[Ye], d = u.options.onMove, g;
|
|
1215
|
+
return window.CustomEvent && !tt && !Bt ? o = new CustomEvent("move", {
|
|
1216
|
+
bubbles: !0,
|
|
1217
|
+
cancelable: !0
|
|
1218
|
+
}) : (o = document.createEvent("Event"), o.initEvent("move", !0, !0)), o.to = t, o.from = e, o.dragged = a, o.draggedRect = n, o.related = l || t, o.relatedRect = r || Ee(t), o.willInsertAfter = c, o.originalEvent = i, e.dispatchEvent(o), d && (g = d.call(u, o, i)), g;
|
|
1219
|
+
}
|
|
1220
|
+
function Rn(e) {
|
|
1221
|
+
e.draggable = !1;
|
|
1222
|
+
}
|
|
1223
|
+
function Gr() {
|
|
1224
|
+
Un = !1;
|
|
1225
|
+
}
|
|
1226
|
+
function jr(e, t, a) {
|
|
1227
|
+
var n = Ee(Tt(a.el, 0, a.options, !0)), l = Ja(a.el, a.options, X), r = 10;
|
|
1228
|
+
return t ? e.clientX < l.left - r || e.clientY < n.top && e.clientX < n.right : e.clientY < l.top - r || e.clientY < n.bottom && e.clientX < n.left;
|
|
1229
|
+
}
|
|
1230
|
+
function Zr(e, t, a) {
|
|
1231
|
+
var n = Ee(Gn(a.el, a.options.draggable)), l = Ja(a.el, a.options, X), r = 10;
|
|
1232
|
+
return t ? e.clientX > l.right + r || e.clientY > n.bottom && e.clientX > n.left : e.clientY > l.bottom + r || e.clientX > n.right && e.clientY > n.top;
|
|
1233
|
+
}
|
|
1234
|
+
function Kr(e, t, a, n, l, r, i, c) {
|
|
1235
|
+
var o = n ? e.clientY : e.clientX, u = n ? a.height : a.width, d = n ? a.top : a.left, g = n ? a.bottom : a.right, p = !1;
|
|
1236
|
+
if (!i) {
|
|
1237
|
+
if (c && on < u * l) {
|
|
1238
|
+
if (!Lt && (Yt === 1 ? o > d + u * r / 2 : o < g - u * r / 2) && (Lt = !0), Lt)
|
|
1239
|
+
p = !0;
|
|
1240
|
+
else if (Yt === 1 ? o < d + on : o > g - on)
|
|
1241
|
+
return -Yt;
|
|
1242
|
+
} else if (o > d + u * (1 - l) / 2 && o < g - u * (1 - l) / 2)
|
|
1243
|
+
return Jr(t);
|
|
1244
|
+
}
|
|
1245
|
+
return p = p || i, p && (o < d + u * r / 2 || o > g - u * r / 2) ? o > d + u / 2 ? 1 : -1 : 0;
|
|
1246
|
+
}
|
|
1247
|
+
function Jr(e) {
|
|
1248
|
+
return Fe(D) < Fe(e) ? 1 : -1;
|
|
1249
|
+
}
|
|
1250
|
+
function Qr(e) {
|
|
1251
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, a = t.length, n = 0; a--; )
|
|
1252
|
+
n += t.charCodeAt(a);
|
|
1253
|
+
return n.toString(36);
|
|
1254
|
+
}
|
|
1255
|
+
function ei(e) {
|
|
1256
|
+
Sn.length = 0;
|
|
1257
|
+
for (var t = e.getElementsByTagName("input"), a = t.length; a--; ) {
|
|
1258
|
+
var n = t[a];
|
|
1259
|
+
n.checked && Sn.push(n);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
function sn(e) {
|
|
1263
|
+
return setTimeout(e, 0);
|
|
1264
|
+
}
|
|
1265
|
+
function Vn(e) {
|
|
1266
|
+
return clearTimeout(e);
|
|
1267
|
+
}
|
|
1268
|
+
Dn && ne(document, "touchmove", function(e) {
|
|
1269
|
+
(N.active || Et) && e.cancelable && e.preventDefault();
|
|
1270
|
+
});
|
|
1271
|
+
N.utils = {
|
|
1272
|
+
on: ne,
|
|
1273
|
+
off: te,
|
|
1274
|
+
css: B,
|
|
1275
|
+
find: Ga,
|
|
1276
|
+
is: function(t, a) {
|
|
1277
|
+
return !!Xe(t, a, t, !1);
|
|
1278
|
+
},
|
|
1279
|
+
extend: Yr,
|
|
1280
|
+
throttle: ja,
|
|
1281
|
+
closest: Xe,
|
|
1282
|
+
toggleClass: Ne,
|
|
1283
|
+
clone: Ka,
|
|
1284
|
+
index: Fe,
|
|
1285
|
+
nextTick: sn,
|
|
1286
|
+
cancelNextTick: Vn,
|
|
1287
|
+
detectDirection: el,
|
|
1288
|
+
getChild: Tt,
|
|
1289
|
+
expando: Ye
|
|
1290
|
+
};
|
|
1291
|
+
N.get = function(e) {
|
|
1292
|
+
return e[Ye];
|
|
1293
|
+
};
|
|
1294
|
+
N.mount = function() {
|
|
1295
|
+
for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++)
|
|
1296
|
+
t[a] = arguments[a];
|
|
1297
|
+
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
1298
|
+
if (!n.prototype || !n.prototype.constructor)
|
|
1299
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1300
|
+
n.utils && (N.utils = Ze(Ze({}, N.utils), n.utils)), Ft.mount(n);
|
|
1301
|
+
});
|
|
1302
|
+
};
|
|
1303
|
+
N.create = function(e, t) {
|
|
1304
|
+
return new N(e, t);
|
|
1305
|
+
};
|
|
1306
|
+
N.version = Rr;
|
|
1307
|
+
var _e = [], It, Hn, zn = !1, Pn, Yn, wn, Ot;
|
|
1308
|
+
function ti() {
|
|
1309
|
+
function e() {
|
|
1310
|
+
this.defaults = {
|
|
1311
|
+
scroll: !0,
|
|
1312
|
+
forceAutoScrollFallback: !1,
|
|
1313
|
+
scrollSensitivity: 30,
|
|
1314
|
+
scrollSpeed: 10,
|
|
1315
|
+
bubbleScroll: !0
|
|
1316
|
+
};
|
|
1317
|
+
for (var t in this)
|
|
1318
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1319
|
+
}
|
|
1320
|
+
return e.prototype = {
|
|
1321
|
+
dragStarted: function(a) {
|
|
1322
|
+
var n = a.originalEvent;
|
|
1323
|
+
this.sortable.nativeDraggable ? ne(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? ne(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? ne(document, "touchmove", this._handleFallbackAutoScroll) : ne(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1324
|
+
},
|
|
1325
|
+
dragOverCompleted: function(a) {
|
|
1326
|
+
var n = a.originalEvent;
|
|
1327
|
+
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1328
|
+
},
|
|
1329
|
+
drop: function() {
|
|
1330
|
+
this.sortable.nativeDraggable ? te(document, "dragover", this._handleAutoScroll) : (te(document, "pointermove", this._handleFallbackAutoScroll), te(document, "touchmove", this._handleFallbackAutoScroll), te(document, "mousemove", this._handleFallbackAutoScroll)), $a(), un(), Lr();
|
|
1331
|
+
},
|
|
1332
|
+
nulling: function() {
|
|
1333
|
+
wn = Hn = It = zn = Ot = Pn = Yn = null, _e.length = 0;
|
|
1334
|
+
},
|
|
1335
|
+
_handleFallbackAutoScroll: function(a) {
|
|
1336
|
+
this._handleAutoScroll(a, !0);
|
|
1337
|
+
},
|
|
1338
|
+
_handleAutoScroll: function(a, n) {
|
|
1339
|
+
var l = this, r = (a.touches ? a.touches[0] : a).clientX, i = (a.touches ? a.touches[0] : a).clientY, c = document.elementFromPoint(r, i);
|
|
1340
|
+
if (wn = a, n || this.options.forceAutoScrollFallback || Bt || tt || Mt) {
|
|
1341
|
+
Ln(a, this.options, c, n);
|
|
1342
|
+
var o = st(c, !0);
|
|
1343
|
+
zn && (!Ot || r !== Pn || i !== Yn) && (Ot && $a(), Ot = setInterval(function() {
|
|
1344
|
+
var u = st(document.elementFromPoint(r, i), !0);
|
|
1345
|
+
u !== o && (o = u, un()), Ln(a, l.options, u, n);
|
|
1346
|
+
}, 10), Pn = r, Yn = i);
|
|
1347
|
+
} else {
|
|
1348
|
+
if (!this.options.bubbleScroll || st(c, !0) === je()) {
|
|
1349
|
+
un();
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
Ln(a, this.options, st(c, !1), !1);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}, et(e, {
|
|
1356
|
+
pluginName: "scroll",
|
|
1357
|
+
initializeByDefault: !0
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
function un() {
|
|
1361
|
+
_e.forEach(function(e) {
|
|
1362
|
+
clearInterval(e.pid);
|
|
1363
|
+
}), _e = [];
|
|
1364
|
+
}
|
|
1365
|
+
function $a() {
|
|
1366
|
+
clearInterval(Ot);
|
|
1367
|
+
}
|
|
1368
|
+
var Ln = ja(function(e, t, a, n) {
|
|
1369
|
+
if (t.scroll) {
|
|
1370
|
+
var l = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, i = t.scrollSensitivity, c = t.scrollSpeed, o = je(), u = !1, d;
|
|
1371
|
+
Hn !== a && (Hn = a, un(), It = t.scroll, d = t.scrollFn, It === !0 && (It = st(a, !0)));
|
|
1372
|
+
var g = 0, p = It;
|
|
1373
|
+
do {
|
|
1374
|
+
var m = p, f = Ee(m), h = f.top, x = f.bottom, b = f.left, E = f.right, Y = f.width, L = f.height, P = void 0, j = void 0, R = m.scrollWidth, se = m.scrollHeight, V = B(m), he = m.scrollLeft, ye = m.scrollTop;
|
|
1375
|
+
m === o ? (P = Y < R && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), j = L < se && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (P = Y < R && (V.overflowX === "auto" || V.overflowX === "scroll"), j = L < se && (V.overflowY === "auto" || V.overflowY === "scroll"));
|
|
1376
|
+
var Re = P && (Math.abs(E - l) <= i && he + Y < R) - (Math.abs(b - l) <= i && !!he), Ae = j && (Math.abs(x - r) <= i && ye + L < se) - (Math.abs(h - r) <= i && !!ye);
|
|
1377
|
+
if (!_e[g])
|
|
1378
|
+
for (var M = 0; M <= g; M++)
|
|
1379
|
+
_e[M] || (_e[M] = {});
|
|
1380
|
+
(_e[g].vx != Re || _e[g].vy != Ae || _e[g].el !== m) && (_e[g].el = m, _e[g].vx = Re, _e[g].vy = Ae, clearInterval(_e[g].pid), (Re != 0 || Ae != 0) && (u = !0, _e[g].pid = setInterval((function() {
|
|
1381
|
+
n && this.layer === 0 && N.active._onTouchMove(wn);
|
|
1382
|
+
var H = _e[this.layer].vy ? _e[this.layer].vy * c : 0, ee = _e[this.layer].vx ? _e[this.layer].vx * c : 0;
|
|
1383
|
+
typeof d == "function" && d.call(N.dragged.parentNode[Ye], ee, H, e, wn, _e[this.layer].el) !== "continue" || Za(_e[this.layer].el, ee, H);
|
|
1384
|
+
}).bind({
|
|
1385
|
+
layer: g
|
|
1386
|
+
}), 24))), g++;
|
|
1387
|
+
} while (t.bubbleScroll && p !== o && (p = st(p, !1)));
|
|
1388
|
+
zn = u;
|
|
1389
|
+
}
|
|
1390
|
+
}, 30), ll = function(t) {
|
|
1391
|
+
var a = t.originalEvent, n = t.putSortable, l = t.dragEl, r = t.activeSortable, i = t.dispatchSortableEvent, c = t.hideGhostForTarget, o = t.unhideGhostForTarget;
|
|
1392
|
+
if (a) {
|
|
1393
|
+
var u = n || r;
|
|
1394
|
+
c();
|
|
1395
|
+
var d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, g = document.elementFromPoint(d.clientX, d.clientY);
|
|
1396
|
+
o(), u && !u.el.contains(g) && (i("spill"), this.onSpill({
|
|
1397
|
+
dragEl: l,
|
|
1398
|
+
putSortable: n
|
|
1399
|
+
}));
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
function jn() {
|
|
1403
|
+
}
|
|
1404
|
+
jn.prototype = {
|
|
1405
|
+
startIndex: null,
|
|
1406
|
+
dragStart: function(t) {
|
|
1407
|
+
var a = t.oldDraggableIndex;
|
|
1408
|
+
this.startIndex = a;
|
|
1409
|
+
},
|
|
1410
|
+
onSpill: function(t) {
|
|
1411
|
+
var a = t.dragEl, n = t.putSortable;
|
|
1412
|
+
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1413
|
+
var l = Tt(this.sortable.el, this.startIndex, this.options);
|
|
1414
|
+
l ? this.sortable.el.insertBefore(a, l) : this.sortable.el.appendChild(a), this.sortable.animateAll(), n && n.animateAll();
|
|
1415
|
+
},
|
|
1416
|
+
drop: ll
|
|
1417
|
+
};
|
|
1418
|
+
et(jn, {
|
|
1419
|
+
pluginName: "revertOnSpill"
|
|
1420
|
+
});
|
|
1421
|
+
function Zn() {
|
|
1422
|
+
}
|
|
1423
|
+
Zn.prototype = {
|
|
1424
|
+
onSpill: function(t) {
|
|
1425
|
+
var a = t.dragEl, n = t.putSortable, l = n || this.sortable;
|
|
1426
|
+
l.captureAnimationState(), a.parentNode && a.parentNode.removeChild(a), l.animateAll();
|
|
1427
|
+
},
|
|
1428
|
+
drop: ll
|
|
1429
|
+
};
|
|
1430
|
+
et(Zn, {
|
|
1431
|
+
pluginName: "removeOnSpill"
|
|
1432
|
+
});
|
|
1433
|
+
N.mount(new ti());
|
|
1434
|
+
N.mount(Zn, jn);
|
|
1435
|
+
const ni = {};
|
|
1436
|
+
function ai(e, t) {
|
|
1437
|
+
const a = Se("el-card");
|
|
1438
|
+
return C(), ie(a, null, {
|
|
1439
|
+
default: W(() => [
|
|
1440
|
+
De(e.$slots, "content")
|
|
1441
|
+
]),
|
|
1442
|
+
_: 3
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
const li = /* @__PURE__ */ ut(ni, [["render", ai]]), ri = { class: "extra-button-content" }, ii = /* @__PURE__ */ Ke({
|
|
1446
|
+
__name: "header",
|
|
1447
|
+
props: {
|
|
1448
|
+
buttons: {
|
|
1449
|
+
type: Array,
|
|
1450
|
+
default: () => []
|
|
1451
|
+
},
|
|
1452
|
+
columns: {
|
|
1453
|
+
type: Array,
|
|
1454
|
+
default: () => []
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
emits: ["buttonClick"],
|
|
1458
|
+
setup(e, { emit: t }) {
|
|
1459
|
+
const a = e, n = Q([]), l = (r) => {
|
|
1460
|
+
var i;
|
|
1461
|
+
n.value = (i = r == null ? void 0 : r.filter((c) => (c == null ? void 0 : c.label) !== "" && (c == null ? void 0 : c.label) !== "操作")) == null ? void 0 : i.map((c) => ({
|
|
1462
|
+
label: (c == null ? void 0 : c.label) ?? "",
|
|
1463
|
+
value: "",
|
|
1464
|
+
name: (c == null ? void 0 : c.prop) ?? ""
|
|
1465
|
+
}));
|
|
1466
|
+
};
|
|
1467
|
+
return Xn(() => {
|
|
1468
|
+
l(a.columns);
|
|
1469
|
+
}), Ue(
|
|
1470
|
+
() => a.columns,
|
|
1471
|
+
() => {
|
|
1472
|
+
l(a.columns);
|
|
1473
|
+
},
|
|
1474
|
+
{ deep: !0, immediate: !0 }
|
|
1475
|
+
), (r, i) => (C(), q("div", ri, [
|
|
1476
|
+
De(r.$slots, "headerButton", {}, void 0, !0)
|
|
1477
|
+
]));
|
|
1478
|
+
}
|
|
1479
|
+
}), oi = /* @__PURE__ */ ut(ii, [["__scopeId", "data-v-aa461a2c"]]), si = {
|
|
1480
|
+
key: 0,
|
|
1481
|
+
class: "input-with-suggest"
|
|
1482
|
+
}, ui = ["onClick", "onMouseenter"], ci = /* @__PURE__ */ Ke({
|
|
1483
|
+
inheritAttrs: !1,
|
|
1484
|
+
__name: "index",
|
|
1485
|
+
props: {
|
|
1486
|
+
// 兼容两种传值方式:旧 value / 新 v-model(modelValue)
|
|
1487
|
+
value: [String, Number],
|
|
1488
|
+
modelValue: [String, Number],
|
|
1489
|
+
content: {
|
|
1490
|
+
type: Array,
|
|
1491
|
+
default: () => []
|
|
1492
|
+
},
|
|
1493
|
+
isEdit: {
|
|
1494
|
+
type: Boolean,
|
|
1495
|
+
default: !0
|
|
1496
|
+
},
|
|
1497
|
+
disabled: {
|
|
1498
|
+
type: Boolean,
|
|
1499
|
+
default: !1
|
|
1500
|
+
},
|
|
1501
|
+
appendShow: {
|
|
1502
|
+
type: Boolean,
|
|
1503
|
+
default: !1,
|
|
1504
|
+
required: !1
|
|
1505
|
+
},
|
|
1506
|
+
suggestList: {
|
|
1507
|
+
type: Array,
|
|
1508
|
+
default: () => []
|
|
1509
|
+
},
|
|
1510
|
+
loading: {
|
|
1511
|
+
type: Boolean,
|
|
1512
|
+
default: !1
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
emits: [
|
|
1516
|
+
"update:modelValue",
|
|
1517
|
+
"update:value",
|
|
1518
|
+
"change",
|
|
1519
|
+
"blurChange",
|
|
1520
|
+
"input",
|
|
1521
|
+
"selectSuggest",
|
|
1522
|
+
"blur",
|
|
1523
|
+
"focus"
|
|
1524
|
+
],
|
|
1525
|
+
setup(e, { emit: t }) {
|
|
1526
|
+
const a = e, n = t, l = Oe({
|
|
1527
|
+
get() {
|
|
1528
|
+
return a.modelValue ?? a.value ?? "";
|
|
1529
|
+
},
|
|
1530
|
+
set(b) {
|
|
1531
|
+
n("update:modelValue", b), n("update:value", b);
|
|
1532
|
+
}
|
|
1533
|
+
}), r = Q(l.value), i = Q(null), c = Q(null), o = Q(!1), u = Q(-1);
|
|
1534
|
+
Ue(() => l.value, (b) => {
|
|
1535
|
+
r.value = b ?? "";
|
|
1536
|
+
}, { immediate: !0 }), Ue(() => a.suggestList, (b) => {
|
|
1537
|
+
b && b.length > 0 && r.value ? (o.value = !0, u.value = -1) : o.value = !1;
|
|
1538
|
+
});
|
|
1539
|
+
const d = () => {
|
|
1540
|
+
n("blurChange"), n("change", r.value);
|
|
1541
|
+
}, g = (b) => {
|
|
1542
|
+
var Y;
|
|
1543
|
+
const E = b && typeof b == "object" ? ((Y = b == null ? void 0 : b.target) == null ? void 0 : Y.value) ?? "" : b;
|
|
1544
|
+
r.value = E, l.value = E, n("input", E), E && a.suggestList && a.suggestList.length > 0 ? (o.value = !0, u.value = -1) : E || (o.value = !1);
|
|
1545
|
+
}, p = (b) => {
|
|
1546
|
+
!o.value || a.suggestList.length === 0 || (b.key === "ArrowDown" ? (b.preventDefault(), u.value = Math.min(u.value + 1, a.suggestList.length - 1), m()) : b.key === "ArrowUp" ? (b.preventDefault(), u.value = Math.max(u.value - 1, -1), m()) : b.key === "Enter" && u.value >= 0 ? (b.preventDefault(), f(a.suggestList[u.value])) : b.key === "Escape" && (o.value = !1, u.value = -1));
|
|
1547
|
+
}, m = () => {
|
|
1548
|
+
Ge(() => {
|
|
1549
|
+
if (c.value && u.value >= 0) {
|
|
1550
|
+
const b = c.value.querySelectorAll(".suggest-item");
|
|
1551
|
+
b[u.value] && b[u.value].scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
}, f = (b) => {
|
|
1555
|
+
b && (r.value = b.label, l.value = b.label, o.value = !1, u.value = -1, n("selectSuggest", b), Ge(() => {
|
|
1556
|
+
var E, Y;
|
|
1557
|
+
try {
|
|
1558
|
+
(Y = (E = i.value) == null ? void 0 : E.focus) == null || Y.call(E);
|
|
1559
|
+
} catch {
|
|
1560
|
+
}
|
|
1561
|
+
}));
|
|
1562
|
+
}, h = (b) => {
|
|
1563
|
+
n("blur"), setTimeout(() => {
|
|
1564
|
+
o.value = !1, u.value = -1;
|
|
1565
|
+
}, 10);
|
|
1566
|
+
}, x = (b) => {
|
|
1567
|
+
n("focus"), r.value && a.suggestList && a.suggestList.length > 0 && (o.value = !0);
|
|
1568
|
+
};
|
|
1569
|
+
return (b, E) => {
|
|
1570
|
+
const Y = Se("el-input"), L = Se("el-popover");
|
|
1571
|
+
return Array.isArray(r.value) ? (C(), ie(Y, {
|
|
1572
|
+
key: 1,
|
|
1573
|
+
modelValue: r.value,
|
|
1574
|
+
"onUpdate:modelValue": E[2] || (E[2] = (P) => r.value = P),
|
|
1575
|
+
disabled: !(a != null && a.isEdit) || (a == null ? void 0 : a.disabled),
|
|
1576
|
+
clearable: "",
|
|
1577
|
+
onChange: d
|
|
1578
|
+
}, hn({ _: 2 }, [
|
|
1579
|
+
e.appendShow ? {
|
|
1580
|
+
name: "append",
|
|
1581
|
+
fn: W(() => [
|
|
1582
|
+
De(b.$slots, "append", {}, void 0, !0)
|
|
1583
|
+
]),
|
|
1584
|
+
key: "0"
|
|
1585
|
+
} : void 0
|
|
1586
|
+
]), 1032, ["modelValue", "disabled"])) : (C(), q("div", si, [
|
|
1587
|
+
Ce(L, {
|
|
1588
|
+
visible: o.value && e.suggestList.length > 0,
|
|
1589
|
+
trigger: "manual",
|
|
1590
|
+
placement: "bottom-start",
|
|
1591
|
+
teleported: !0,
|
|
1592
|
+
"show-arrow": !1,
|
|
1593
|
+
"popper-class": "input-suggest-popper"
|
|
1594
|
+
}, {
|
|
1595
|
+
reference: W(() => [
|
|
1596
|
+
Ce(Y, {
|
|
1597
|
+
modelValue: r.value,
|
|
1598
|
+
"onUpdate:modelValue": E[0] || (E[0] = (P) => r.value = P),
|
|
1599
|
+
disabled: !(a != null && a.isEdit) || (a == null ? void 0 : a.disabled),
|
|
1600
|
+
clearable: "",
|
|
1601
|
+
onChange: d,
|
|
1602
|
+
onInput: g,
|
|
1603
|
+
onKeydown: p,
|
|
1604
|
+
onBlur: h,
|
|
1605
|
+
onFocus: x,
|
|
1606
|
+
ref_key: "inputRef",
|
|
1607
|
+
ref: i
|
|
1608
|
+
}, hn({ _: 2 }, [
|
|
1609
|
+
e.appendShow ? {
|
|
1610
|
+
name: "append",
|
|
1611
|
+
fn: W(() => [
|
|
1612
|
+
De(b.$slots, "append", {}, void 0, !0)
|
|
1613
|
+
]),
|
|
1614
|
+
key: "0"
|
|
1615
|
+
} : void 0
|
|
1616
|
+
]), 1032, ["modelValue", "disabled"])
|
|
1617
|
+
]),
|
|
1618
|
+
default: W(() => [
|
|
1619
|
+
ue("div", {
|
|
1620
|
+
class: "suggest-dropdown",
|
|
1621
|
+
ref_key: "suggestDropdownRef",
|
|
1622
|
+
ref: c
|
|
1623
|
+
}, [
|
|
1624
|
+
(C(!0), q($e, null, Ve(e.suggestList, (P, j) => (C(), q("div", {
|
|
1625
|
+
key: j,
|
|
1626
|
+
class: Nt(["suggest-item", { highlight: j === u.value }]),
|
|
1627
|
+
onMousedown: E[1] || (E[1] = qe(() => {
|
|
1628
|
+
}, ["prevent", "stop"])),
|
|
1629
|
+
onClick: qe((R) => f(P), ["stop"]),
|
|
1630
|
+
onMouseenter: (R) => u.value = j
|
|
1631
|
+
}, Me(P == null ? void 0 : P.label), 43, ui))), 128))
|
|
1632
|
+
], 512)
|
|
1633
|
+
]),
|
|
1634
|
+
_: 3
|
|
1635
|
+
}, 8, ["visible"])
|
|
1636
|
+
]));
|
|
1637
|
+
};
|
|
1638
|
+
}
|
|
1639
|
+
}), Kn = /* @__PURE__ */ ut(ci, [["__scopeId", "data-v-6ca098f1"]]), gt = (e, t = /* @__PURE__ */ new WeakMap()) => {
|
|
1640
|
+
if (e === null || typeof e != "object")
|
|
1641
|
+
return e;
|
|
1642
|
+
if (t.has(e))
|
|
1643
|
+
return t.get(e);
|
|
1644
|
+
if ($l(e))
|
|
1645
|
+
return gt(e.value, t);
|
|
1646
|
+
if (Ml(e))
|
|
1647
|
+
return gt(Rl(e), t);
|
|
1648
|
+
if (e instanceof Date) return new Date(e);
|
|
1649
|
+
if (e instanceof RegExp) return new RegExp(e);
|
|
1650
|
+
if (Array.isArray(e)) {
|
|
1651
|
+
let n = [];
|
|
1652
|
+
t.set(e, n);
|
|
1653
|
+
for (let l = 0; l < e.length; l++)
|
|
1654
|
+
n[l] = gt(e[l], t);
|
|
1655
|
+
return n;
|
|
1656
|
+
}
|
|
1657
|
+
let a = {};
|
|
1658
|
+
t.set(e, a);
|
|
1659
|
+
for (const n of Object.keys(e))
|
|
1660
|
+
if (!(n.startsWith("__v_") || n === "__ob__") && typeof e[n] != "function")
|
|
1661
|
+
try {
|
|
1662
|
+
a[n] = gt(e[n], t);
|
|
1663
|
+
} catch (l) {
|
|
1664
|
+
console.warn(`克隆 ${n} 失败:`, l.message), a[n] = e[n];
|
|
1665
|
+
}
|
|
1666
|
+
return a;
|
|
1667
|
+
}, di = (e, t) => {
|
|
1668
|
+
}, Yo = (e, t) => {
|
|
1669
|
+
var i, c;
|
|
1670
|
+
let a;
|
|
1671
|
+
e.replaceAll(" ", `\r
|
|
1672
|
+
`).replaceAll(`
|
|
1673
|
+
`, `\r
|
|
1674
|
+
`).includes(`\r
|
|
1675
|
+
`) ? a = e.replaceAll(`
|
|
1676
|
+
`, `\r
|
|
1677
|
+
`).replaceAll(" ", `\r
|
|
1678
|
+
`).split(`\r
|
|
1679
|
+
`).filter((o) => o.trim() !== "") : a = e.replaceAll(" ", `\r
|
|
1680
|
+
`).split(`
|
|
1681
|
+
`).filter((o) => o.trim() !== ""), a = a == null ? void 0 : a.map((o) => (o = o == null ? void 0 : o.replaceAll("\r", ""), o));
|
|
1682
|
+
const n = [];
|
|
1683
|
+
let l = "", r = 0;
|
|
1684
|
+
for (const o of a) {
|
|
1685
|
+
r = r + 1;
|
|
1686
|
+
let u = o.trim(), d = l ? l + u : u, g = u.includes("{") || u.includes("[") || u.includes("【") || u.includes("(") || u.includes("(") || u.includes("=") || l && (l.includes("{") || l.includes("[") || l.includes("【") || l.includes("(") || l.includes("(") || l.includes("=")), p = d.split("{").length - 1 === d.split("}").length - 1 && d.split("【").length - 1 === d.split("】").length - 1 && d.split("[").length - 1 === d.split("]").length - 1 && d.split("(").length - 1 === d.split(")").length - 1 && d.split("(").length - 1 === d.split(")").length - 1, m = d[d.length - 1], f = (c = (i = a == null ? void 0 : a[r]) == null ? void 0 : i.trim()) == null ? void 0 : c[0], h = t == null ? void 0 : t.find((b) => b === m), x = t == null ? void 0 : t.find((b) => b === f);
|
|
1687
|
+
g ? p && !h && !x ? (n.push(d.replace(/\/\*[\s\S]*?\*\//g, "")), l = "") : l = d : !(t != null && t.find((b) => b === u[u.length - 1])) && !x ? n.push(u.replace(/\/\*[\s\S]*?\*\//g, "")) : l = u;
|
|
1688
|
+
}
|
|
1689
|
+
return (l == null ? void 0 : l.length) > 0 && n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), n;
|
|
1690
|
+
}, Lo = (e, t) => {
|
|
1691
|
+
var i, c, o, u;
|
|
1692
|
+
let a = e;
|
|
1693
|
+
if (a === null || typeof a != "string" && !Array.isArray(a))
|
|
1694
|
+
return [];
|
|
1695
|
+
const n = [];
|
|
1696
|
+
let l = "", r = 0;
|
|
1697
|
+
for (const d of a)
|
|
1698
|
+
r++, d.includes("{") || l.includes("{") || d.includes("[") || l.includes("[") || d.includes("【") || l.includes("【") || d.includes("(") || l.includes("(") || d.includes("(") || l.includes("(") ? (l += d.trim(), l.split("{").length - 1 === l.split("}").length - 1 && l.split("【").length - 1 === l.split("】").length - 1 && l.split("[").length - 1 === l.split("]").length - 1 && l.split("(").length - 1 === l.split(")").length - 1 && l.split("(").length - 1 === l.split(")").length - 1 && l.split("/*").length - 1 === l.split("*/").length - 1 && l[l.length - 1] === t && (l.split("'").length % 2 === 1 || ((i = l.split("'")) == null ? void 0 : i.length) === 1) && (l.split('"').length % 2 === 1 || ((c = l.split('"')) == null ? void 0 : c.length) === 1) ? (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "") : r === (e == null ? void 0 : e.length) && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : (l += d.trim(), (l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1]) === t && (l.split("'").length % 2 === 1 || ((o = l.split("'")) == null ? void 0 : o.length) === 1) && (l.split('"').length % 2 === 1 || ((u = l.split('"')) == null ? void 0 : u.length) === 1) && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = ""));
|
|
1699
|
+
return (l == null ? void 0 : l.length) !== 0 && n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), n;
|
|
1700
|
+
}, rl = (e) => {
|
|
1701
|
+
var l;
|
|
1702
|
+
if (e != null && e.minWidth) return e.minWidth;
|
|
1703
|
+
if ((e == null ? void 0 : e.prop) === "operate") return 50;
|
|
1704
|
+
const t = ((l = e == null ? void 0 : e.label) == null ? void 0 : l.length) || 5, a = document.documentElement.style.fontSize, n = t * parseFloat(a);
|
|
1705
|
+
return Math.min(Math.max(n, 100), 200);
|
|
1706
|
+
}, fi = (e) => {
|
|
1707
|
+
var r;
|
|
1708
|
+
let t = e;
|
|
1709
|
+
const a = [];
|
|
1710
|
+
let n = "", l = 0;
|
|
1711
|
+
for (const i of t)
|
|
1712
|
+
l++, i.includes("(") || n.includes("(") || i.includes(")") || n.includes(")") || i.includes("&") || n.includes("&") || i.includes("|") || n.includes("|") ? (n += i.trim(), ((r = mt(n)) == null ? void 0 : r[(n == null ? void 0 : n.length) - 1]) === ")" || mt(n).includes("||") || mt(n).includes("&&") ? (a.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "") : l === (e == null ? void 0 : e.length) && (a.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "")) : (n += i.trim(), a.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "");
|
|
1713
|
+
return (n == null ? void 0 : n.length) !== 0 && a.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), a;
|
|
1714
|
+
}, Ma = (e) => {
|
|
1715
|
+
var l;
|
|
1716
|
+
let t = (l = fi(e)) == null ? void 0 : l.map((r) => (r != null && r.includes("(") && (r = "(" + (r == null ? void 0 : r.replaceAll("(", ""))), r)), a = [], n = {};
|
|
1717
|
+
return t == null || t.forEach((r, i) => {
|
|
1718
|
+
var c, o;
|
|
1719
|
+
if (r != null && r.includes("(")) {
|
|
1720
|
+
let u = (c = r.slice(1, (r == null ? void 0 : r.length) - 1)) == null ? void 0 : c.split("#"), d = u[0].replaceAll("'", ""), g = (o = u[1]) == null ? void 0 : o.replaceAll("'", "");
|
|
1721
|
+
(d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) !== "!" ? n[d] = g : n[d == null ? void 0 : d.slice(0, (d == null ? void 0 : d.length) - 1)] = "!" + g;
|
|
1722
|
+
} else r === "&&" || r === "||" && (a.push(n), n = {});
|
|
1723
|
+
i === t.length - 1 && (a.push(n), n = {});
|
|
1724
|
+
}), a;
|
|
1725
|
+
}, pi = ["onClick"], hi = { style: { overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" } }, gi = { key: 1 }, vi = /* @__PURE__ */ Ke({
|
|
1726
|
+
__name: "index",
|
|
1727
|
+
props: {
|
|
1728
|
+
modelValue: {
|
|
1729
|
+
type: [String, Date],
|
|
1730
|
+
default: ""
|
|
1731
|
+
},
|
|
1732
|
+
placeholder: {
|
|
1733
|
+
type: String,
|
|
1734
|
+
default: "请选择下拉内容...",
|
|
1735
|
+
required: !1
|
|
1736
|
+
},
|
|
1737
|
+
content: {
|
|
1738
|
+
type: Array,
|
|
1739
|
+
default: () => []
|
|
1740
|
+
},
|
|
1741
|
+
isEdit: {
|
|
1742
|
+
type: Boolean,
|
|
1743
|
+
default: !0
|
|
1744
|
+
},
|
|
1745
|
+
disabled: {
|
|
1746
|
+
type: Boolean,
|
|
1747
|
+
default: !1
|
|
1748
|
+
},
|
|
1749
|
+
clearable: {
|
|
1750
|
+
type: Boolean,
|
|
1751
|
+
default: !0
|
|
1752
|
+
},
|
|
1753
|
+
optionUrl: {
|
|
1754
|
+
type: Object,
|
|
1755
|
+
default: () => {
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
configModel: {
|
|
1759
|
+
type: String,
|
|
1760
|
+
default: ""
|
|
1761
|
+
},
|
|
1762
|
+
selectedTagList: {
|
|
1763
|
+
type: Array,
|
|
1764
|
+
default: () => []
|
|
1765
|
+
},
|
|
1766
|
+
originalValue: {
|
|
1767
|
+
type: Array,
|
|
1768
|
+
default: () => []
|
|
1769
|
+
},
|
|
1770
|
+
loading: {
|
|
1771
|
+
type: Boolean,
|
|
1772
|
+
default: !1
|
|
1773
|
+
},
|
|
1774
|
+
wholeValue: {
|
|
1775
|
+
type: Object,
|
|
1776
|
+
default: () => {
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
emits: ["blurChange", "click", "create", "tagChange", "fixChangeValue", "mouseEnter", "update:modelValue", "change"],
|
|
1781
|
+
setup(e, { emit: t }) {
|
|
1782
|
+
const a = e, n = t, l = Q(a.modelValue), r = Q(), i = Q(!1), c = Q(), o = Q([]), u = Q(/* @__PURE__ */ new Map()), d = Q(null), g = Q(void 0), p = ["bottom-start", "top-start", "right-start", "left-start"];
|
|
1783
|
+
Xn(async () => {
|
|
1784
|
+
var ee, re;
|
|
1785
|
+
c.value = a == null ? void 0 : a.content, o.value = a == null ? void 0 : a.selectedTagList;
|
|
1786
|
+
const M = (ee = a == null ? void 0 : a.optionUrl) == null ? void 0 : ee.filter;
|
|
1787
|
+
if (M) {
|
|
1788
|
+
const oe = M.match(/@value=([^,()]+)/);
|
|
1789
|
+
oe && (l.value = oe[1]);
|
|
1790
|
+
}
|
|
1791
|
+
await Ge();
|
|
1792
|
+
const H = (re = d.value) == null ? void 0 : re.$el;
|
|
1793
|
+
g.value = (H == null ? void 0 : H.closest(".el-overlay")) ?? (H == null ? void 0 : H.closest(".el-dialog")) ?? document.body;
|
|
1794
|
+
});
|
|
1795
|
+
const m = (M) => {
|
|
1796
|
+
n("update:modelValue", M), n("change", M), l.value = M;
|
|
1797
|
+
}, f = () => {
|
|
1798
|
+
var M;
|
|
1799
|
+
Array.isArray(a == null ? void 0 : a.originalValue) && ((M = a == null ? void 0 : a.originalValue) == null ? void 0 : M.length) > 1 || (i.value = !0);
|
|
1800
|
+
}, h = () => {
|
|
1801
|
+
n("mouseEnter");
|
|
1802
|
+
}, x = () => {
|
|
1803
|
+
i.value = !1;
|
|
1804
|
+
}, b = () => {
|
|
1805
|
+
}, E = () => {
|
|
1806
|
+
let M = gt(c.value);
|
|
1807
|
+
M.push({
|
|
1808
|
+
label: r.value,
|
|
1809
|
+
value: r.value
|
|
1810
|
+
}), c.value = M, V.value ? l.value = [r.value] : l.value = r.value, i.value = !1, n("blurChange"), n("fixChangeValue");
|
|
1811
|
+
}, Y = Oe(() => {
|
|
1812
|
+
const M = [];
|
|
1813
|
+
return V.value && M.push("multiple"), M;
|
|
1814
|
+
}), L = (M) => {
|
|
1815
|
+
var re;
|
|
1816
|
+
const { value: H } = M;
|
|
1817
|
+
return Array.isArray(o.value) || (o.value = []), ((re = o.value) == null ? void 0 : re.find((oe) => H == oe)) && V.value ? "active" : "";
|
|
1818
|
+
}, P = (M) => {
|
|
1819
|
+
let H = gt(o.value);
|
|
1820
|
+
const ee = /* @__PURE__ */ new Set();
|
|
1821
|
+
for (let re = 0; re < M.length; re++) {
|
|
1822
|
+
const oe = M[re];
|
|
1823
|
+
ee.add(oe);
|
|
1824
|
+
}
|
|
1825
|
+
H = H.filter((re) => ee.has(re)), kr(o.value, H) || (o.value = H, n("tagChange", H));
|
|
1826
|
+
}, j = (M) => {
|
|
1827
|
+
const { value: H } = M, ee = gt(o.value), re = ee.findIndex((oe) => oe === H);
|
|
1828
|
+
return re >= 0 ? ee.splice(re, 1) : ee.push(H), ee;
|
|
1829
|
+
}, R = (M) => {
|
|
1830
|
+
if (!V.value)
|
|
1831
|
+
return;
|
|
1832
|
+
const H = j(M);
|
|
1833
|
+
o.value = H, n("tagChange", H);
|
|
1834
|
+
}, se = (M) => {
|
|
1835
|
+
n("blurChange"), V.value && P(M);
|
|
1836
|
+
}, V = Oe(() => {
|
|
1837
|
+
const M = a.optionUrl;
|
|
1838
|
+
return !!(M != null && M.multiple);
|
|
1839
|
+
}), he = Oe(() => {
|
|
1840
|
+
var M, H, ee;
|
|
1841
|
+
return !((M = a.optionUrl) != null && M.multipleLimit) && ((H = a.optionUrl) == null ? void 0 : H.multipleLimit) !== 0 ? 1 : parseInt((ee = a.optionUrl) == null ? void 0 : ee.multipleLimit);
|
|
1842
|
+
}), ye = Oe(() => {
|
|
1843
|
+
var M;
|
|
1844
|
+
return (M = c.value) == null ? void 0 : M.filter(
|
|
1845
|
+
(H, ee, re) => ee === re.findIndex((oe) => oe.value === H.value)
|
|
1846
|
+
);
|
|
1847
|
+
}), Re = (M) => {
|
|
1848
|
+
var re, oe, ce, He;
|
|
1849
|
+
if (!(M != null && M.value) || !(((re = a.optionUrl) == null ? void 0 : re.mainKey) && Array.isArray((oe = a.optionUrl) == null ? void 0 : oe.menus) && a.optionUrl.menus.length > 0) || !((He = (ce = a.optionUrl) == null ? void 0 : ce.words) != null && He.length)) return "";
|
|
1850
|
+
const ee = u.value.get(M.value);
|
|
1851
|
+
return ee !== void 0 ? ee : "加载中...";
|
|
1852
|
+
}, Ae = async () => {
|
|
1853
|
+
var M, H, ee, re, oe, ce, He, nt, bt, Ut, Vt, Ht, zt, Xt, qt;
|
|
1854
|
+
if (((H = (M = a.optionUrl) == null ? void 0 : M.allSelectionContents) == null ? void 0 : H.length) > 0) {
|
|
1855
|
+
let de = [], at = [], We = (ee = a.optionUrl) == null ? void 0 : ee.filterContent;
|
|
1856
|
+
Array.isArray(We) || (We = (oe = (re = We == null ? void 0 : We.replaceAll("(", "")) == null ? void 0 : re.replaceAll(")", "")) == null ? void 0 : oe.split("||")), We == null || We.forEach((K) => {
|
|
1857
|
+
var Le, Je, Gt;
|
|
1858
|
+
(K == null ? void 0 : K[0]) === "@" && (K = (Je = (Le = K == null ? void 0 : K.replace("(", "$R")) == null ? void 0 : Le.split("$R")) == null ? void 0 : Je[1], K = K == null ? void 0 : K.slice(0, (K == null ? void 0 : K.length) - 1)), at == null || at.push(Ma("(" + K + ")")), de == null || de.push(Object.keys((Gt = Ma("(" + K + ")")) == null ? void 0 : Gt[0]));
|
|
1859
|
+
}), de = de == null ? void 0 : de[0];
|
|
1860
|
+
let St = [];
|
|
1861
|
+
for (let K in (ce = a.optionUrl) == null ? void 0 : ce.contactValue)
|
|
1862
|
+
if (de != null && de.find((Le) => Le === K) || de != null && de.find((Le) => K == null ? void 0 : K.includes("." + Le))) {
|
|
1863
|
+
let Le = (de == null ? void 0 : de.find((Je) => Je === K)) ?? (de == null ? void 0 : de.find((Je) => K == null ? void 0 : K.includes("." + Je)));
|
|
1864
|
+
St.push({
|
|
1865
|
+
[Le]: (nt = (He = a.optionUrl) == null ? void 0 : He.contactValue) == null ? void 0 : nt[K]
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
let Wt = {};
|
|
1869
|
+
St == null || St.forEach((K) => {
|
|
1870
|
+
for (let Le in K)
|
|
1871
|
+
Wt[Le] = K == null ? void 0 : K[Le];
|
|
1872
|
+
});
|
|
1873
|
+
let _n = at == null ? void 0 : at.findIndex((K) => JSON.stringify(K == null ? void 0 : K[0]) === JSON.stringify(Wt));
|
|
1874
|
+
c.value = (Vt = (Ut = (bt = a.optionUrl) == null ? void 0 : bt.allSelectionContents) == null ? void 0 : Ut[_n]) == null ? void 0 : Vt.map((K) => ({
|
|
1875
|
+
label: K,
|
|
1876
|
+
value: K
|
|
1877
|
+
}));
|
|
1878
|
+
} else if (((zt = (Ht = a.optionUrl) == null ? void 0 : Ht.menus) == null ? void 0 : zt.length) > 0) {
|
|
1879
|
+
let de = await di(a.optionUrl, a == null ? void 0 : a.wholeValue);
|
|
1880
|
+
c.value = [...c.value, ...de ?? []], l.value = (qt = (Xt = c.value) == null ? void 0 : Xt[0]) == null ? void 0 : qt.value;
|
|
1881
|
+
}
|
|
1882
|
+
n("click");
|
|
1883
|
+
};
|
|
1884
|
+
return (M, H) => {
|
|
1885
|
+
const ee = Se("el-tooltip"), re = Se("el-option"), oe = Se("el-select");
|
|
1886
|
+
return i.value ? i.value ? (C(), ie(Kn, {
|
|
1887
|
+
key: 1,
|
|
1888
|
+
modelValue: r.value,
|
|
1889
|
+
"onUpdate:modelValue": H[0] || (H[0] = (ce) => r.value = ce),
|
|
1890
|
+
onChange: E,
|
|
1891
|
+
onBlur: x
|
|
1892
|
+
}, null, 8, ["modelValue"])) : ae("", !0) : (C(), ie(oe, {
|
|
1893
|
+
key: 0,
|
|
1894
|
+
ref_key: "selectRef",
|
|
1895
|
+
ref: d,
|
|
1896
|
+
class: Nt(["ss-select", Y.value]),
|
|
1897
|
+
loading: a == null ? void 0 : a.loading,
|
|
1898
|
+
"model-value": l.value,
|
|
1899
|
+
filterable: "",
|
|
1900
|
+
"allow-create": "true",
|
|
1901
|
+
"default-first-option": "true",
|
|
1902
|
+
multiple: V.value,
|
|
1903
|
+
"multiple-limit": he.value,
|
|
1904
|
+
clearable: e.clearable,
|
|
1905
|
+
placeholder: e.placeholder,
|
|
1906
|
+
style: { width: "100%" },
|
|
1907
|
+
disabled: !(a != null && a.isEdit) || (a == null ? void 0 : a.disabled),
|
|
1908
|
+
teleported: !0,
|
|
1909
|
+
"append-to": g.value,
|
|
1910
|
+
placement: "bottom-start",
|
|
1911
|
+
"fallback-placements": p,
|
|
1912
|
+
onBlur: b,
|
|
1913
|
+
onVisibleChange: Ae,
|
|
1914
|
+
"value-on-clear": "",
|
|
1915
|
+
onChange: se,
|
|
1916
|
+
onDblclick: f,
|
|
1917
|
+
onMouseenter: h,
|
|
1918
|
+
"onUpdate:modelValue": m
|
|
1919
|
+
}, {
|
|
1920
|
+
label: W(({ label: ce, value: He }) => [
|
|
1921
|
+
ue("div", {
|
|
1922
|
+
class: Nt(["option", [L({ value: He })]]),
|
|
1923
|
+
onClick: qe((nt) => R({ value: He }), ["stop"])
|
|
1924
|
+
}, [
|
|
1925
|
+
ue("div", hi, Me(ce), 1)
|
|
1926
|
+
], 10, pi)
|
|
1927
|
+
]),
|
|
1928
|
+
default: W(() => [
|
|
1929
|
+
(C(!0), q($e, null, Ve(ye.value, (ce) => (C(), ie(re, {
|
|
1930
|
+
key: ce.value,
|
|
1931
|
+
label: ce.label,
|
|
1932
|
+
value: ce.value
|
|
1933
|
+
}, {
|
|
1934
|
+
default: W(() => [
|
|
1935
|
+
Re(ce) ? (C(), ie(ee, {
|
|
1936
|
+
key: 0,
|
|
1937
|
+
placement: "right",
|
|
1938
|
+
effect: "dark",
|
|
1939
|
+
content: Re(ce),
|
|
1940
|
+
"raw-content": !0,
|
|
1941
|
+
offset: 50
|
|
1942
|
+
}, {
|
|
1943
|
+
default: W(() => [
|
|
1944
|
+
ue("span", null, Me(ce.label), 1)
|
|
1945
|
+
]),
|
|
1946
|
+
_: 2
|
|
1947
|
+
}, 1032, ["content"])) : (C(), q("span", gi, Me(ce.label), 1))
|
|
1948
|
+
]),
|
|
1949
|
+
_: 2
|
|
1950
|
+
}, 1032, ["label", "value"]))), 128))
|
|
1951
|
+
]),
|
|
1952
|
+
_: 1
|
|
1953
|
+
}, 8, ["loading", "class", "model-value", "multiple", "multiple-limit", "clearable", "placeholder", "disabled", "append-to"]));
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
}), il = /* @__PURE__ */ ut(vi, [["__scopeId", "data-v-f2fefbce"]]), mi = {
|
|
1957
|
+
INPUT: Kn,
|
|
1958
|
+
SELECT: il,
|
|
1959
|
+
BUTTON: an
|
|
1960
|
+
// 添加其他组件...
|
|
1961
|
+
};
|
|
1962
|
+
function ol(e) {
|
|
1963
|
+
return mi[e == null ? void 0 : e.toUpperCase()] || null;
|
|
1964
|
+
}
|
|
1965
|
+
const yi = ["title"], bi = /* @__PURE__ */ Ke({
|
|
1966
|
+
__name: "recurseCol",
|
|
1967
|
+
props: {
|
|
1968
|
+
column: {
|
|
1969
|
+
type: Object,
|
|
1970
|
+
default: {}
|
|
1971
|
+
},
|
|
1972
|
+
tableData: {
|
|
1973
|
+
type: Array,
|
|
1974
|
+
default: () => []
|
|
1975
|
+
}
|
|
1976
|
+
},
|
|
1977
|
+
setup(e) {
|
|
1978
|
+
return (t, a) => {
|
|
1979
|
+
var c, o, u, d, g, p, m, f, h, x;
|
|
1980
|
+
const n = Se("svg-icon"), l = Se("el-tooltip"), r = Se("RecurseCol", !0), i = Se("el-table-column");
|
|
1981
|
+
return e.column.isHidden ? ae("", !0) : (C(), ie(i, {
|
|
1982
|
+
key: 0,
|
|
1983
|
+
label: e.column.label,
|
|
1984
|
+
prop: e.column.prop,
|
|
1985
|
+
fixed: ((c = e.column) == null ? void 0 : c.prop) === "operate" ? "right" : (o = e.column) == null ? void 0 : o.fixed,
|
|
1986
|
+
align: "center",
|
|
1987
|
+
"header-align": (((d = (u = e.column) == null ? void 0 : u.children) == null ? void 0 : d.length) > 0, "center"),
|
|
1988
|
+
sortable: ((g = e.column) == null ? void 0 : g.prop) === "operate" || ((p = e.column) == null ? void 0 : p.label) === "操作" || Array.isArray((m = e.column) == null ? void 0 : m.children) && e.column.children.length > 0 ? !1 : ((f = e.column) == null ? void 0 : f.sortable) ?? !1 ? "custom" : !1,
|
|
1989
|
+
"show-overflow-tooltip": ((h = e.column) == null ? void 0 : h.showOverflowTooltip) ?? !0,
|
|
1990
|
+
"class-name": (((x = e.column) == null ? void 0 : x.isNotDrag) ?? !1) === !0 ? "is-not-drag recursive-column" : "is-drag recursive-column",
|
|
1991
|
+
"min-width": it(rl)(e.column)
|
|
1992
|
+
}, {
|
|
1993
|
+
header: W(() => [
|
|
1994
|
+
e.column.prop !== "operate" ? (C(), q("span", {
|
|
1995
|
+
key: 0,
|
|
1996
|
+
title: e.column.label
|
|
1997
|
+
}, Me(e.column.label), 9, yi)) : (C(), ie(l, {
|
|
1998
|
+
key: 1,
|
|
1999
|
+
content: "操作",
|
|
2000
|
+
placement: "left-start",
|
|
2001
|
+
effect: "light"
|
|
2002
|
+
}, {
|
|
2003
|
+
default: W(() => [
|
|
2004
|
+
Ce(n, {
|
|
2005
|
+
name: "operate",
|
|
2006
|
+
style: { width: "15px", height: "15px" }
|
|
2007
|
+
})
|
|
2008
|
+
]),
|
|
2009
|
+
_: 1
|
|
2010
|
+
}))
|
|
2011
|
+
]),
|
|
2012
|
+
default: W((b) => [
|
|
2013
|
+
De(t.$slots, "content", {
|
|
2014
|
+
row: b.row,
|
|
2015
|
+
column: b.column,
|
|
2016
|
+
$index: b.$index,
|
|
2017
|
+
scope: b
|
|
2018
|
+
}),
|
|
2019
|
+
(C(!0), q($e, null, Ve(e.column.children, (E, Y) => (C(), ie(r, {
|
|
2020
|
+
key: Y,
|
|
2021
|
+
column: E,
|
|
2022
|
+
tableData: e.tableData
|
|
2023
|
+
}, hn({ _: 2 }, [
|
|
2024
|
+
Ve(t.$slots, (L, P) => ({
|
|
2025
|
+
name: P,
|
|
2026
|
+
fn: W(({ row: j, column: R }) => [
|
|
2027
|
+
De(t.$slots, P, Ba({ ref_for: !0 }, j, {
|
|
2028
|
+
row: j,
|
|
2029
|
+
column: R,
|
|
2030
|
+
columnProp: E
|
|
2031
|
+
}))
|
|
2032
|
+
])
|
|
2033
|
+
}))
|
|
2034
|
+
]), 1032, ["column", "tableData"]))), 128))
|
|
2035
|
+
]),
|
|
2036
|
+
_: 3
|
|
2037
|
+
}, 8, ["label", "prop", "fixed", "header-align", "sortable", "show-overflow-tooltip", "class-name", "min-width"]));
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
}), yt = [
|
|
2041
|
+
{
|
|
2042
|
+
label: "输入框",
|
|
2043
|
+
value: "Input"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
label: "下拉框",
|
|
2047
|
+
value: "Select"
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
label: "日期选择器",
|
|
2051
|
+
value: "Date"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
label: "长文本",
|
|
2055
|
+
value: "TextArea"
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
label: "附件选择器",
|
|
2059
|
+
value: "Upload"
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
label: "富文本",
|
|
2063
|
+
value: "Quill"
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
label: "链接跳转",
|
|
2067
|
+
value: "Link"
|
|
2068
|
+
}
|
|
2069
|
+
], Si = [
|
|
2070
|
+
{
|
|
2071
|
+
key: "label",
|
|
2072
|
+
label: "标签名",
|
|
2073
|
+
type: "Input"
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
key: "prop",
|
|
2077
|
+
label: "属性名",
|
|
2078
|
+
type: "Input"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
key: "type",
|
|
2082
|
+
label: "类型",
|
|
2083
|
+
type: "Select",
|
|
2084
|
+
options: yt
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
key: "originalContent",
|
|
2088
|
+
label: "初始值",
|
|
2089
|
+
type: "Input"
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
key: "value",
|
|
2093
|
+
label: "固定值",
|
|
2094
|
+
type: "Input"
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
// 统一给表单组件添加显示隐藏字段
|
|
2098
|
+
key: "isFormColHidden",
|
|
2099
|
+
label: "是否隐藏",
|
|
2100
|
+
name: "是否隐藏",
|
|
2101
|
+
type: "radio",
|
|
2102
|
+
options: [
|
|
2103
|
+
{
|
|
2104
|
+
label: "否",
|
|
2105
|
+
value: !1
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
label: "是",
|
|
2109
|
+
value: !0
|
|
2110
|
+
}
|
|
2111
|
+
],
|
|
2112
|
+
value: !1
|
|
2113
|
+
}
|
|
2114
|
+
], wi = async () => [
|
|
2115
|
+
{
|
|
2116
|
+
key: "label",
|
|
2117
|
+
label: "标签名",
|
|
2118
|
+
type: "Input"
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
key: "prop",
|
|
2122
|
+
label: "属性名",
|
|
2123
|
+
type: "Input"
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
key: "type",
|
|
2127
|
+
label: "类型",
|
|
2128
|
+
type: "Select",
|
|
2129
|
+
options: yt
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
key: "multiple",
|
|
2133
|
+
label: "多选",
|
|
2134
|
+
default: !1,
|
|
2135
|
+
type: "Switch"
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
key: "originalContent",
|
|
2139
|
+
label: "初始值",
|
|
2140
|
+
type: "Select"
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
key: "selectRelateType",
|
|
2144
|
+
label: "下拉绑定类型",
|
|
2145
|
+
type: "Select",
|
|
2146
|
+
options: [
|
|
2147
|
+
{
|
|
2148
|
+
label: "关联绑定列",
|
|
2149
|
+
value: "关联绑定列"
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
label: "自定义绑定",
|
|
2153
|
+
value: "自定义绑定"
|
|
2154
|
+
}
|
|
2155
|
+
]
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
key: "menuSelect",
|
|
2159
|
+
label: "菜单选项",
|
|
2160
|
+
type: "cascader",
|
|
2161
|
+
options: []
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
key: "groupSelect",
|
|
2165
|
+
label: "组信息选项",
|
|
2166
|
+
type: "cascader",
|
|
2167
|
+
options: []
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
key: "contents",
|
|
2171
|
+
label: "选项值",
|
|
2172
|
+
type: "Input"
|
|
2173
|
+
}
|
|
2174
|
+
], Di = Oe(async () => await wi()), _i = [
|
|
2175
|
+
{
|
|
2176
|
+
key: "label",
|
|
2177
|
+
label: "标签名",
|
|
2178
|
+
type: "Input"
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
key: "prop",
|
|
2182
|
+
label: "属性名",
|
|
2183
|
+
type: "Input"
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
key: "type",
|
|
2187
|
+
label: "类型",
|
|
2188
|
+
type: "Select",
|
|
2189
|
+
options: yt
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
key: "originalContent",
|
|
2193
|
+
label: "初始值",
|
|
2194
|
+
type: "Date"
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
key: "isNewDate",
|
|
2198
|
+
label: "当前时间",
|
|
2199
|
+
type: "Switch",
|
|
2200
|
+
value: !1
|
|
2201
|
+
}
|
|
2202
|
+
], Ei = [
|
|
2203
|
+
{
|
|
2204
|
+
key: "label",
|
|
2205
|
+
label: "标签名",
|
|
2206
|
+
type: "Input"
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
key: "prop",
|
|
2210
|
+
label: "属性名",
|
|
2211
|
+
type: "Input"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
key: "type",
|
|
2215
|
+
label: "类型",
|
|
2216
|
+
type: "Select",
|
|
2217
|
+
options: yt
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
key: "originalContent",
|
|
2221
|
+
label: "初始值",
|
|
2222
|
+
type: "Input"
|
|
2223
|
+
}
|
|
2224
|
+
], Ra = [
|
|
2225
|
+
{
|
|
2226
|
+
key: "label",
|
|
2227
|
+
label: "标签名",
|
|
2228
|
+
type: "Input"
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
key: "prop",
|
|
2232
|
+
label: "属性名",
|
|
2233
|
+
type: "Input"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
key: "type",
|
|
2237
|
+
label: "类型",
|
|
2238
|
+
type: "Select",
|
|
2239
|
+
options: yt
|
|
2240
|
+
}
|
|
2241
|
+
], Ci = [
|
|
2242
|
+
{
|
|
2243
|
+
key: "label",
|
|
2244
|
+
label: "标签名",
|
|
2245
|
+
type: "Input"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
key: "prop",
|
|
2249
|
+
label: "属性名",
|
|
2250
|
+
type: "Input"
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
key: "type",
|
|
2254
|
+
label: "类型",
|
|
2255
|
+
type: "Select",
|
|
2256
|
+
options: yt
|
|
2257
|
+
}
|
|
2258
|
+
], xi = [
|
|
2259
|
+
{
|
|
2260
|
+
key: "label",
|
|
2261
|
+
label: "标签名",
|
|
2262
|
+
type: "Input"
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
key: "prop",
|
|
2266
|
+
label: "属性名",
|
|
2267
|
+
type: "Input"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
key: "type",
|
|
2271
|
+
label: "类型",
|
|
2272
|
+
type: "Select",
|
|
2273
|
+
options: yt
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
key: "value",
|
|
2277
|
+
label: "固定值",
|
|
2278
|
+
type: "Input"
|
|
2279
|
+
}
|
|
2280
|
+
], Nn = [
|
|
2281
|
+
{
|
|
2282
|
+
key: "Input",
|
|
2283
|
+
value: Si
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
key: "Select",
|
|
2287
|
+
value: Di
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
key: "Date",
|
|
2291
|
+
value: _i
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
key: "TextArea",
|
|
2295
|
+
value: Ei
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
key: "Upload",
|
|
2299
|
+
value: Ra
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
key: "DragUpload",
|
|
2303
|
+
value: Ra
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
key: "Quill",
|
|
2307
|
+
value: Ci
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
key: "Link",
|
|
2311
|
+
value: xi
|
|
2312
|
+
}
|
|
2313
|
+
], Ti = ["title"], Ai = /* @__PURE__ */ Ke({
|
|
2314
|
+
__name: "index",
|
|
2315
|
+
props: {
|
|
2316
|
+
column: {
|
|
2317
|
+
type: Object,
|
|
2318
|
+
default: {}
|
|
2319
|
+
},
|
|
2320
|
+
tableData: Array,
|
|
2321
|
+
isEditViewport: Boolean
|
|
2322
|
+
},
|
|
2323
|
+
emits: ["handleColEditChange", "handleColTypeChange"],
|
|
2324
|
+
setup(e, { emit: t }) {
|
|
2325
|
+
const a = e, n = t, l = Q(null), r = Oe(() => {
|
|
2326
|
+
var g;
|
|
2327
|
+
return (g = Nn == null ? void 0 : Nn.map((p) => ({
|
|
2328
|
+
value: p == null ? void 0 : p.key,
|
|
2329
|
+
label: p == null ? void 0 : p.key
|
|
2330
|
+
}))) == null ? void 0 : g.filter((p) => (p == null ? void 0 : p.value) !== "Upload");
|
|
2331
|
+
});
|
|
2332
|
+
Ue(() => a.column, (g) => {
|
|
2333
|
+
l.value = mt(g);
|
|
2334
|
+
}, { immediate: !0, deep: !0 });
|
|
2335
|
+
const i = (g, p, m) => {
|
|
2336
|
+
const f = m.property;
|
|
2337
|
+
return p[f] === g;
|
|
2338
|
+
}, c = (g, p) => {
|
|
2339
|
+
if (!g) return Ua.warning("标签不能为空");
|
|
2340
|
+
n("handleColEditChange", g, p);
|
|
2341
|
+
}, o = async (g, p) => {
|
|
2342
|
+
await Ge(), n("handleColTypeChange", g, p);
|
|
2343
|
+
}, u = (g, p) => g.reduce((m, f) => {
|
|
2344
|
+
const h = f == null ? void 0 : f[p];
|
|
2345
|
+
return m[h] || (m[h] = []), m[h].push(f), m;
|
|
2346
|
+
}, {}), d = (g) => {
|
|
2347
|
+
var m;
|
|
2348
|
+
const p = u(a == null ? void 0 : a.tableData, g == null ? void 0 : g.prop);
|
|
2349
|
+
return g != null && g.filterable ? (m = Object.keys(p)) == null ? void 0 : m.map((f) => ({
|
|
2350
|
+
text: f,
|
|
2351
|
+
value: f
|
|
2352
|
+
})) : !1;
|
|
2353
|
+
};
|
|
2354
|
+
return (g, p) => {
|
|
2355
|
+
var h, x, b, E, Y, L, P, j, R, se;
|
|
2356
|
+
const m = Se("svg-icon"), f = Se("el-table-column");
|
|
2357
|
+
return e.column.isTableColHidden ? ae("", !0) : (C(), ie(f, {
|
|
2358
|
+
key: 0,
|
|
2359
|
+
label: e.column.label,
|
|
2360
|
+
prop: e.column.prop,
|
|
2361
|
+
fixed: ((h = e.column) == null ? void 0 : h.prop) === "operate" ? "right" : (x = e.column) == null ? void 0 : x.fixed,
|
|
2362
|
+
align: "center",
|
|
2363
|
+
"header-align": (((E = (b = e.column) == null ? void 0 : b.children) == null ? void 0 : E.length) > 0, "center"),
|
|
2364
|
+
sortable: ((Y = e.column) == null ? void 0 : Y.prop) === "operate" ? !1 : (L = e.column) != null && L.sortable ? "custom" : !1,
|
|
2365
|
+
filters: (P = e.column) != null && P.filterable ? d(e.column) : null,
|
|
2366
|
+
"filter-method": i,
|
|
2367
|
+
"show-overflow-tooltip": ((j = e.column) == null ? void 0 : j.showOverflowTooltip) ?? !0,
|
|
2368
|
+
"class-name": ((R = e.column) == null ? void 0 : R.prop) === "operate" ? "action" : (((se = e.column) == null ? void 0 : se.isNotDrag) ?? !1) === !0 ? "is-not-drag" : "is-drag",
|
|
2369
|
+
"min-width": it(rl)(e.column)
|
|
2370
|
+
}, {
|
|
2371
|
+
header: W(() => [
|
|
2372
|
+
e.column.prop !== "operate" ? (C(), q($e, { key: 0 }, [
|
|
2373
|
+
e.column.operable && e.isEditViewport ? (C(), ie(Kn, {
|
|
2374
|
+
key: 0,
|
|
2375
|
+
value: l.value.label,
|
|
2376
|
+
appendShow: !0,
|
|
2377
|
+
class: "col-edit-input",
|
|
2378
|
+
onChange: p[1] || (p[1] = (V) => c(V, e.column))
|
|
2379
|
+
}, {
|
|
2380
|
+
append: W(() => {
|
|
2381
|
+
var V;
|
|
2382
|
+
return [
|
|
2383
|
+
Ce(il, {
|
|
2384
|
+
value: (V = e.column) == null ? void 0 : V.columnType,
|
|
2385
|
+
content: r.value,
|
|
2386
|
+
clearable: !1,
|
|
2387
|
+
placeholder: "类型",
|
|
2388
|
+
style: { width: "100%" },
|
|
2389
|
+
onChange: p[0] || (p[0] = (he) => o(he, e.column))
|
|
2390
|
+
}, null, 8, ["value", "content"])
|
|
2391
|
+
];
|
|
2392
|
+
}),
|
|
2393
|
+
_: 1
|
|
2394
|
+
}, 8, ["value"])) : (C(), q("span", {
|
|
2395
|
+
key: 1,
|
|
2396
|
+
title: e.column.label
|
|
2397
|
+
}, Me(e.column.label), 9, Ti))
|
|
2398
|
+
], 64)) : De(g.$slots, "operateHeader", { key: 1 })
|
|
2399
|
+
]),
|
|
2400
|
+
"filter-icon": W(() => {
|
|
2401
|
+
var V, he, ye, Re;
|
|
2402
|
+
return [
|
|
2403
|
+
(V = e.column) != null && V.filterable && ((he = e.column) == null ? void 0 : he.prop) !== "operate" ? (C(), ie(m, {
|
|
2404
|
+
key: 0,
|
|
2405
|
+
name: (ye = e.column) != null && ye.filterable && ((Re = e.column) == null ? void 0 : Re.prop) !== "operate" ? "colFilter" : "",
|
|
2406
|
+
class: "custom-filter-icon"
|
|
2407
|
+
}, null, 8, ["name"])) : (C(), ie(m, {
|
|
2408
|
+
key: 1,
|
|
2409
|
+
onClick: p[2] || (p[2] = qe(() => {
|
|
2410
|
+
}, ["stop"])),
|
|
2411
|
+
name: ""
|
|
2412
|
+
}))
|
|
2413
|
+
];
|
|
2414
|
+
}),
|
|
2415
|
+
default: W((V) => [
|
|
2416
|
+
De(g.$slots, "content", {
|
|
2417
|
+
row: V.row,
|
|
2418
|
+
column: V.column,
|
|
2419
|
+
$index: V.$index,
|
|
2420
|
+
scope: V
|
|
2421
|
+
}),
|
|
2422
|
+
(C(!0), q($e, null, Ve(e.column.children, (he, ye) => (C(), ie(bi, {
|
|
2423
|
+
key: ye,
|
|
2424
|
+
column: he,
|
|
2425
|
+
tableData: e.tableData
|
|
2426
|
+
}, hn({ _: 2 }, [
|
|
2427
|
+
Ve(g.$slots, (Re, Ae) => ({
|
|
2428
|
+
name: Ae,
|
|
2429
|
+
fn: W(({ row: M, column: H }) => [
|
|
2430
|
+
De(g.$slots, Ae, Ba({ ref_for: !0 }, M, {
|
|
2431
|
+
item: he,
|
|
2432
|
+
row: M,
|
|
2433
|
+
column: H
|
|
2434
|
+
}))
|
|
2435
|
+
])
|
|
2436
|
+
}))
|
|
2437
|
+
]), 1032, ["column", "tableData"]))), 128))
|
|
2438
|
+
]),
|
|
2439
|
+
_: 3
|
|
2440
|
+
}, 8, ["label", "prop", "fixed", "header-align", "sortable", "filters", "show-overflow-tooltip", "class-name", "min-width"]));
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2443
|
+
}), ki = Nl(Fn), { systemUrl: vt } = Bn(ki);
|
|
2444
|
+
let sl = vt.value === "" || !vt.value ? "http://222.92.178.198:63003" : vt.value;
|
|
2445
|
+
Ue(
|
|
2446
|
+
() => vt.value,
|
|
2447
|
+
async () => {
|
|
2448
|
+
var t, a;
|
|
2449
|
+
sl = vt.value === "" || !vt.value ? "http://222.92.178.198:63003" : vt.value;
|
|
2450
|
+
let e = await Bl({});
|
|
2451
|
+
if (((a = (t = e == null ? void 0 : e.data) == null ? void 0 : t.result) == null ? void 0 : a.length) === 0) {
|
|
2452
|
+
const n = Fl(Date.now());
|
|
2453
|
+
await Ul({
|
|
2454
|
+
userName: "admin",
|
|
2455
|
+
password: "123456",
|
|
2456
|
+
platName: "insofworks",
|
|
2457
|
+
platType: "browser",
|
|
2458
|
+
platVersion: "t1",
|
|
2459
|
+
platCreatedAt: n,
|
|
2460
|
+
platUpdatedAt: n
|
|
2461
|
+
});
|
|
2462
|
+
}
|
|
2463
|
+
},
|
|
2464
|
+
{ deep: !0, immediate: !0 }
|
|
2465
|
+
);
|
|
2466
|
+
function Ii(e) {
|
|
2467
|
+
return Ll.post(sl + "/platform/upload", e);
|
|
2468
|
+
}
|
|
2469
|
+
const Oi = {
|
|
2470
|
+
key: 0,
|
|
2471
|
+
class: "status-wrap"
|
|
2472
|
+
}, $i = /* @__PURE__ */ Ke({
|
|
2473
|
+
__name: "index",
|
|
2474
|
+
props: {
|
|
2475
|
+
showTag: {
|
|
2476
|
+
type: Boolean,
|
|
2477
|
+
default: !1
|
|
2478
|
+
}
|
|
2479
|
+
},
|
|
2480
|
+
setup(e) {
|
|
2481
|
+
return (t, a) => {
|
|
2482
|
+
const n = Se("el-card");
|
|
2483
|
+
return C(), q("div", null, [
|
|
2484
|
+
Ce(n, null, {
|
|
2485
|
+
header: W(() => [
|
|
2486
|
+
De(t.$slots, "header", {}, void 0, !0)
|
|
2487
|
+
]),
|
|
2488
|
+
footer: W(() => [
|
|
2489
|
+
De(t.$slots, "footer", {}, void 0, !0)
|
|
2490
|
+
]),
|
|
2491
|
+
default: W(() => [
|
|
2492
|
+
De(t.$slots, "content", {}, void 0, !0)
|
|
2493
|
+
]),
|
|
2494
|
+
_: 3
|
|
2495
|
+
}),
|
|
2496
|
+
e.showTag ? (C(), q("div", Oi, [
|
|
2497
|
+
De(t.$slots, "status", {}, void 0, !0)
|
|
2498
|
+
])) : ae("", !0)
|
|
2499
|
+
]);
|
|
2500
|
+
};
|
|
2501
|
+
}
|
|
2502
|
+
}), Mi = /* @__PURE__ */ ut($i, [["__scopeId", "data-v-793415be"]]), Ri = (e) => {
|
|
2503
|
+
const t = e == null ? void 0 : e.toLowerCase(), a = t == null ? void 0 : t.lastIndexOf(".");
|
|
2504
|
+
let n = t;
|
|
2505
|
+
return a >= 0 && (n = n == null ? void 0 : n.slice(a + 1)), n;
|
|
2506
|
+
}, Pi = [
|
|
2507
|
+
"cpt",
|
|
2508
|
+
"uv",
|
|
2509
|
+
"cyd",
|
|
2510
|
+
"txt",
|
|
2511
|
+
"obj",
|
|
2512
|
+
"stl",
|
|
2513
|
+
"mtl",
|
|
2514
|
+
"ls",
|
|
2515
|
+
"urdf",
|
|
2516
|
+
"docx",
|
|
2517
|
+
"csv",
|
|
2518
|
+
"xlsx",
|
|
2519
|
+
"pdf",
|
|
2520
|
+
"jpg",
|
|
2521
|
+
"png",
|
|
2522
|
+
"pptx",
|
|
2523
|
+
"mp4",
|
|
2524
|
+
"nc"
|
|
2525
|
+
], Yi = (e) => {
|
|
2526
|
+
if (!e)
|
|
2527
|
+
return !1;
|
|
2528
|
+
const t = Ri(e);
|
|
2529
|
+
return Pi.includes(t);
|
|
2530
|
+
};
|
|
2531
|
+
var cn = { exports: {} }, Li = cn.exports, Pa;
|
|
2532
|
+
function Ni() {
|
|
2533
|
+
return Pa || (Pa = 1, function(e, t) {
|
|
2534
|
+
(function(a, n) {
|
|
2535
|
+
e.exports = n();
|
|
2536
|
+
})(Li, function() {
|
|
2537
|
+
var a = "minute", n = /[+-]\d\d(?::?\d\d)?/g, l = /([+-]|\d\d)/g;
|
|
2538
|
+
return function(r, i, c) {
|
|
2539
|
+
var o = i.prototype;
|
|
2540
|
+
c.utc = function(h) {
|
|
2541
|
+
var x = { date: h, utc: !0, args: arguments };
|
|
2542
|
+
return new i(x);
|
|
2543
|
+
}, o.utc = function(h) {
|
|
2544
|
+
var x = c(this.toDate(), { locale: this.$L, utc: !0 });
|
|
2545
|
+
return h ? x.add(this.utcOffset(), a) : x;
|
|
2546
|
+
}, o.local = function() {
|
|
2547
|
+
return c(this.toDate(), { locale: this.$L, utc: !1 });
|
|
2548
|
+
};
|
|
2549
|
+
var u = o.parse;
|
|
2550
|
+
o.parse = function(h) {
|
|
2551
|
+
h.utc && (this.$u = !0), this.$utils().u(h.$offset) || (this.$offset = h.$offset), u.call(this, h);
|
|
2552
|
+
};
|
|
2553
|
+
var d = o.init;
|
|
2554
|
+
o.init = function() {
|
|
2555
|
+
if (this.$u) {
|
|
2556
|
+
var h = this.$d;
|
|
2557
|
+
this.$y = h.getUTCFullYear(), this.$M = h.getUTCMonth(), this.$D = h.getUTCDate(), this.$W = h.getUTCDay(), this.$H = h.getUTCHours(), this.$m = h.getUTCMinutes(), this.$s = h.getUTCSeconds(), this.$ms = h.getUTCMilliseconds();
|
|
2558
|
+
} else d.call(this);
|
|
2559
|
+
};
|
|
2560
|
+
var g = o.utcOffset;
|
|
2561
|
+
o.utcOffset = function(h, x) {
|
|
2562
|
+
var b = this.$utils().u;
|
|
2563
|
+
if (b(h)) return this.$u ? 0 : b(this.$offset) ? g.call(this) : this.$offset;
|
|
2564
|
+
if (typeof h == "string" && (h = function(P) {
|
|
2565
|
+
P === void 0 && (P = "");
|
|
2566
|
+
var j = P.match(n);
|
|
2567
|
+
if (!j) return null;
|
|
2568
|
+
var R = ("" + j[0]).match(l) || ["-", 0, 0], se = R[0], V = 60 * +R[1] + +R[2];
|
|
2569
|
+
return V === 0 ? 0 : se === "+" ? V : -V;
|
|
2570
|
+
}(h), h === null)) return this;
|
|
2571
|
+
var E = Math.abs(h) <= 16 ? 60 * h : h;
|
|
2572
|
+
if (E === 0) return this.utc(x);
|
|
2573
|
+
var Y = this.clone();
|
|
2574
|
+
if (x) return Y.$offset = E, Y.$u = !1, Y;
|
|
2575
|
+
var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
2576
|
+
return (Y = this.local().add(E + L, a)).$offset = E, Y.$x.$localOffset = L, Y;
|
|
2577
|
+
};
|
|
2578
|
+
var p = o.format;
|
|
2579
|
+
o.format = function(h) {
|
|
2580
|
+
var x = h || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
2581
|
+
return p.call(this, x);
|
|
2582
|
+
}, o.valueOf = function() {
|
|
2583
|
+
var h = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
2584
|
+
return this.$d.valueOf() - 6e4 * h;
|
|
2585
|
+
}, o.isUTC = function() {
|
|
2586
|
+
return !!this.$u;
|
|
2587
|
+
}, o.toISOString = function() {
|
|
2588
|
+
return this.toDate().toISOString();
|
|
2589
|
+
}, o.toString = function() {
|
|
2590
|
+
return this.toDate().toUTCString();
|
|
2591
|
+
};
|
|
2592
|
+
var m = o.toDate;
|
|
2593
|
+
o.toDate = function(h) {
|
|
2594
|
+
return h === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : m.call(this);
|
|
2595
|
+
};
|
|
2596
|
+
var f = o.diff;
|
|
2597
|
+
o.diff = function(h, x, b) {
|
|
2598
|
+
if (h && this.$u === h.$u) return f.call(this, h, x, b);
|
|
2599
|
+
var E = this.local(), Y = c(h).local();
|
|
2600
|
+
return f.call(E, Y, x, b);
|
|
2601
|
+
};
|
|
2602
|
+
};
|
|
2603
|
+
});
|
|
2604
|
+
}(cn)), cn.exports;
|
|
2605
|
+
}
|
|
2606
|
+
var Bi = Ni();
|
|
2607
|
+
const Fi = /* @__PURE__ */ qn(Bi);
|
|
2608
|
+
var dn = { exports: {} }, Ui = dn.exports, Ya;
|
|
2609
|
+
function Vi() {
|
|
2610
|
+
return Ya || (Ya = 1, function(e, t) {
|
|
2611
|
+
(function(a, n) {
|
|
2612
|
+
e.exports = n();
|
|
2613
|
+
})(Ui, function() {
|
|
2614
|
+
var a = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
|
|
2615
|
+
return function(l, r, i) {
|
|
2616
|
+
var c, o = function(p, m, f) {
|
|
2617
|
+
f === void 0 && (f = {});
|
|
2618
|
+
var h = new Date(p), x = function(b, E) {
|
|
2619
|
+
E === void 0 && (E = {});
|
|
2620
|
+
var Y = E.timeZoneName || "short", L = b + "|" + Y, P = n[L];
|
|
2621
|
+
return P || (P = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: Y }), n[L] = P), P;
|
|
2622
|
+
}(m, f);
|
|
2623
|
+
return x.formatToParts(h);
|
|
2624
|
+
}, u = function(p, m) {
|
|
2625
|
+
for (var f = o(p, m), h = [], x = 0; x < f.length; x += 1) {
|
|
2626
|
+
var b = f[x], E = b.type, Y = b.value, L = a[E];
|
|
2627
|
+
L >= 0 && (h[L] = parseInt(Y, 10));
|
|
2628
|
+
}
|
|
2629
|
+
var P = h[3], j = P === 24 ? 0 : P, R = h[0] + "-" + h[1] + "-" + h[2] + " " + j + ":" + h[4] + ":" + h[5] + ":000", se = +p;
|
|
2630
|
+
return (i.utc(R).valueOf() - (se -= se % 1e3)) / 6e4;
|
|
2631
|
+
}, d = r.prototype;
|
|
2632
|
+
d.tz = function(p, m) {
|
|
2633
|
+
p === void 0 && (p = c);
|
|
2634
|
+
var f, h = this.utcOffset(), x = this.toDate(), b = x.toLocaleString("en-US", { timeZone: p }), E = Math.round((x - new Date(b)) / 1e3 / 60), Y = 15 * -Math.round(x.getTimezoneOffset() / 15) - E;
|
|
2635
|
+
if (!Number(Y)) f = this.utcOffset(0, m);
|
|
2636
|
+
else if (f = i(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(Y, !0), m) {
|
|
2637
|
+
var L = f.utcOffset();
|
|
2638
|
+
f = f.add(h - L, "minute");
|
|
2639
|
+
}
|
|
2640
|
+
return f.$x.$timezone = p, f;
|
|
2641
|
+
}, d.offsetName = function(p) {
|
|
2642
|
+
var m = this.$x.$timezone || i.tz.guess(), f = o(this.valueOf(), m, { timeZoneName: p }).find(function(h) {
|
|
2643
|
+
return h.type.toLowerCase() === "timezonename";
|
|
2644
|
+
});
|
|
2645
|
+
return f && f.value;
|
|
2646
|
+
};
|
|
2647
|
+
var g = d.startOf;
|
|
2648
|
+
d.startOf = function(p, m) {
|
|
2649
|
+
if (!this.$x || !this.$x.$timezone) return g.call(this, p, m);
|
|
2650
|
+
var f = i(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
2651
|
+
return g.call(f, p, m).tz(this.$x.$timezone, !0);
|
|
2652
|
+
}, i.tz = function(p, m, f) {
|
|
2653
|
+
var h = f && m, x = f || m || c, b = u(+i(), x);
|
|
2654
|
+
if (typeof p != "string") return i(p).tz(x);
|
|
2655
|
+
var E = function(j, R, se) {
|
|
2656
|
+
var V = j - 60 * R * 1e3, he = u(V, se);
|
|
2657
|
+
if (R === he) return [V, R];
|
|
2658
|
+
var ye = u(V -= 60 * (he - R) * 1e3, se);
|
|
2659
|
+
return he === ye ? [V, he] : [j - 60 * Math.min(he, ye) * 1e3, Math.max(he, ye)];
|
|
2660
|
+
}(i.utc(p, h).valueOf(), b, x), Y = E[0], L = E[1], P = i(Y).utcOffset(L);
|
|
2661
|
+
return P.$x.$timezone = x, P;
|
|
2662
|
+
}, i.tz.guess = function() {
|
|
2663
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2664
|
+
}, i.tz.setDefault = function(p) {
|
|
2665
|
+
c = p;
|
|
2666
|
+
};
|
|
2667
|
+
};
|
|
2668
|
+
});
|
|
2669
|
+
}(dn)), dn.exports;
|
|
2670
|
+
}
|
|
2671
|
+
var Hi = Vi();
|
|
2672
|
+
const zi = /* @__PURE__ */ qn(Hi);
|
|
2673
|
+
var fn = { exports: {} }, Xi = fn.exports, La;
|
|
2674
|
+
function qi() {
|
|
2675
|
+
return La || (La = 1, function(e, t) {
|
|
2676
|
+
(function(a, n) {
|
|
2677
|
+
e.exports = n();
|
|
2678
|
+
})(Xi, function() {
|
|
2679
|
+
return function(a, n, l) {
|
|
2680
|
+
a = a || {};
|
|
2681
|
+
var r = n.prototype, i = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
2682
|
+
function c(u, d, g, p) {
|
|
2683
|
+
return r.fromToBase(u, d, g, p);
|
|
2684
|
+
}
|
|
2685
|
+
l.en.relativeTime = i, r.fromToBase = function(u, d, g, p, m) {
|
|
2686
|
+
for (var f, h, x, b = g.$locale().relativeTime || i, E = a.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], Y = E.length, L = 0; L < Y; L += 1) {
|
|
2687
|
+
var P = E[L];
|
|
2688
|
+
P.d && (f = p ? l(u).diff(g, P.d, !0) : g.diff(u, P.d, !0));
|
|
2689
|
+
var j = (a.rounding || Math.round)(Math.abs(f));
|
|
2690
|
+
if (x = f > 0, j <= P.r || !P.r) {
|
|
2691
|
+
j <= 1 && L > 0 && (P = E[L - 1]);
|
|
2692
|
+
var R = b[P.l];
|
|
2693
|
+
m && (j = m("" + j)), h = typeof R == "string" ? R.replace("%d", j) : R(j, d, P.l, x);
|
|
2694
|
+
break;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
if (d) return h;
|
|
2698
|
+
var se = x ? b.future : b.past;
|
|
2699
|
+
return typeof se == "function" ? se(h) : se.replace("%s", h);
|
|
2700
|
+
}, r.to = function(u, d) {
|
|
2701
|
+
return c(u, d, this, !0);
|
|
2702
|
+
}, r.from = function(u, d) {
|
|
2703
|
+
return c(u, d, this);
|
|
2704
|
+
};
|
|
2705
|
+
var o = function(u) {
|
|
2706
|
+
return u.$u ? l.utc() : l();
|
|
2707
|
+
};
|
|
2708
|
+
r.toNow = function(u) {
|
|
2709
|
+
return this.to(o(this), u);
|
|
2710
|
+
}, r.fromNow = function(u) {
|
|
2711
|
+
return this.from(o(this), u);
|
|
2712
|
+
};
|
|
2713
|
+
};
|
|
2714
|
+
});
|
|
2715
|
+
}(fn)), fn.exports;
|
|
2716
|
+
}
|
|
2717
|
+
var Wi = qi();
|
|
2718
|
+
const Gi = /* @__PURE__ */ qn(Wi);
|
|
2719
|
+
var pn = { exports: {} }, ji = pn.exports, Na;
|
|
2720
|
+
function Zi() {
|
|
2721
|
+
return Na || (Na = 1, function(e, t) {
|
|
2722
|
+
(function(a, n) {
|
|
2723
|
+
e.exports = n(Vl());
|
|
2724
|
+
})(ji, function(a) {
|
|
2725
|
+
function n(i) {
|
|
2726
|
+
return i && typeof i == "object" && "default" in i ? i : { default: i };
|
|
2727
|
+
}
|
|
2728
|
+
var l = n(a), r = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(i, c) {
|
|
2729
|
+
return c === "W" ? i + "周" : i + "日";
|
|
2730
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(i, c) {
|
|
2731
|
+
var o = 100 * i + c;
|
|
2732
|
+
return o < 600 ? "凌晨" : o < 900 ? "早上" : o < 1100 ? "上午" : o < 1300 ? "中午" : o < 1800 ? "下午" : "晚上";
|
|
2733
|
+
} };
|
|
2734
|
+
return l.default.locale(r, null, !0), r;
|
|
2735
|
+
});
|
|
2736
|
+
}(pn)), pn.exports;
|
|
2737
|
+
}
|
|
2738
|
+
Zi();
|
|
2739
|
+
const Ki = {
|
|
2740
|
+
class: "table-content-show",
|
|
2741
|
+
ref: "tableOuterRef"
|
|
2742
|
+
}, Ji = { class: "table-row-prefix-wrapper" }, Qi = {
|
|
2743
|
+
title: "拖动排序",
|
|
2744
|
+
class: "custom-drag-icon"
|
|
2745
|
+
}, eo = ["onClick"], to = ["onClick"], no = { key: 0 }, ao = { key: 0 }, lo = ["onClick"], ro = { key: 0 }, io = ["onClick"], oo = ["onClick"], so = {
|
|
2746
|
+
key: 2,
|
|
2747
|
+
class: "table-content"
|
|
2748
|
+
}, uo = {
|
|
2749
|
+
key: 3,
|
|
2750
|
+
class: "table-card-wrap"
|
|
2751
|
+
}, co = { class: "card-header" }, fo = ["title"], po = ["title"], ho = ["title"], go = { class: "card-footer" }, vo = {
|
|
2752
|
+
key: 4,
|
|
2753
|
+
class: "table-bottom-wrap"
|
|
2754
|
+
}, mo = {
|
|
2755
|
+
key: 5,
|
|
2756
|
+
class: "table-bottom-button"
|
|
2757
|
+
}, yo = { style: { display: "flex", gap: "8px", "flex-direction": "column", "align-items": "start" } }, bo = /* @__PURE__ */ Ke({
|
|
2758
|
+
__name: "index",
|
|
2759
|
+
props: {
|
|
2760
|
+
checkedColumns: {
|
|
2761
|
+
type: Array,
|
|
2762
|
+
default: () => []
|
|
2763
|
+
},
|
|
2764
|
+
defaultSort: Object,
|
|
2765
|
+
columns: {
|
|
2766
|
+
type: Array,
|
|
2767
|
+
default: () => []
|
|
2768
|
+
},
|
|
2769
|
+
tableData: {
|
|
2770
|
+
type: Array,
|
|
2771
|
+
default: () => []
|
|
2772
|
+
},
|
|
2773
|
+
pageObj: {
|
|
2774
|
+
type: Object,
|
|
2775
|
+
default: () => {
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
isCardViewport: Boolean,
|
|
2779
|
+
isEditViewport: Boolean,
|
|
2780
|
+
isClearSelection: Boolean,
|
|
2781
|
+
allowSelect: Boolean,
|
|
2782
|
+
selectMode: {
|
|
2783
|
+
type: String,
|
|
2784
|
+
default: "multiple"
|
|
2785
|
+
},
|
|
2786
|
+
selectable: Function,
|
|
2787
|
+
showIndex: {
|
|
2788
|
+
type: Boolean,
|
|
2789
|
+
default: !0
|
|
2790
|
+
},
|
|
2791
|
+
extraButton: {
|
|
2792
|
+
type: Array,
|
|
2793
|
+
default: () => []
|
|
2794
|
+
},
|
|
2795
|
+
rowButton: {
|
|
2796
|
+
type: Array,
|
|
2797
|
+
default: () => []
|
|
2798
|
+
},
|
|
2799
|
+
cacheExtraButtons: {
|
|
2800
|
+
type: Array,
|
|
2801
|
+
default: () => []
|
|
2802
|
+
},
|
|
2803
|
+
summaryInfo: {
|
|
2804
|
+
type: Object,
|
|
2805
|
+
default: () => {
|
|
2806
|
+
}
|
|
2807
|
+
},
|
|
2808
|
+
isShowPagination: {
|
|
2809
|
+
type: Boolean,
|
|
2810
|
+
default: !0
|
|
2811
|
+
},
|
|
2812
|
+
isShowEdit: {
|
|
2813
|
+
type: Boolean,
|
|
2814
|
+
default: !0
|
|
2815
|
+
},
|
|
2816
|
+
isMoveColumn: {
|
|
2817
|
+
type: Boolean,
|
|
2818
|
+
default: !0
|
|
2819
|
+
},
|
|
2820
|
+
isShowDelete: {
|
|
2821
|
+
type: Boolean,
|
|
2822
|
+
default: !0
|
|
2823
|
+
},
|
|
2824
|
+
bottomButton: {
|
|
2825
|
+
type: Array,
|
|
2826
|
+
default: () => []
|
|
2827
|
+
},
|
|
2828
|
+
// 是否允许结构性操作(新增/删除行);默认 true,方便后续按需关闭
|
|
2829
|
+
allowRowAddOrDelete: {
|
|
2830
|
+
type: Boolean,
|
|
2831
|
+
default: !0
|
|
2832
|
+
},
|
|
2833
|
+
hideHeaderContent: {
|
|
2834
|
+
type: Boolean,
|
|
2835
|
+
default: !1
|
|
2836
|
+
},
|
|
2837
|
+
collapsed: {
|
|
2838
|
+
type: Boolean,
|
|
2839
|
+
default: !1
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
emits: ["addNewRow", "clickButton", "handleColTypeChange", "handleColEditChange", "submitEditingTable", "change", "cellChange", "cellInput", "selectSuggest", "selectChange", "dbClickRow", "fixRow", "doSizeChange", "doCurrentChange", "buttonClick", "contentClick", "rowClick", "preview", "sortChange", "deleteRow"],
|
|
2843
|
+
setup(e, { expose: t, emit: a }) {
|
|
2844
|
+
lt.extend(Fi), lt.extend(zi), lt.extend(Gi), lt.locale("zh-cn");
|
|
2845
|
+
const n = e, l = Gl(Fn), { chooseTitle: r } = Bn(l), i = jl(Fn), { activeMenuPath: c } = Bn(i), o = Q(!1), u = Q(), d = Q(), g = Oe(() => {
|
|
2846
|
+
var s, v;
|
|
2847
|
+
try {
|
|
2848
|
+
return (((v = (s = b.value) == null ? void 0 : s.getSelectionRows) == null ? void 0 : v.call(s)) ?? []).length > 0;
|
|
2849
|
+
} catch {
|
|
2850
|
+
return !1;
|
|
2851
|
+
}
|
|
2852
|
+
}), p = Q(null), m = Pl({ x: 0, y: 0 }), f = Q([]), h = Q([]), x = Q(0), b = Q(null), E = Q(null);
|
|
2853
|
+
let Y;
|
|
2854
|
+
const L = Q(null), P = Oe(() => {
|
|
2855
|
+
var s, v;
|
|
2856
|
+
return Array.isArray(f.value) && ((v = (s = f.value) == null ? void 0 : s[0]) == null ? void 0 : v.prop) === "disabled";
|
|
2857
|
+
}), j = Oe(() => n.allowRowAddOrDelete && !P.value), R = a, se = Q("");
|
|
2858
|
+
Xn(() => {
|
|
2859
|
+
var v, y, S, I, A, Z;
|
|
2860
|
+
Y = Re(), f.value = n == null ? void 0 : n.columns, h.value = (v = n == null ? void 0 : n.tableData) == null ? void 0 : v.map((_) => {
|
|
2861
|
+
var O, $;
|
|
2862
|
+
let k = {};
|
|
2863
|
+
for (let T in _)
|
|
2864
|
+
if (T !== "level" && (k[T] = _a(_[T]) && _[T] === 0 ? (O = _[T]) == null ? void 0 : O.toString() : _[T]), T !== "id" && (($ = At.value) == null ? void 0 : $.prop) !== T && ye(_[T]))
|
|
2865
|
+
if (!_[T] || _[T] === "" || _[T] === null || _[T] === void 0)
|
|
2866
|
+
k[T] = "";
|
|
2867
|
+
else {
|
|
2868
|
+
const J = lt(_[T]).tz("Asia/Shanghai").format("YYYY-MM-DD HH:mm:ss");
|
|
2869
|
+
k[T] = J === "Invalid Date" ? "" : J;
|
|
2870
|
+
}
|
|
2871
|
+
else
|
|
2872
|
+
k[T] = _[T];
|
|
2873
|
+
return k;
|
|
2874
|
+
});
|
|
2875
|
+
let s = (y = r.value) == null ? void 0 : y.find((_) => (_ == null ? void 0 : _.parentContent) === c.value);
|
|
2876
|
+
if (s) {
|
|
2877
|
+
let _ = (I = (S = f.value) == null ? void 0 : S[0]) == null ? void 0 : I.prop, k = (A = h.value) == null ? void 0 : A.find((O) => (O == null ? void 0 : O[_]) === (s == null ? void 0 : s.value));
|
|
2878
|
+
(Z = b.value) == null || Z.setCurrentRow(), b.value && setTimeout(() => {
|
|
2879
|
+
b.value && b.value.setCurrentRow(k);
|
|
2880
|
+
}, 100);
|
|
2881
|
+
}
|
|
2882
|
+
Qn(), En(), document.addEventListener("click", H);
|
|
2883
|
+
});
|
|
2884
|
+
const V = async (s) => {
|
|
2885
|
+
se.value = s == null ? void 0 : s.label;
|
|
2886
|
+
try {
|
|
2887
|
+
R("clickButton", s == null ? void 0 : s.label, "", { extra: s });
|
|
2888
|
+
} finally {
|
|
2889
|
+
p.value = setTimeout(() => {
|
|
2890
|
+
se.value = "";
|
|
2891
|
+
}, 1e3);
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2894
|
+
t({
|
|
2895
|
+
cancelLoading: () => {
|
|
2896
|
+
}
|
|
2897
|
+
});
|
|
2898
|
+
const ye = (s) => {
|
|
2899
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[\+\-]\d{2}:\d{2})?$/.test(s))
|
|
2900
|
+
return !1;
|
|
2901
|
+
const y = new Date(s);
|
|
2902
|
+
return !isNaN(y.getTime());
|
|
2903
|
+
};
|
|
2904
|
+
function Re() {
|
|
2905
|
+
const s = /* @__PURE__ */ new WeakSet(), v = new MutationObserver(Z), y = /* @__PURE__ */ new WeakMap(), S = [];
|
|
2906
|
+
function I(_) {
|
|
2907
|
+
try {
|
|
2908
|
+
const k = _.getBoundingClientRect(), O = _.clientWidth || k.width || 1, $ = k.width / O || 1, T = parseFloat(getComputedStyle(_).zoom || "1");
|
|
2909
|
+
return T ? $ / T : $;
|
|
2910
|
+
} catch {
|
|
2911
|
+
return 1;
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
function A(_) {
|
|
2915
|
+
var $;
|
|
2916
|
+
if (!_ || s.has(_)) return;
|
|
2917
|
+
s.add(_);
|
|
2918
|
+
const k = _.parentElement, O = ($ = _.closest(".el-scrollbar")) == null ? void 0 : $.querySelector(".el-scrollbar__wrap");
|
|
2919
|
+
!k || !O || _.addEventListener(
|
|
2920
|
+
"pointerdown",
|
|
2921
|
+
(T) => {
|
|
2922
|
+
T.preventDefault(), T.stopPropagation();
|
|
2923
|
+
try {
|
|
2924
|
+
_.setPointerCapture && _.setPointerCapture(T.pointerId);
|
|
2925
|
+
} catch {
|
|
2926
|
+
}
|
|
2927
|
+
k.classList.add("is-dragging");
|
|
2928
|
+
const J = I(k), ge = k.clientWidth || 1, we = _.clientWidth || 0, xe = Math.max(1, (ge - we) / J), F = Math.max(1, (O.scrollWidth || 0) - (O.clientWidth || 0)), ve = T.clientX, U = O.scrollLeft, fe = F / xe, ct = (w) => {
|
|
2929
|
+
const wt = (w.clientX - ve) / J;
|
|
2930
|
+
O.scrollLeft = U + wt * fe;
|
|
2931
|
+
}, dt = () => {
|
|
2932
|
+
try {
|
|
2933
|
+
_.releasePointerCapture && _.releasePointerCapture(T.pointerId);
|
|
2934
|
+
} catch {
|
|
2935
|
+
}
|
|
2936
|
+
_.removeEventListener("pointermove", ct), _.removeEventListener("pointerup", dt), _.removeEventListener("pointercancel", dt), k.classList.remove("is-dragging");
|
|
2937
|
+
};
|
|
2938
|
+
_.addEventListener("pointermove", ct), _.addEventListener("pointerup", dt), _.addEventListener("pointercancel", dt);
|
|
2939
|
+
},
|
|
2940
|
+
!0
|
|
2941
|
+
// 捕获阶段,保证我们先手
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2944
|
+
function Z() {
|
|
2945
|
+
document.querySelectorAll(".el-scrollbar").forEach((_) => {
|
|
2946
|
+
if (!_.closest(".el-table")) return;
|
|
2947
|
+
const k = _.querySelector(".el-scrollbar__wrap"), O = _.querySelector(".el-scrollbar__bar.is-horizontal");
|
|
2948
|
+
if (!k || !O) return;
|
|
2949
|
+
const $ = k.querySelector(".el-scrollbar__view") || k.firstElementChild || k, T = $.querySelector("table") || $.querySelector(".el-table__body") || $, J = T.scrollWidth, ge = k.clientWidth, we = J - ge > 2;
|
|
2950
|
+
if (_.classList.toggle("has-x-scroll", we), O.style.display = "", we && _.querySelectorAll(".el-scrollbar__bar.is-horizontal .el-scrollbar__thumb").forEach(A), !y.has(k)) {
|
|
2951
|
+
const xe = new ResizeObserver(() => {
|
|
2952
|
+
const F = T && T.scrollWidth || k.scrollWidth, ve = k.clientWidth, U = F - ve > 2;
|
|
2953
|
+
_.classList.toggle("has-x-scroll", U);
|
|
2954
|
+
});
|
|
2955
|
+
xe.observe(k), T && xe.observe(T), y.set(k, xe), S.push(() => xe.disconnect());
|
|
2956
|
+
}
|
|
2957
|
+
});
|
|
2958
|
+
}
|
|
2959
|
+
return Z(), v.observe(document.body, { childList: !0, subtree: !0 }), () => {
|
|
2960
|
+
v.disconnect(), S.forEach((_) => {
|
|
2961
|
+
try {
|
|
2962
|
+
_();
|
|
2963
|
+
} catch {
|
|
2964
|
+
}
|
|
2965
|
+
}), S.length = 0;
|
|
2966
|
+
};
|
|
2967
|
+
}
|
|
2968
|
+
Ue(
|
|
2969
|
+
() => [r.value],
|
|
2970
|
+
() => {
|
|
2971
|
+
var v, y, S, I, A, Z, _;
|
|
2972
|
+
let s = (v = r.value) == null ? void 0 : v.find((k) => (k == null ? void 0 : k.parentContent) === c.value);
|
|
2973
|
+
if (s || !((S = (y = r.value) == null ? void 0 : y[0]) != null && S.parentContent)) {
|
|
2974
|
+
let k = (A = (I = f.value) == null ? void 0 : I[0]) == null ? void 0 : A.prop, O = (Z = h.value) == null ? void 0 : Z.find(($) => {
|
|
2975
|
+
var T, J;
|
|
2976
|
+
return ($ == null ? void 0 : $[k]) === ((s == null ? void 0 : s.value) ?? ((J = (T = r.value) == null ? void 0 : T[0]) == null ? void 0 : J.value));
|
|
2977
|
+
});
|
|
2978
|
+
(_ = b.value) == null || _.setCurrentRow(), b.value && O && setTimeout(() => {
|
|
2979
|
+
var $;
|
|
2980
|
+
($ = b.value) == null || $.setCurrentRow(O);
|
|
2981
|
+
}, 20);
|
|
2982
|
+
}
|
|
2983
|
+
},
|
|
2984
|
+
{ deep: !0 }
|
|
2985
|
+
), Yl(() => {
|
|
2986
|
+
Y(), document.removeEventListener("click", H), h.value = void 0, f.value = void 0, L.value && clearTimeout(L.value), p.value = null;
|
|
2987
|
+
}), Ue(() => n == null ? void 0 : n.isEditViewport, async (s) => {
|
|
2988
|
+
var v;
|
|
2989
|
+
s && ((v = n == null ? void 0 : n.tableData) == null ? void 0 : v.length) > 15 && (await Ge(), L.value = setTimeout(() => {
|
|
2990
|
+
const y = document.querySelectorAll(".el-table__body tr");
|
|
2991
|
+
y.length > 0 && y[y.length - 1].scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2992
|
+
}, 10));
|
|
2993
|
+
}, { immediate: !0 });
|
|
2994
|
+
const Ae = (s, v) => {
|
|
2995
|
+
R("handleColEditChange", s, v);
|
|
2996
|
+
}, M = (s, v) => {
|
|
2997
|
+
R("handleColTypeChange", s, v);
|
|
2998
|
+
}, H = (s) => {
|
|
2999
|
+
var y, S, I, A;
|
|
3000
|
+
if (o.value = !1, !n.isEditViewport) return;
|
|
3001
|
+
const v = s == null ? void 0 : s.target;
|
|
3002
|
+
(S = (y = b.value) == null ? void 0 : y.$el) != null && S.contains(v) || (I = v == null ? void 0 : v.closest) != null && I.call(v, "#themeButton, #themeBorderButton,#tableHeaderButton") || (A = v == null ? void 0 : v.closest) != null && A.call(
|
|
3003
|
+
v,
|
|
3004
|
+
".el-popper, .el-select__popper, .el-select-dropdown, .el-picker__popper, .el-picker-panel,.el-dialog__wrapper, .el-overlay, .el-message-box__wrapper, .el-popover"
|
|
3005
|
+
) || R("submitEditingTable");
|
|
3006
|
+
}, ee = Oe(() => n == null ? void 0 : n.extraButton), re = Oe(() => n == null ? void 0 : n.extraButton), oe = Q(0), ce = Q(!1), He = (s) => {
|
|
3007
|
+
oe.value = s == null ? void 0 : s.id;
|
|
3008
|
+
}, nt = () => {
|
|
3009
|
+
oe.value = 0;
|
|
3010
|
+
}, bt = () => {
|
|
3011
|
+
ce.value = !1;
|
|
3012
|
+
}, Ut = ua("getSuggestListForCell", () => []), Vt = ua("getSuggestLoadingForCell", () => !1), Ht = (s, v, y, S) => {
|
|
3013
|
+
const I = (S == null ? void 0 : S.formType) || (S == null ? void 0 : S.columnType) || "";
|
|
3014
|
+
I && I.toUpperCase() !== "INPUT" && I !== "" || R("cellInput", v, y, s);
|
|
3015
|
+
}, zt = (s, v, y) => {
|
|
3016
|
+
R("selectSuggest", v, y, s);
|
|
3017
|
+
}, Xt = (s) => {
|
|
3018
|
+
R("selectChange", s);
|
|
3019
|
+
}, qt = (s, v) => {
|
|
3020
|
+
var y, S, I;
|
|
3021
|
+
if (typeof n.selectable == "function")
|
|
3022
|
+
return n.selectable(s, v);
|
|
3023
|
+
if (n.selectMode === "single") {
|
|
3024
|
+
const A = ((S = (y = b.value) == null ? void 0 : y.getSelectionRows) == null ? void 0 : S.call(y)) ?? [];
|
|
3025
|
+
return A.length === 0 || ((I = A == null ? void 0 : A[0]) == null ? void 0 : I.id) === (s == null ? void 0 : s.id);
|
|
3026
|
+
}
|
|
3027
|
+
return !0;
|
|
3028
|
+
}, de = (s, v, y) => Oe(() => {
|
|
3029
|
+
var I, A, Z, _, k, O, $, T, J, ge;
|
|
3030
|
+
let S = s != null && s[v == null ? void 0 : v.prop] ? ((A = (I = s == null ? void 0 : s[v == null ? void 0 : v.prop]) == null ? void 0 : I[0]) == null ? void 0 : A.contents) ?? (s == null ? void 0 : s[v == null ? void 0 : v.prop]) : ((_ = (Z = s == null ? void 0 : s[y == null ? void 0 : y.prop]) == null ? void 0 : Z[0]) == null ? void 0 : _.contents) ?? (s == null ? void 0 : s[y == null ? void 0 : y.prop]) ?? ((O = (k = s == null ? void 0 : s[y == null ? void 0 : y.prop]) == null ? void 0 : k[0]) == null ? void 0 : O.contents) ?? (s == null ? void 0 : s[y == null ? void 0 : y.prop]) ?? ((J = (T = s == null ? void 0 : s[($ = y == null ? void 0 : y.child) == null ? void 0 : $.prop]) == null ? void 0 : T[0]) == null ? void 0 : J.contents) ?? (s == null ? void 0 : s[(ge = y == null ? void 0 : y.child) == null ? void 0 : ge.prop]);
|
|
3031
|
+
return Array.isArray(S) && !(S != null && S.every((we) => typeof we == "string" || typeof we == "number")) ? "查看" : S;
|
|
3032
|
+
}), at = (s) => {
|
|
3033
|
+
var S, I, A;
|
|
3034
|
+
let v = (I = (S = f.value) == null ? void 0 : S[0]) == null ? void 0 : I.prop, y = (A = h.value) == null ? void 0 : A.map((Z) => Z == null ? void 0 : Z[v]);
|
|
3035
|
+
R("rowClick", {
|
|
3036
|
+
row: s,
|
|
3037
|
+
type: "table",
|
|
3038
|
+
usingRow: f.value,
|
|
3039
|
+
firstContents: y
|
|
3040
|
+
});
|
|
3041
|
+
}, We = (s, v, y, S) => {
|
|
3042
|
+
if (!j.value) return;
|
|
3043
|
+
const I = y == null ? void 0 : y.innerText, A = Yi(I);
|
|
3044
|
+
m.x = S.clientX, m.y = S.clientY, o.value = !0, A && (u.value = y.innerText), d.value = s;
|
|
3045
|
+
}, St = () => {
|
|
3046
|
+
R("clickButton", "删除", d.value, { extra: { label: "删除" } }), o.value = !1;
|
|
3047
|
+
}, Wt = () => {
|
|
3048
|
+
R("clickButton", "批量删除", null, { extra: { label: "批量删除" } }), o.value = !1;
|
|
3049
|
+
}, _n = (s) => {
|
|
3050
|
+
R("buttonClick", s);
|
|
3051
|
+
}, K = (s) => {
|
|
3052
|
+
R("sortChange", { prop: s == null ? void 0 : s.prop, order: s == null ? void 0 : s.order });
|
|
3053
|
+
};
|
|
3054
|
+
Ue(
|
|
3055
|
+
() => n == null ? void 0 : n.tableData,
|
|
3056
|
+
() => {
|
|
3057
|
+
var s;
|
|
3058
|
+
h.value = (s = n == null ? void 0 : n.tableData) == null ? void 0 : s.map((v) => {
|
|
3059
|
+
var S, I;
|
|
3060
|
+
let y = {};
|
|
3061
|
+
for (let A in v)
|
|
3062
|
+
if (y[A] = _a(v[A]) && v[A] === 0 ? (S = v[A]) == null ? void 0 : S.toString() : v[A], A !== "id" && ((I = At.value) == null ? void 0 : I.prop) !== A && ye(v[A]))
|
|
3063
|
+
if (!v[A] || v[A] === "" || v[A] === null || v[A] === void 0)
|
|
3064
|
+
y[A] = "";
|
|
3065
|
+
else {
|
|
3066
|
+
const Z = lt(v[A], ["YYYY-MM-DD", "YYYY-MM-DD HH:mm:ss", "YYYY/MM/DD", "YYYY年MM月DD日"], !0);
|
|
3067
|
+
y[A] = Z.isValid() ? Z.format("YYYY-MM-DD HH:mm:ss") : "";
|
|
3068
|
+
}
|
|
3069
|
+
return y;
|
|
3070
|
+
});
|
|
3071
|
+
},
|
|
3072
|
+
{ deep: !0 }
|
|
3073
|
+
);
|
|
3074
|
+
const Le = (s) => ol(s), Je = (s, v, y) => {
|
|
3075
|
+
R("clickButton", s, v, y);
|
|
3076
|
+
}, Gt = (s) => {
|
|
3077
|
+
R("doCurrentChange", s);
|
|
3078
|
+
}, cl = (s, v) => {
|
|
3079
|
+
R("dbClickRow", s, v);
|
|
3080
|
+
}, dl = (s) => {
|
|
3081
|
+
R("doSizeChange", s);
|
|
3082
|
+
}, fl = (s) => {
|
|
3083
|
+
R("fixRow", s);
|
|
3084
|
+
}, pl = (s) => {
|
|
3085
|
+
R("deleteRow", s);
|
|
3086
|
+
}, hl = (s, v) => {
|
|
3087
|
+
R("clickButton", "删除", s, { extra: { label: "删除" }, index: v });
|
|
3088
|
+
}, Jn = (s, v) => {
|
|
3089
|
+
var A, Z, _, k;
|
|
3090
|
+
if ((s == null ? void 0 : s.id) === "__empty__") {
|
|
3091
|
+
const O = {};
|
|
3092
|
+
(A = f.value) == null || A.forEach(($) => {
|
|
3093
|
+
const T = $ == null ? void 0 : $.prop;
|
|
3094
|
+
!T || T === "operate" || (O[T] = "");
|
|
3095
|
+
}), O.id = `${Date.now()}_${Math.random().toString(16).slice(2)}`, O._isTemp = !0, R("addNewRow", { newRow: O, targetIndex: 0 });
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
const y = {};
|
|
3099
|
+
(Z = f.value) == null || Z.forEach((O) => {
|
|
3100
|
+
const $ = O == null ? void 0 : O.prop;
|
|
3101
|
+
!$ || $ === "operate" || (y[$] = "");
|
|
3102
|
+
}), y.id = `${Date.now()}_${Math.random().toString(16).slice(2)}`, y._isTemp = !0, (s == null ? void 0 : s.level) !== void 0 && (y.level = s.level), (s == null ? void 0 : s.tableEditType) !== void 0 && (y.tableEditType = s.tableEditType);
|
|
3103
|
+
const S = typeof v == "number" ? v : (_ = h.value) == null ? void 0 : _.findIndex((O) => (O == null ? void 0 : O.id) === (s == null ? void 0 : s.id)), I = S >= 0 ? S + 1 : ((k = h.value) == null ? void 0 : k.length) ?? 0;
|
|
3104
|
+
R("addNewRow", { newRow: y, targetIndex: I });
|
|
3105
|
+
}, gl = (s, v, y, S) => {
|
|
3106
|
+
R("contentClick", s, v, y, S);
|
|
3107
|
+
}, Qn = () => {
|
|
3108
|
+
var v;
|
|
3109
|
+
const s = (v = b.value) == null ? void 0 : v.$el.querySelector(".el-table__header-wrapper tr");
|
|
3110
|
+
!s || !n.isMoveColumn || N.create(s, {
|
|
3111
|
+
animation: 180,
|
|
3112
|
+
delay: 0,
|
|
3113
|
+
handle: ".is-drag .cell",
|
|
3114
|
+
// 可拖拽区域为单元格
|
|
3115
|
+
onMove: (y) => !y.related.classList.contains("is-not-drag"),
|
|
3116
|
+
onEnd: (y) => {
|
|
3117
|
+
x.value++;
|
|
3118
|
+
const S = y.oldIndex - 3, I = y.newIndex - 3, A = f.value.splice(S, 1)[0];
|
|
3119
|
+
f.value.splice(I, 0, A), n.isMoveColumn && Ge(() => {
|
|
3120
|
+
Qn(), En();
|
|
3121
|
+
});
|
|
3122
|
+
}
|
|
3123
|
+
});
|
|
3124
|
+
}, vl = (s) => s != null && s.column.label && (s == null ? void 0 : s.column.label.length) > 8 ? "long-header" : "", En = () => {
|
|
3125
|
+
var v;
|
|
3126
|
+
const s = (v = b.value) == null ? void 0 : v.$el.querySelector(".el-table__body-wrapper tbody");
|
|
3127
|
+
s && new N(s, {
|
|
3128
|
+
animation: 150,
|
|
3129
|
+
handle: ".custom-drag-icon",
|
|
3130
|
+
ghostClass: "sortable-ghost",
|
|
3131
|
+
onEnd: (y) => {
|
|
3132
|
+
const S = [...h.value], [I] = S.splice(y == null ? void 0 : y.oldIndex, 1);
|
|
3133
|
+
S.splice(y == null ? void 0 : y.oldIndex, 0, I), h.value = S, Ge(() => {
|
|
3134
|
+
En();
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
}, ml = (s) => new Promise((v) => {
|
|
3139
|
+
const y = new FileReader();
|
|
3140
|
+
y.onloadend = () => v(y.result), y.readAsDataURL(s);
|
|
3141
|
+
}), yl = (s, v = "file") => {
|
|
3142
|
+
let y = s.split(","), S = y[0].match(/:(.*?);/)[1], I = S.split("/")[1], A = atob(y[1]), Z = A.length, _ = new Uint8Array(Z);
|
|
3143
|
+
for (; Z--; )
|
|
3144
|
+
_[Z] = A.charCodeAt(Z);
|
|
3145
|
+
return new File([_], `${v}.${I}`, {
|
|
3146
|
+
type: S
|
|
3147
|
+
});
|
|
3148
|
+
}, bl = async (s) => {
|
|
3149
|
+
const v = await ml(s);
|
|
3150
|
+
let y = yl(v), S = new FormData();
|
|
3151
|
+
S.append("file", y);
|
|
3152
|
+
let I;
|
|
3153
|
+
return await Ii(S).then((A) => {
|
|
3154
|
+
var Z, _, k, O, $, T, J;
|
|
3155
|
+
I = {
|
|
3156
|
+
url: (Z = A.data.result) == null ? void 0 : Z.url,
|
|
3157
|
+
name: (J = (k = (_ = A.data.result) == null ? void 0 : _.url) == null ? void 0 : k.split("/")) == null ? void 0 : J[((T = ($ = (O = A.data.result) == null ? void 0 : O.url) == null ? void 0 : $.split("/")) == null ? void 0 : T.length) - 1]
|
|
3158
|
+
};
|
|
3159
|
+
}), I;
|
|
3160
|
+
}, Sl = async (s) => {
|
|
3161
|
+
var v;
|
|
3162
|
+
try {
|
|
3163
|
+
const y = s.clipboardData || (window == null ? void 0 : window.clipboardData), S = y.getData("text/plain");
|
|
3164
|
+
if (S === void 0) return;
|
|
3165
|
+
if (S.includes("<table")) {
|
|
3166
|
+
s.preventDefault();
|
|
3167
|
+
const I = wl(S);
|
|
3168
|
+
if (!I.length) return;
|
|
3169
|
+
const { rowIndex: A, columnIndex: Z } = E.value || { rowIndex: 0, columnIndex: 0 }, _ = [];
|
|
3170
|
+
if (I == null || I.forEach((k) => {
|
|
3171
|
+
_.push(k.length + Z);
|
|
3172
|
+
}), (_ == null ? void 0 : _.filter((k) => {
|
|
3173
|
+
var O;
|
|
3174
|
+
return k > Object.keys((O = h.value) == null ? void 0 : O[0]).length;
|
|
3175
|
+
}).length) > 0) {
|
|
3176
|
+
Ua({
|
|
3177
|
+
type: "warning",
|
|
3178
|
+
message: "所剩列数不够"
|
|
3179
|
+
});
|
|
3180
|
+
return;
|
|
3181
|
+
}
|
|
3182
|
+
for (let k = 0; k < I.length; k++) {
|
|
3183
|
+
const O = I[k], $ = h.value[A + k], T = mt(f.value).map((J) => J.prop);
|
|
3184
|
+
for (let J = 0; J < O.length && Z + J < T.length; J++) {
|
|
3185
|
+
const ge = T[Z + J];
|
|
3186
|
+
($ == null ? void 0 : $[ge]) !== void 0 && ($[ge] = O[J] || "");
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
} else {
|
|
3190
|
+
const I = y.getData("text/html");
|
|
3191
|
+
if (I === void 0) return;
|
|
3192
|
+
const Z = new DOMParser().parseFromString(I, "text/html"), _ = Z.querySelectorAll("table");
|
|
3193
|
+
if ((_ == null ? void 0 : _.length) > 0) {
|
|
3194
|
+
s.preventDefault();
|
|
3195
|
+
const O = _[0].querySelectorAll("tr"), $ = [];
|
|
3196
|
+
for (const J of O) {
|
|
3197
|
+
const ge = J.querySelectorAll("td, th"), we = [];
|
|
3198
|
+
for (const xe of ge) {
|
|
3199
|
+
const F = xe.querySelectorAll("img");
|
|
3200
|
+
if (F.length > 0)
|
|
3201
|
+
for (const ve of F) {
|
|
3202
|
+
const U = ve.getAttribute("src");
|
|
3203
|
+
if (U && U.startsWith("file:///")) {
|
|
3204
|
+
const fe = U.match(/base64,(.*)/);
|
|
3205
|
+
fe && we.push({
|
|
3206
|
+
type: "image",
|
|
3207
|
+
content: `data:image/png;base64,${fe[1]}`
|
|
3208
|
+
});
|
|
3209
|
+
} else U && U.startsWith("data:") && we.push({
|
|
3210
|
+
type: "image",
|
|
3211
|
+
content: U
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
else
|
|
3215
|
+
we.push({
|
|
3216
|
+
type: "text",
|
|
3217
|
+
content: xe.textContent.trim()
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
$.push(we);
|
|
3221
|
+
}
|
|
3222
|
+
const { rowIndex: T } = E.value || { rowIndex: 0, columnIndex: 0 };
|
|
3223
|
+
if (Array.isArray($) && $.length) {
|
|
3224
|
+
let J = [];
|
|
3225
|
+
$.forEach((ge) => {
|
|
3226
|
+
if (ge != null && ge.length) {
|
|
3227
|
+
const we = {}, xe = n.columns;
|
|
3228
|
+
for (let F = 0; F < (xe == null ? void 0 : xe.length); F++) {
|
|
3229
|
+
const ve = xe[F], U = ve == null ? void 0 : ve.prop, fe = ge == null ? void 0 : ge[F], ct = fe == null ? void 0 : fe.content;
|
|
3230
|
+
we[U] = ct;
|
|
3231
|
+
}
|
|
3232
|
+
J.push(we);
|
|
3233
|
+
}
|
|
3234
|
+
}), h.value.splice(T + 1, 0, ...J);
|
|
3235
|
+
}
|
|
3236
|
+
} else {
|
|
3237
|
+
const k = Z.querySelectorAll("span");
|
|
3238
|
+
let O = "";
|
|
3239
|
+
if (k.length === 0) {
|
|
3240
|
+
const $ = (v = s.clipboardData) == null ? void 0 : v.items;
|
|
3241
|
+
O = [];
|
|
3242
|
+
for (const T of $)
|
|
3243
|
+
if ((T == null ? void 0 : T.type) === "image/png") {
|
|
3244
|
+
const J = await bl(T == null ? void 0 : T.getAsFile());
|
|
3245
|
+
O.push(J);
|
|
3246
|
+
} else
|
|
3247
|
+
O = s.clipboardData.getData("text/plain");
|
|
3248
|
+
} else
|
|
3249
|
+
for (const $ of k)
|
|
3250
|
+
O = O + $.textContent.trim();
|
|
3251
|
+
if (Array.isArray(O)) {
|
|
3252
|
+
s.preventDefault();
|
|
3253
|
+
const { rowIndex: $, columnProp: T } = E.value || { rowIndex: 0, columnIndex: 0 }, J = h.value;
|
|
3254
|
+
J[$][T] = O;
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
} catch (y) {
|
|
3259
|
+
console.error("粘贴失败:", y);
|
|
3260
|
+
}
|
|
3261
|
+
}, wl = (s) => s.trim().split(/\r\n|\n|\r/).map((S) => S.trim() ? S.split(" ").map((I) => I.replace(/^"(.*)"$/, "$1")) : [""]), Dl = (s) => {
|
|
3262
|
+
var v;
|
|
3263
|
+
s && (E.value = {
|
|
3264
|
+
rowIndex: s == null ? void 0 : s.$index,
|
|
3265
|
+
columnIndex: s == null ? void 0 : s.cellIndex,
|
|
3266
|
+
columnProp: (v = s.column) == null ? void 0 : v.property
|
|
3267
|
+
});
|
|
3268
|
+
}, _l = (s) => (s == null ? void 0 : s.rowIndex) % 2 === 0 ? "default-row" : "special-row", El = (s) => {
|
|
3269
|
+
var v;
|
|
3270
|
+
return ((v = s == null ? void 0 : s.column) == null ? void 0 : v.property) === "disabled" ? "row-header-cell" : "";
|
|
3271
|
+
}, Cl = (s, v, y) => {
|
|
3272
|
+
let S = s;
|
|
3273
|
+
if ((y == null ? void 0 : y.columnType) === "Date") {
|
|
3274
|
+
if (!S || S === "" || S === null || S === void 0)
|
|
3275
|
+
S = "";
|
|
3276
|
+
else {
|
|
3277
|
+
const I = lt(S, ["YYYY-MM-DD", "YYYY/MM/DD", "YYYY年MM月DD日"], !0);
|
|
3278
|
+
S = I.isValid() ? I.format("YYYY-MM-DD") : "";
|
|
3279
|
+
}
|
|
3280
|
+
v[y.prop] = S;
|
|
3281
|
+
}
|
|
3282
|
+
R("cellChange", v, y, S);
|
|
3283
|
+
}, xl = (s) => s == null ? void 0 : s.toLocaleString("zh-CN", {
|
|
3284
|
+
minimumFractionDigits: 2,
|
|
3285
|
+
maximumFractionDigits: 2
|
|
3286
|
+
}), Tl = (s) => {
|
|
3287
|
+
const { columns: v, data: y } = s, S = [];
|
|
3288
|
+
return v.forEach((I, A) => {
|
|
3289
|
+
var k, O;
|
|
3290
|
+
if (A === 0) {
|
|
3291
|
+
S[A] = "合计";
|
|
3292
|
+
return;
|
|
3293
|
+
}
|
|
3294
|
+
const Z = I.property, _ = (O = (k = n.columns) == null ? void 0 : k.filter(($) => $ == null ? void 0 : $.showSummary)) == null ? void 0 : O.map(($) => $.prop);
|
|
3295
|
+
if (_ != null && _.includes(Z)) {
|
|
3296
|
+
const $ = y == null ? void 0 : y.map((T) => Number(T[Z]));
|
|
3297
|
+
if ($.every((T) => isNaN(T)))
|
|
3298
|
+
S[A] = "N/A";
|
|
3299
|
+
else {
|
|
3300
|
+
const T = $.reduce((J, ge) => {
|
|
3301
|
+
const we = Number(ge);
|
|
3302
|
+
return isNaN(we) ? J : J + we;
|
|
3303
|
+
}, 0);
|
|
3304
|
+
S[A] = xl(T), ["price", "sales", "cost", "profit"].includes(Z) && (S[A] = "¥" + S[A]);
|
|
3305
|
+
}
|
|
3306
|
+
} else
|
|
3307
|
+
S[A] = "";
|
|
3308
|
+
}), S;
|
|
3309
|
+
};
|
|
3310
|
+
Ue(
|
|
3311
|
+
() => n == null ? void 0 : n.isClearSelection,
|
|
3312
|
+
async (s) => {
|
|
3313
|
+
var v;
|
|
3314
|
+
s && (await Ge(), (v = b.value) == null || v.clearSelection());
|
|
3315
|
+
},
|
|
3316
|
+
{ immediate: !0 }
|
|
3317
|
+
);
|
|
3318
|
+
const At = Oe(() => {
|
|
3319
|
+
var v, y;
|
|
3320
|
+
const s = (v = f.value) == null ? void 0 : v.find((S) => S == null ? void 0 : S.isMainKey);
|
|
3321
|
+
return s || ((y = f.value) == null ? void 0 : y[0]);
|
|
3322
|
+
}), Al = Oe(() => {
|
|
3323
|
+
const s = [], v = (y) => {
|
|
3324
|
+
(y || []).forEach((S) => {
|
|
3325
|
+
S != null && S.children && S.children.length > 0 ? v(S.children) : s.push(S);
|
|
3326
|
+
});
|
|
3327
|
+
};
|
|
3328
|
+
return v(f.value), s;
|
|
3329
|
+
});
|
|
3330
|
+
return (s, v) => {
|
|
3331
|
+
var _, k, O, $, T, J, ge, we, xe;
|
|
3332
|
+
const y = Se("el-icon"), S = Se("svg-icon"), I = Se("el-table-column"), A = Se("el-table"), Z = Se("el-pagination");
|
|
3333
|
+
return C(), q("div", Ki, [
|
|
3334
|
+
!e.hideHeaderContent && ((_ = e.columns) == null ? void 0 : _.length) > 0 ? (C(), ie(oi, {
|
|
3335
|
+
key: 0,
|
|
3336
|
+
buttons: ee.value,
|
|
3337
|
+
onButtonClick: _n,
|
|
3338
|
+
columns: f.value
|
|
3339
|
+
}, {
|
|
3340
|
+
headerButton: W(() => [
|
|
3341
|
+
De(s.$slots, "headerButton", {
|
|
3342
|
+
buttons: ee.value,
|
|
3343
|
+
columns: f.value
|
|
3344
|
+
}, void 0, !0)
|
|
3345
|
+
]),
|
|
3346
|
+
_: 3
|
|
3347
|
+
}, 8, ["buttons", "columns"])) : ae("", !0),
|
|
3348
|
+
e.collapsed ? ae("", !0) : De(s.$slots, "viewport", {
|
|
3349
|
+
key: 1,
|
|
3350
|
+
id: "excludeElementId"
|
|
3351
|
+
}, void 0, !0),
|
|
3352
|
+
!e.collapsed && !e.isCardViewport && ((k = e.columns) == null ? void 0 : k.length) > 0 ? (C(), ie(A, {
|
|
3353
|
+
border: !0,
|
|
3354
|
+
"highlight-current-row": "",
|
|
3355
|
+
class: "table-wrap",
|
|
3356
|
+
data: h.value,
|
|
3357
|
+
"show-summary": (O = e.columns) == null ? void 0 : O.some((F) => F == null ? void 0 : F.showSummary),
|
|
3358
|
+
onSortChange: K,
|
|
3359
|
+
"sum-text": ($ = e.summaryInfo) == null ? void 0 : $.text,
|
|
3360
|
+
"summary-method": Tl,
|
|
3361
|
+
stripe: "",
|
|
3362
|
+
style: { width: "100%", "overflow-x": "auto" },
|
|
3363
|
+
ref_key: "tableRef",
|
|
3364
|
+
ref: b,
|
|
3365
|
+
"empty-text": "暂无数据",
|
|
3366
|
+
onCellContextmenu: We,
|
|
3367
|
+
onPaste: Sl,
|
|
3368
|
+
onSelectionChange: Xt,
|
|
3369
|
+
onRowDblclick: cl,
|
|
3370
|
+
key: x.value,
|
|
3371
|
+
"row-class-name": _l,
|
|
3372
|
+
"header-cell-class-name": vl,
|
|
3373
|
+
"cell-class-name": El,
|
|
3374
|
+
onCellMouseEnter: He,
|
|
3375
|
+
onCellMouseLeave: nt,
|
|
3376
|
+
onContextmenu: v[3] || (v[3] = qe(() => {
|
|
3377
|
+
}, ["prevent"])),
|
|
3378
|
+
"row-key": "id",
|
|
3379
|
+
"tree-props": { children: "children", hasChildren: "hasChildren" },
|
|
3380
|
+
"default-sort": e.defaultSort,
|
|
3381
|
+
onRowClick: at,
|
|
3382
|
+
onMouseleave: bt
|
|
3383
|
+
}, {
|
|
3384
|
+
empty: W(() => [
|
|
3385
|
+
ue("div", {
|
|
3386
|
+
class: "ss-empty-wrapper",
|
|
3387
|
+
onMouseenter: v[1] || (v[1] = (F) => ce.value = !0),
|
|
3388
|
+
onMouseleave: v[2] || (v[2] = (F) => ce.value = !1)
|
|
3389
|
+
}, [
|
|
3390
|
+
v[5] || (v[5] = ue("div", { class: "ss-empty-text" }, "暂无数据", -1)),
|
|
3391
|
+
j.value ? Cn((C(), q("span", {
|
|
3392
|
+
key: 0,
|
|
3393
|
+
title: "新增行",
|
|
3394
|
+
class: "ss-empty-add",
|
|
3395
|
+
onClick: v[0] || (v[0] = qe((F) => Jn({ id: "__empty__" }, 0), ["stop"]))
|
|
3396
|
+
}, [
|
|
3397
|
+
Ce(y, { size: 14 }, {
|
|
3398
|
+
default: W(() => [
|
|
3399
|
+
Ce(it(ca))
|
|
3400
|
+
]),
|
|
3401
|
+
_: 1
|
|
3402
|
+
})
|
|
3403
|
+
], 512)), [
|
|
3404
|
+
[xn, ce.value]
|
|
3405
|
+
]) : ae("", !0)
|
|
3406
|
+
], 32)
|
|
3407
|
+
]),
|
|
3408
|
+
default: W(() => {
|
|
3409
|
+
var F, ve, U, fe, ct, dt;
|
|
3410
|
+
return [
|
|
3411
|
+
j.value ? (C(), ie(I, {
|
|
3412
|
+
key: 0,
|
|
3413
|
+
width: 55,
|
|
3414
|
+
fixed: "",
|
|
3415
|
+
align: "center",
|
|
3416
|
+
"class-name": "no-ellipsis"
|
|
3417
|
+
}, {
|
|
3418
|
+
default: W(({ row: w, $index: wt }) => [
|
|
3419
|
+
Cn(ue("div", Ji, [
|
|
3420
|
+
ue("span", Qi, [
|
|
3421
|
+
Ce(S, {
|
|
3422
|
+
name: "drag",
|
|
3423
|
+
style: { width: "15px", height: "15px", cursor: "move" }
|
|
3424
|
+
})
|
|
3425
|
+
]),
|
|
3426
|
+
ue("span", {
|
|
3427
|
+
title: "新增行",
|
|
3428
|
+
style: { cursor: "pointer" },
|
|
3429
|
+
onClick: qe((jt) => Jn(w, wt), ["stop"])
|
|
3430
|
+
}, [
|
|
3431
|
+
Ce(y, { size: 12 }, {
|
|
3432
|
+
default: W(() => [
|
|
3433
|
+
Ce(it(ca))
|
|
3434
|
+
]),
|
|
3435
|
+
_: 1
|
|
3436
|
+
})
|
|
3437
|
+
], 8, eo),
|
|
3438
|
+
ue("span", {
|
|
3439
|
+
title: "删除本行",
|
|
3440
|
+
style: { cursor: "pointer" },
|
|
3441
|
+
onClick: qe((jt) => hl(w, wt), ["stop"])
|
|
3442
|
+
}, [
|
|
3443
|
+
Ce(y, { size: 12 }, {
|
|
3444
|
+
default: W(() => [
|
|
3445
|
+
Ce(it(Hl))
|
|
3446
|
+
]),
|
|
3447
|
+
_: 1
|
|
3448
|
+
})
|
|
3449
|
+
], 8, to)
|
|
3450
|
+
], 512), [
|
|
3451
|
+
[xn, (w == null ? void 0 : w.id) === oe.value]
|
|
3452
|
+
])
|
|
3453
|
+
]),
|
|
3454
|
+
_: 1
|
|
3455
|
+
})) : ae("", !0),
|
|
3456
|
+
e.allowSelect && e.isEditViewport ? (C(), ie(I, {
|
|
3457
|
+
key: 1,
|
|
3458
|
+
type: "selection",
|
|
3459
|
+
width: (F = e.columns) != null && F.some((w) => w == null ? void 0 : w.showSummary) ? 55 : 38,
|
|
3460
|
+
fixed: "",
|
|
3461
|
+
selectable: qt
|
|
3462
|
+
}, null, 8, ["width"])) : ae("", !0),
|
|
3463
|
+
n != null && n.showIndex && !((ve = n == null ? void 0 : n.tableData) != null && ve.some((w) => w == null ? void 0 : w.children)) && ((fe = (U = n == null ? void 0 : n.columns) == null ? void 0 : U[0]) == null ? void 0 : fe.prop) !== "disabled" ? (C(), ie(I, {
|
|
3464
|
+
key: 2,
|
|
3465
|
+
type: "index",
|
|
3466
|
+
label: "序号",
|
|
3467
|
+
width: 60,
|
|
3468
|
+
fixed: "",
|
|
3469
|
+
align: "center",
|
|
3470
|
+
sortable: ""
|
|
3471
|
+
}, {
|
|
3472
|
+
default: W(({ $index: w }) => [
|
|
3473
|
+
e.isEditViewport ? ae("", !0) : (C(), q("span", no, Me(w + 1), 1))
|
|
3474
|
+
]),
|
|
3475
|
+
_: 1
|
|
3476
|
+
})) : ae("", !0),
|
|
3477
|
+
(ct = e.tableData) != null && ct.some((w) => w == null ? void 0 : w.children) && ((dt = e.columns) == null ? void 0 : dt.length) > 0 ? (C(), ie(I, {
|
|
3478
|
+
key: 3,
|
|
3479
|
+
type: "index",
|
|
3480
|
+
label: "序号",
|
|
3481
|
+
width: 55,
|
|
3482
|
+
fixed: "",
|
|
3483
|
+
align: "center"
|
|
3484
|
+
}, {
|
|
3485
|
+
default: W(({ $index: w }) => [
|
|
3486
|
+
e.isEditViewport ? ae("", !0) : (C(), q("span", ao, Me(w + 1), 1))
|
|
3487
|
+
]),
|
|
3488
|
+
_: 1
|
|
3489
|
+
})) : ae("", !0),
|
|
3490
|
+
(C(!0), q($e, null, Ve(f.value, (w, wt) => {
|
|
3491
|
+
var jt, ea, ta;
|
|
3492
|
+
return C(), q($e, null, [
|
|
3493
|
+
((jt = e.checkedColumns) == null ? void 0 : jt.length) > 0 && ((ea = e.checkedColumns) != null && ea.includes(w == null ? void 0 : w.label)) || ((ta = e.checkedColumns) == null ? void 0 : ta.length) === 0 ? (C(), ie(Ai, {
|
|
3494
|
+
key: 0,
|
|
3495
|
+
tableData: h.value,
|
|
3496
|
+
column: w,
|
|
3497
|
+
isEditViewport: e.isEditViewport,
|
|
3498
|
+
onHandleColEditChange: Ae,
|
|
3499
|
+
onHandleColTypeChange: M
|
|
3500
|
+
}, {
|
|
3501
|
+
operateHeader: W(() => [
|
|
3502
|
+
(w == null ? void 0 : w.label) === "操作" ? De(s.$slots, "operateCol", { key: 0 }, void 0, !0) : ae("", !0)
|
|
3503
|
+
]),
|
|
3504
|
+
content: W(({ row: G, scope: kl, column: le, $index: Il }) => {
|
|
3505
|
+
var na, aa, la, ra, ia, oa;
|
|
3506
|
+
return [
|
|
3507
|
+
(G == null ? void 0 : G.tableEditType) !== "edit" && (w == null ? void 0 : w.type) !== "operate" ? (C(), q("span", {
|
|
3508
|
+
key: 0,
|
|
3509
|
+
class: "table-content",
|
|
3510
|
+
style: $t({
|
|
3511
|
+
cursor: w != null && w.isExistChild || Array.isArray(w == null ? void 0 : w.relatedPages) && ((na = w == null ? void 0 : w.relatedPages) == null ? void 0 : na.length) > 0 ? "pointer" : "default",
|
|
3512
|
+
color: (w != null && w.isExistChild || Array.isArray(w == null ? void 0 : w.relatedPages) && ((aa = w == null ? void 0 : w.relatedPages) == null ? void 0 : aa.length) > 0) && !(w != null && w.directiveColor) ? "var(--vertical-menuitem-active-bg)" : "",
|
|
3513
|
+
textDecoration: w != null && w.isExistChild ? "underline" : ""
|
|
3514
|
+
}),
|
|
3515
|
+
onClick: (z) => {
|
|
3516
|
+
var Zt;
|
|
3517
|
+
return gl(G != null && G[w == null ? void 0 : w.prop] ? G == null ? void 0 : G[w == null ? void 0 : w.prop] : (G == null ? void 0 : G[le == null ? void 0 : le.prop]) ?? (G == null ? void 0 : G[(Zt = le == null ? void 0 : le.child) == null ? void 0 : Zt.prop]), le == null ? void 0 : le.prop, G, {
|
|
3518
|
+
data: de(G, w, le).value,
|
|
3519
|
+
isExistChild: w == null ? void 0 : w.isExistChild
|
|
3520
|
+
});
|
|
3521
|
+
}
|
|
3522
|
+
}, [
|
|
3523
|
+
s.$slots.content ? (C(), q($e, { key: 0 }, [
|
|
3524
|
+
((la = e.columns) == null ? void 0 : la.findIndex((z) => (z == null ? void 0 : z.prop) === (w == null ? void 0 : w.prop))) >= ((G == null ? void 0 : G.level) ?? -1) ? (C(), q("div", ro, [
|
|
3525
|
+
De(s.$slots, "content", {
|
|
3526
|
+
row: G,
|
|
3527
|
+
column: w,
|
|
3528
|
+
colIndex: wt,
|
|
3529
|
+
item: le
|
|
3530
|
+
}, void 0, !0)
|
|
3531
|
+
])) : ae("", !0)
|
|
3532
|
+
], 64)) : ((ra = e.columns) == null ? void 0 : ra.findIndex((z) => (z == null ? void 0 : z.prop) === (w == null ? void 0 : w.prop))) >= ((G == null ? void 0 : G.level) ?? -1) ? (C(), q($e, { key: 1 }, [
|
|
3533
|
+
Kt(Me(de(G, w, le)), 1)
|
|
3534
|
+
], 64)) : ae("", !0)
|
|
3535
|
+
], 12, lo)) : ae("", !0),
|
|
3536
|
+
((w == null ? void 0 : w.type) ?? "text") === "operate" ? (C(), q("span", {
|
|
3537
|
+
key: 1,
|
|
3538
|
+
class: "table-operate",
|
|
3539
|
+
style: $t({
|
|
3540
|
+
justifyContent: e.isShowEdit && e.isShowDelete ? "space-between" : w == null ? void 0 : w.align
|
|
3541
|
+
})
|
|
3542
|
+
}, [
|
|
3543
|
+
De(s.$slots, "actions", {
|
|
3544
|
+
item: G,
|
|
3545
|
+
fIndex: Il
|
|
3546
|
+
}, void 0, !0),
|
|
3547
|
+
e.isShowEdit ? (C(), q("span", {
|
|
3548
|
+
key: 0,
|
|
3549
|
+
onClick: (z) => fl(G),
|
|
3550
|
+
class: "blue-table-operate table-operate-content"
|
|
3551
|
+
}, "编辑", 8, io)) : ae("", !0),
|
|
3552
|
+
e.isShowDelete ? (C(), q("span", {
|
|
3553
|
+
key: 1,
|
|
3554
|
+
onClick: (z) => pl(G),
|
|
3555
|
+
class: "red-table-operate table-operate-content"
|
|
3556
|
+
}, "删除", 8, oo)) : ae("", !0)
|
|
3557
|
+
], 4)) : ae("", !0),
|
|
3558
|
+
(G == null ? void 0 : G.tableEditType) === "edit" ? (C(), q("span", so, [
|
|
3559
|
+
(le == null ? void 0 : le.property) === "disabled" || w != null && w.isReadonly ? (C(), q($e, { key: 0 }, [
|
|
3560
|
+
Kt(Me(G[le == null ? void 0 : le.property]), 1)
|
|
3561
|
+
], 64)) : (C(), ie(Fa((() => {
|
|
3562
|
+
var sa;
|
|
3563
|
+
const z = le ?? w, Zt = G != null && G[z == null ? void 0 : z.prop] && Array.isArray(G[z.prop]) && ((sa = G[z.prop]) != null && sa.every((Ol) => typeof Ol == "object")) ? "Upload" : ((z == null ? void 0 : z.formType) ?? (z == null ? void 0 : z.columnType)) === "" || !((z == null ? void 0 : z.formType) ?? (z == null ? void 0 : z.columnType)) ? "Input" : (z == null ? void 0 : z.formType) ?? (z == null ? void 0 : z.columnType);
|
|
3564
|
+
return Le(Zt);
|
|
3565
|
+
})()), {
|
|
3566
|
+
key: 1,
|
|
3567
|
+
modelValue: G[le == null ? void 0 : le.property],
|
|
3568
|
+
"onUpdate:modelValue": (z) => G[le == null ? void 0 : le.property] = z,
|
|
3569
|
+
style: { height: "100%" },
|
|
3570
|
+
content: ((ia = le ?? w) == null ? void 0 : ia.contents) ?? ((oa = le ?? w) == null ? void 0 : oa.options) ?? [],
|
|
3571
|
+
optionUrl: le ?? w,
|
|
3572
|
+
"suggest-list": it(Ut)(),
|
|
3573
|
+
loading: it(Vt)(),
|
|
3574
|
+
onFocus: (z) => Dl(kl),
|
|
3575
|
+
onInput: (z) => Ht(z, G, le, le ?? w),
|
|
3576
|
+
onSelectSuggest: (z) => zt(z, G, le),
|
|
3577
|
+
onChange: (z) => {
|
|
3578
|
+
Cl(z, G, w), R("cellChange", G, le, z);
|
|
3579
|
+
}
|
|
3580
|
+
}, null, 40, ["modelValue", "onUpdate:modelValue", "content", "optionUrl", "suggest-list", "loading", "onFocus", "onInput", "onSelectSuggest", "onChange"]))
|
|
3581
|
+
])) : ae("", !0)
|
|
3582
|
+
];
|
|
3583
|
+
}),
|
|
3584
|
+
_: 2
|
|
3585
|
+
}, 1032, ["tableData", "column", "isEditViewport"])) : ae("", !0)
|
|
3586
|
+
], 64);
|
|
3587
|
+
}), 256))
|
|
3588
|
+
];
|
|
3589
|
+
}),
|
|
3590
|
+
_: 3
|
|
3591
|
+
}, 8, ["data", "show-summary", "sum-text", "default-sort"])) : e.collapsed ? ae("", !0) : (C(), q("div", uo, [
|
|
3592
|
+
(C(!0), q($e, null, Ve(h.value, (F) => (C(), ie(Mi, {
|
|
3593
|
+
key: F == null ? void 0 : F.id,
|
|
3594
|
+
showTag: !1
|
|
3595
|
+
}, {
|
|
3596
|
+
header: W(() => {
|
|
3597
|
+
var ve, U;
|
|
3598
|
+
return [
|
|
3599
|
+
ue("div", co, [
|
|
3600
|
+
ue("span", {
|
|
3601
|
+
title: F == null ? void 0 : F[(ve = At.value) == null ? void 0 : ve.prop]
|
|
3602
|
+
}, Me(F[(U = At.value) == null ? void 0 : U.prop]), 9, fo)
|
|
3603
|
+
])
|
|
3604
|
+
];
|
|
3605
|
+
}),
|
|
3606
|
+
status: W(() => v[6] || (v[6] = [
|
|
3607
|
+
Kt("已完成")
|
|
3608
|
+
])),
|
|
3609
|
+
content: W(() => {
|
|
3610
|
+
var ve;
|
|
3611
|
+
return [
|
|
3612
|
+
(C(!0), q($e, null, Ve((ve = Al.value) == null ? void 0 : ve.filter((U) => {
|
|
3613
|
+
var fe;
|
|
3614
|
+
return (U == null ? void 0 : U.prop) !== "operate" && (U == null ? void 0 : U.prop) !== ((fe = At.value) == null ? void 0 : fe.prop);
|
|
3615
|
+
}), (U) => (C(), q("div", {
|
|
3616
|
+
class: "card-content",
|
|
3617
|
+
key: U == null ? void 0 : U.prop
|
|
3618
|
+
}, [
|
|
3619
|
+
ue("span", {
|
|
3620
|
+
title: U == null ? void 0 : U.label
|
|
3621
|
+
}, [
|
|
3622
|
+
Kt(Me(U == null ? void 0 : U.label), 1),
|
|
3623
|
+
v[7] || (v[7] = ue("span", { style: { "margin-left": "3px" } }, ":", -1))
|
|
3624
|
+
], 8, po),
|
|
3625
|
+
ue("span", {
|
|
3626
|
+
title: F == null ? void 0 : F[U == null ? void 0 : U.prop]
|
|
3627
|
+
}, Me(F == null ? void 0 : F[U == null ? void 0 : U.prop]), 9, ho)
|
|
3628
|
+
]))), 128))
|
|
3629
|
+
];
|
|
3630
|
+
}),
|
|
3631
|
+
footer: W(() => {
|
|
3632
|
+
var ve, U;
|
|
3633
|
+
return [
|
|
3634
|
+
ue("div", go, [
|
|
3635
|
+
(ve = e.rowButton) != null && ve.find((fe) => (fe == null ? void 0 : fe.label) === "编辑") ? (C(), ie(S, {
|
|
3636
|
+
key: 0,
|
|
3637
|
+
onClick: (fe) => Je("编辑", F, { extra: { label: "编辑" } }),
|
|
3638
|
+
name: "card-edit",
|
|
3639
|
+
style: { width: "15px", height: "15px", color: "var(--ssComponent-theme-color)" }
|
|
3640
|
+
}, null, 8, ["onClick"])) : ae("", !0),
|
|
3641
|
+
(U = e.rowButton) != null && U.find((fe) => (fe == null ? void 0 : fe.label) === "删除") ? (C(), ie(S, {
|
|
3642
|
+
key: 1,
|
|
3643
|
+
onClick: (fe) => Je("删除", F, { extra: { label: "删除" } }),
|
|
3644
|
+
name: "card-delete",
|
|
3645
|
+
style: { width: "15px", height: "15px", color: "#ff0000" }
|
|
3646
|
+
}, null, 8, ["onClick"])) : ae("", !0)
|
|
3647
|
+
])
|
|
3648
|
+
];
|
|
3649
|
+
}),
|
|
3650
|
+
_: 2
|
|
3651
|
+
}, 1024))), 128))
|
|
3652
|
+
])),
|
|
3653
|
+
e.collapsed ? ae("", !0) : (C(), q("div", vo, [
|
|
3654
|
+
e.isCardViewport ? ae("", !0) : De(s.$slots, "batchButton", {
|
|
3655
|
+
key: 0,
|
|
3656
|
+
buttons: re.value,
|
|
3657
|
+
columns: f.value
|
|
3658
|
+
}, void 0, !0),
|
|
3659
|
+
n != null && n.isShowPagination && e.tableData.length > 0 ? (C(), ie(Z, {
|
|
3660
|
+
key: 1,
|
|
3661
|
+
onSizeChange: dl,
|
|
3662
|
+
onCurrentChange: Gt,
|
|
3663
|
+
"current-page": ((T = e.pageObj) == null ? void 0 : T.currentPage) ?? 1,
|
|
3664
|
+
"page-sizes": (J = e.pageObj) == null ? void 0 : J.pageSizes,
|
|
3665
|
+
"page-size": ((ge = e.pageObj) == null ? void 0 : ge.pageSize) ?? 10,
|
|
3666
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
3667
|
+
total: ((we = e.pageObj) == null ? void 0 : we.total) ?? 0
|
|
3668
|
+
}, null, 8, ["current-page", "page-sizes", "page-size", "total"])) : ae("", !0)
|
|
3669
|
+
])),
|
|
3670
|
+
!e.collapsed && ((xe = n == null ? void 0 : n.bottomButton) == null ? void 0 : xe.length) > 0 ? (C(), q("div", mo, [
|
|
3671
|
+
(C(!0), q($e, null, Ve(n == null ? void 0 : n.bottomButton, (F, ve) => (C(), q("div", {
|
|
3672
|
+
key: ve,
|
|
3673
|
+
class: "table-child-button"
|
|
3674
|
+
}, [
|
|
3675
|
+
Ce(an, {
|
|
3676
|
+
onClickTrigger: v[4] || (v[4] = () => {
|
|
3677
|
+
}),
|
|
3678
|
+
disabled: se.value === (F == null ? void 0 : F.label),
|
|
3679
|
+
modelValue: F == null ? void 0 : F.label,
|
|
3680
|
+
onClick: (U) => V(F)
|
|
3681
|
+
}, null, 8, ["disabled", "modelValue", "onClick"])
|
|
3682
|
+
]))), 128))
|
|
3683
|
+
])) : ae("", !0),
|
|
3684
|
+
Cn(Ce(li, {
|
|
3685
|
+
style: $t({ top: m.y + "px", left: m.x + "px", position: "fixed", zIndex: 999 })
|
|
3686
|
+
}, {
|
|
3687
|
+
content: W(() => [
|
|
3688
|
+
ue("div", yo, [
|
|
3689
|
+
Ce(an, {
|
|
3690
|
+
emptyColor: !0,
|
|
3691
|
+
onClickTrigger: St,
|
|
3692
|
+
modelValue: "删除本行",
|
|
3693
|
+
buttonType: ""
|
|
3694
|
+
}),
|
|
3695
|
+
g.value ? (C(), ie(an, {
|
|
3696
|
+
key: 0,
|
|
3697
|
+
emptyColor: !0,
|
|
3698
|
+
onClickTrigger: Wt,
|
|
3699
|
+
modelValue: "批量删除选中行",
|
|
3700
|
+
buttonType: "",
|
|
3701
|
+
style: { marginLeft: "0px" }
|
|
3702
|
+
})) : ae("", !0)
|
|
3703
|
+
])
|
|
3704
|
+
]),
|
|
3705
|
+
_: 1
|
|
3706
|
+
}, 8, ["style"]), [
|
|
3707
|
+
[xn, o.value && j.value]
|
|
3708
|
+
])
|
|
3709
|
+
], 512);
|
|
3710
|
+
};
|
|
3711
|
+
}
|
|
3712
|
+
}), No = /* @__PURE__ */ ut(bo, [["__scopeId", "data-v-73cd2279"]]), So = /* @__PURE__ */ Ke({
|
|
3713
|
+
__name: "index",
|
|
3714
|
+
props: {
|
|
3715
|
+
isVisible: {
|
|
3716
|
+
type: Boolean,
|
|
3717
|
+
default: !1
|
|
3718
|
+
},
|
|
3719
|
+
title: {
|
|
3720
|
+
type: String,
|
|
3721
|
+
default: ""
|
|
3722
|
+
},
|
|
3723
|
+
placement: {
|
|
3724
|
+
type: String,
|
|
3725
|
+
default: "bottom"
|
|
3726
|
+
},
|
|
3727
|
+
width: {
|
|
3728
|
+
type: Number,
|
|
3729
|
+
default: 200
|
|
3730
|
+
},
|
|
3731
|
+
trigger: {
|
|
3732
|
+
type: String,
|
|
3733
|
+
default: "click"
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
setup(e) {
|
|
3737
|
+
const t = e, a = Q(null), n = Q(!1), l = Q(null);
|
|
3738
|
+
return Ue(
|
|
3739
|
+
() => t == null ? void 0 : t.isVisible,
|
|
3740
|
+
() => {
|
|
3741
|
+
n.value = t == null ? void 0 : t.isVisible;
|
|
3742
|
+
},
|
|
3743
|
+
{ deep: !0, immediate: !0 }
|
|
3744
|
+
), Ue(
|
|
3745
|
+
() => l.value,
|
|
3746
|
+
() => {
|
|
3747
|
+
Ge(() => {
|
|
3748
|
+
var r, i;
|
|
3749
|
+
(i = (r = a.value) == null ? void 0 : r.updatePopper) == null || i.call(r);
|
|
3750
|
+
});
|
|
3751
|
+
},
|
|
3752
|
+
{ deep: !0, immediate: !0 }
|
|
3753
|
+
), (r, i) => {
|
|
3754
|
+
const c = Se("el-popover");
|
|
3755
|
+
return C(), ie(c, {
|
|
3756
|
+
visible: n.value,
|
|
3757
|
+
"onUpdate:visible": i[0] || (i[0] = (o) => n.value = o),
|
|
3758
|
+
trigger: t.trigger,
|
|
3759
|
+
title: t == null ? void 0 : t.title,
|
|
3760
|
+
placement: t == null ? void 0 : t.placement,
|
|
3761
|
+
width: t == null ? void 0 : t.width,
|
|
3762
|
+
ref_key: "popOverRef",
|
|
3763
|
+
ref: a,
|
|
3764
|
+
"trigger-keys": "[]"
|
|
3765
|
+
}, {
|
|
3766
|
+
reference: W(() => [
|
|
3767
|
+
ue("div", null, [
|
|
3768
|
+
De(r.$slots, "reference", {
|
|
3769
|
+
ref_key: "referenceRef",
|
|
3770
|
+
ref: l
|
|
3771
|
+
})
|
|
3772
|
+
])
|
|
3773
|
+
]),
|
|
3774
|
+
default: W(() => [
|
|
3775
|
+
ue("div", null, [
|
|
3776
|
+
De(r.$slots, "content")
|
|
3777
|
+
])
|
|
3778
|
+
]),
|
|
3779
|
+
_: 3
|
|
3780
|
+
}, 8, ["visible", "trigger", "title", "placement", "width"]);
|
|
3781
|
+
};
|
|
3782
|
+
}
|
|
3783
|
+
}), wo = { class: "form-content" }, Do = {
|
|
3784
|
+
key: 0,
|
|
3785
|
+
class: "form-content-view"
|
|
3786
|
+
}, _o = /* @__PURE__ */ Ke({
|
|
3787
|
+
__name: "index",
|
|
3788
|
+
props: {
|
|
3789
|
+
rowContents: {
|
|
3790
|
+
type: Array,
|
|
3791
|
+
default: () => []
|
|
3792
|
+
},
|
|
3793
|
+
formRules: {
|
|
3794
|
+
type: Object,
|
|
3795
|
+
default: () => {
|
|
3796
|
+
}
|
|
3797
|
+
},
|
|
3798
|
+
isRowFlex: {
|
|
3799
|
+
type: Boolean,
|
|
3800
|
+
default: !1
|
|
3801
|
+
}
|
|
3802
|
+
},
|
|
3803
|
+
emits: ["change"],
|
|
3804
|
+
setup(e, { emit: t }) {
|
|
3805
|
+
const a = e, n = t, l = Q({}), r = Q(0), i = (u) => {
|
|
3806
|
+
var m;
|
|
3807
|
+
const { type: d, multiple: g, value: p } = u || {};
|
|
3808
|
+
if (((m = d == null ? void 0 : d.toUpperCase) == null ? void 0 : m.call(d)) !== "SELECT" || g !== !0 || Array.isArray(p))
|
|
3809
|
+
return p;
|
|
3810
|
+
try {
|
|
3811
|
+
return JSON.parse(p);
|
|
3812
|
+
} catch {
|
|
3813
|
+
return p;
|
|
3814
|
+
}
|
|
3815
|
+
}, c = () => {
|
|
3816
|
+
Ge(() => {
|
|
3817
|
+
r.value++;
|
|
3818
|
+
});
|
|
3819
|
+
}, o = () => {
|
|
3820
|
+
if (l.value) {
|
|
3821
|
+
let u = {};
|
|
3822
|
+
for (let d in l.value)
|
|
3823
|
+
Ar(l.value[d]) ? u[d] = lt(l.value[d]).format("YYYY年MM月DD日") : u[d] = l.value[d];
|
|
3824
|
+
n("change", u);
|
|
3825
|
+
}
|
|
3826
|
+
};
|
|
3827
|
+
return Ue(
|
|
3828
|
+
() => a == null ? void 0 : a.rowContents,
|
|
3829
|
+
() => {
|
|
3830
|
+
var d, g;
|
|
3831
|
+
if (((d = a == null ? void 0 : a.rowContents) == null ? void 0 : d.length) === 0) return;
|
|
3832
|
+
const u = {};
|
|
3833
|
+
(g = mt(a == null ? void 0 : a.rowContents)) == null || g.forEach((p) => {
|
|
3834
|
+
var f;
|
|
3835
|
+
u[(p == null ? void 0 : p.prop) ?? (p == null ? void 0 : p.name)] = p == null ? void 0 : p.value;
|
|
3836
|
+
const { type: m } = p || {};
|
|
3837
|
+
if (((f = m == null ? void 0 : m.toUpperCase) == null ? void 0 : f.call(m)) === "SELECT") {
|
|
3838
|
+
const h = (p == null ? void 0 : p.prop) ?? (p == null ? void 0 : p.name);
|
|
3839
|
+
u[h] = i(p);
|
|
3840
|
+
}
|
|
3841
|
+
}), l.value = u, c();
|
|
3842
|
+
},
|
|
3843
|
+
{ deep: !0, immediate: !0 }
|
|
3844
|
+
), (u, d) => {
|
|
3845
|
+
var m;
|
|
3846
|
+
const g = Se("el-form-item"), p = Se("el-form");
|
|
3847
|
+
return C(), q("div", wo, [
|
|
3848
|
+
((m = a == null ? void 0 : a.rowContents) == null ? void 0 : m.length) > 0 ? (C(), q("div", Do, [
|
|
3849
|
+
(C(), ie(p, {
|
|
3850
|
+
ref: "formRef",
|
|
3851
|
+
model: l.value,
|
|
3852
|
+
rules: e.formRules,
|
|
3853
|
+
class: Nt("form-noRegular-data"),
|
|
3854
|
+
key: r.value
|
|
3855
|
+
}, {
|
|
3856
|
+
default: W(() => [
|
|
3857
|
+
(C(!0), q($e, null, Ve(a == null ? void 0 : a.rowContents, (f, h) => (C(), ie(g, {
|
|
3858
|
+
key: h,
|
|
3859
|
+
class: Nt(["form-item", { "form-row-content": !e.isRowFlex }]),
|
|
3860
|
+
prop: (f == null ? void 0 : f.prop) ?? (f == null ? void 0 : f.name),
|
|
3861
|
+
style: $t({
|
|
3862
|
+
flexDirection: e.isRowFlex ? "row" : "column",
|
|
3863
|
+
alignItems: e.isRowFlex ? "center" : "start",
|
|
3864
|
+
height: e.isRowFlex ? "100%" : "auto",
|
|
3865
|
+
width: `calc((100% / ${(f == null ? void 0 : f.width) ?? 1}) - 12px)`,
|
|
3866
|
+
minWidth: `calc((100% / ${(f == null ? void 0 : f.width) ?? 1}) - 12px)`
|
|
3867
|
+
})
|
|
3868
|
+
}, {
|
|
3869
|
+
label: W(() => [
|
|
3870
|
+
ue("div", {
|
|
3871
|
+
class: "from-item-label",
|
|
3872
|
+
style: $t({
|
|
3873
|
+
width: e.isRowFlex ? "72px" : "auto",
|
|
3874
|
+
minWidth: e.isRowFlex ? "72px" : `calc((100% / ${(f == null ? void 0 : f.width) ?? 1}) - 8px)`
|
|
3875
|
+
})
|
|
3876
|
+
}, Me(f == null ? void 0 : f.label), 5)
|
|
3877
|
+
]),
|
|
3878
|
+
default: W(() => [
|
|
3879
|
+
(C(), ie(Fa(it(ol)((f == null ? void 0 : f.type) ?? "Input")), {
|
|
3880
|
+
modelValue: l.value[(f == null ? void 0 : f.prop) ?? (f == null ? void 0 : f.name)],
|
|
3881
|
+
"onUpdate:modelValue": (x) => l.value[(f == null ? void 0 : f.prop) ?? (f == null ? void 0 : f.name)] = x,
|
|
3882
|
+
disabled: f == null ? void 0 : f.disabled,
|
|
3883
|
+
onChange: o
|
|
3884
|
+
}, null, 40, ["modelValue", "onUpdate:modelValue", "disabled"]))
|
|
3885
|
+
]),
|
|
3886
|
+
_: 2
|
|
3887
|
+
}, 1032, ["prop", "class", "style"]))), 128))
|
|
3888
|
+
]),
|
|
3889
|
+
_: 1
|
|
3890
|
+
}, 8, ["model", "rules"]))
|
|
3891
|
+
])) : ae("", !0)
|
|
3892
|
+
]);
|
|
3893
|
+
};
|
|
3894
|
+
}
|
|
3895
|
+
}), ul = /* @__PURE__ */ ut(_o, [["__scopeId", "data-v-0d8193de"]]), Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3896
|
+
__proto__: null,
|
|
3897
|
+
default: ul
|
|
3898
|
+
}, Symbol.toStringTag, { value: "Module" })), Eo = { class: "extra-button-content" }, Co = { class: "table-operator-wrap" }, xo = { class: "extra-button-filter" }, To = {
|
|
3899
|
+
key: 0,
|
|
3900
|
+
class: "extra-header"
|
|
3901
|
+
}, Ao = { class: "extra-contents" }, ko = ["onClick"], Io = { class: "table-op-text" }, Oo = /* @__PURE__ */ Ke({
|
|
3902
|
+
__name: "header",
|
|
3903
|
+
props: {
|
|
3904
|
+
columns: {
|
|
3905
|
+
type: Array,
|
|
3906
|
+
default: () => []
|
|
3907
|
+
},
|
|
3908
|
+
buttons: {
|
|
3909
|
+
type: Array,
|
|
3910
|
+
default: () => []
|
|
3911
|
+
}
|
|
3912
|
+
},
|
|
3913
|
+
emits: ["filter", "buttonClick"],
|
|
3914
|
+
setup(e, { emit: t }) {
|
|
3915
|
+
const a = t, n = Q(!1), l = Q([]), r = Q(!1), i = Q([{ label: "清空", background: "#999999" }, { label: "确认" }]), c = [
|
|
3916
|
+
{
|
|
3917
|
+
label: "新增",
|
|
3918
|
+
icon: "new"
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
label: "导入",
|
|
3922
|
+
icon: "import_101"
|
|
3923
|
+
},
|
|
3924
|
+
{
|
|
3925
|
+
label: "导出",
|
|
3926
|
+
icon: "export_101"
|
|
3927
|
+
},
|
|
3928
|
+
{
|
|
3929
|
+
label: "导出paraform",
|
|
3930
|
+
icon: "export_101"
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
label: "OCR识别",
|
|
3934
|
+
icon: "OCR识别"
|
|
3935
|
+
},
|
|
3936
|
+
{
|
|
3937
|
+
label: "切换视图",
|
|
3938
|
+
icon: "cardViewport_101"
|
|
3939
|
+
}
|
|
3940
|
+
], o = (u, d) => {
|
|
3941
|
+
var g;
|
|
3942
|
+
if ((u == null ? void 0 : u.buttonName) === "确认")
|
|
3943
|
+
a("filter", u == null ? void 0 : u.content);
|
|
3944
|
+
else if ((u == null ? void 0 : u.buttonName) === "清空") {
|
|
3945
|
+
const p = mt(u == null ? void 0 : u.content);
|
|
3946
|
+
for (const m in p)
|
|
3947
|
+
p[m] = "";
|
|
3948
|
+
l.value = (g = l.value) == null ? void 0 : g.map((m) => ({
|
|
3949
|
+
...m,
|
|
3950
|
+
value: ""
|
|
3951
|
+
})), a("filter", p);
|
|
3952
|
+
} else
|
|
3953
|
+
a("buttonClick", u, "", d);
|
|
3954
|
+
n.value = !1;
|
|
3955
|
+
};
|
|
3956
|
+
return (u, d) => {
|
|
3957
|
+
var p;
|
|
3958
|
+
const g = Se("svg-icon");
|
|
3959
|
+
return C(), q("div", Eo, [
|
|
3960
|
+
d[5] || (d[5] = ue("div", null, null, -1)),
|
|
3961
|
+
ue("div", Co, [
|
|
3962
|
+
ue("div", xo, [
|
|
3963
|
+
Ce(So, {
|
|
3964
|
+
trigger: "contextmenu",
|
|
3965
|
+
ref: "popOverRef",
|
|
3966
|
+
title: "",
|
|
3967
|
+
width: 800,
|
|
3968
|
+
placement: "bottom-start",
|
|
3969
|
+
isVisible: n.value,
|
|
3970
|
+
"onUpdate:isVisible": d[3] || (d[3] = (m) => n.value = m)
|
|
3971
|
+
}, {
|
|
3972
|
+
reference: W(() => d[4] || (d[4] = [])),
|
|
3973
|
+
content: W(() => [
|
|
3974
|
+
r.value ? (C(), q("div", {
|
|
3975
|
+
key: 0,
|
|
3976
|
+
class: "form-content-value",
|
|
3977
|
+
onKeydown: d[0] || (d[0] = qe(() => {
|
|
3978
|
+
}, ["stop"])),
|
|
3979
|
+
onKeyup: d[1] || (d[1] = qe(() => {
|
|
3980
|
+
}, ["stop"])),
|
|
3981
|
+
onKeypress: d[2] || (d[2] = qe(() => {
|
|
3982
|
+
}, ["stop"]))
|
|
3983
|
+
}, [
|
|
3984
|
+
Ce(ul, {
|
|
3985
|
+
rowContents: l.value,
|
|
3986
|
+
buttonValue: i.value,
|
|
3987
|
+
isEnableWrap: !1,
|
|
3988
|
+
isButtonRow: !1,
|
|
3989
|
+
isStartJustify: !1,
|
|
3990
|
+
onOnButtonClick: o
|
|
3991
|
+
}, null, 8, ["rowContents", "buttonValue"])
|
|
3992
|
+
], 32)) : ae("", !0)
|
|
3993
|
+
]),
|
|
3994
|
+
_: 1
|
|
3995
|
+
}, 8, ["isVisible"])
|
|
3996
|
+
]),
|
|
3997
|
+
e.buttons && ((p = e.buttons) == null ? void 0 : p.length) > 0 ? (C(), q("div", To, [
|
|
3998
|
+
(C(!0), q($e, null, Ve(e.buttons, (m) => {
|
|
3999
|
+
var f;
|
|
4000
|
+
return C(), q("div", Ao, [
|
|
4001
|
+
ue("div", {
|
|
4002
|
+
id: "themeButton",
|
|
4003
|
+
class: "table-op-action",
|
|
4004
|
+
onClick: (h) => o(m == null ? void 0 : m.label, m)
|
|
4005
|
+
}, [
|
|
4006
|
+
Ce(g, {
|
|
4007
|
+
class: "table-op-icon",
|
|
4008
|
+
name: ((f = c == null ? void 0 : c.find((h) => (h == null ? void 0 : h.label) === (m == null ? void 0 : m.label))) == null ? void 0 : f.icon) ?? "normal"
|
|
4009
|
+
}, null, 8, ["name"]),
|
|
4010
|
+
ue("span", Io, Me(m == null ? void 0 : m.label), 1)
|
|
4011
|
+
], 8, ko)
|
|
4012
|
+
]);
|
|
4013
|
+
}), 256))
|
|
4014
|
+
])) : ae("", !0)
|
|
4015
|
+
])
|
|
4016
|
+
]);
|
|
4017
|
+
};
|
|
4018
|
+
}
|
|
4019
|
+
}), Fo = /* @__PURE__ */ ut(Oo, [["__scopeId", "data-v-5e02e453"]]);
|
|
4020
|
+
export {
|
|
4021
|
+
ul as a,
|
|
4022
|
+
Lo as b,
|
|
4023
|
+
Kn as c,
|
|
4024
|
+
Yo as d,
|
|
4025
|
+
Bo as i,
|
|
4026
|
+
No as s,
|
|
4027
|
+
Fo as t,
|
|
4028
|
+
Ii as u
|
|
4029
|
+
};
|