st-comp 0.0.91 → 0.0.93
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/components.d.ts +0 -12
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +2 -2
- package/es/Dialog.cjs +5 -1
- package/es/Dialog.js +711 -45
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +1 -410
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +91 -92
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +9 -10
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +104 -106
- package/es/Table.cjs +20 -1
- package/es/Table.js +4254 -362
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +1 -2015
- package/es/VirtualTable.cjs +2 -2
- package/es/VirtualTable.js +254 -249
- package/es/base-8aa55db5.js +725 -0
- package/es/base-b187e78f.cjs +9 -0
- package/es/{el-button-93e0ac7c.js → el-button-9476b767.js} +69 -69
- package/es/{el-button-ec16f484.cjs → el-button-ed961332.cjs} +1 -1
- package/es/{el-empty-16ceef82.cjs → el-empty-7adcc7f0.cjs} +1 -1
- package/es/{el-empty-0c85d9b7.js → el-empty-f4c08c01.js} +3 -3
- package/es/{el-scrollbar-9473fd47.cjs → el-scrollbar-586be9bd.cjs} +1 -1
- package/es/{el-scrollbar-e17fad47.js → el-scrollbar-ffb7b9c1.js} +43 -43
- package/es/el-select-a6cf0236.js +1893 -0
- package/es/el-select-eaa79c54.cjs +9 -0
- package/es/el-tag-5a8b728a.cjs +1 -0
- package/es/{el-tag-9493bdff.js → el-tag-7549c103.js} +119 -126
- package/es/{focus-trap-1b2aef75.js → focus-trap-5fc152a0.js} +34 -35
- package/es/focus-trap-ea1e7a19.cjs +1 -0
- package/es/raf-3a2b250a.js +6 -0
- package/es/{raf-c437ab23.cjs → raf-c4bba516.cjs} +1 -1
- package/es/{scroll-a80e1458.cjs → scroll-38e17abc.cjs} +1 -1
- package/es/{scroll-a928a93e.js → scroll-c6e51ef8.js} +5 -5
- package/es/style.css +1 -1
- package/es/use-form-item-bd4b9eeb.js +531 -0
- package/es/use-form-item-c25c7251.cjs +3 -0
- package/es/use-global-config-2d21cd56.js +110 -0
- package/es/use-global-config-bce8cdd8.cjs +1 -0
- package/es/{vnode-85a610a2.cjs → vnode-40f9df3c.cjs} +1 -1
- package/es/{vnode-aa872900.js → vnode-f4b846cb.js} +1 -1
- package/es/zh-cn-a61d484e.cjs +1 -0
- package/es/{zh-cn-d29347f8.js → zh-cn-e36dfbf4.js} +45 -6
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +141 -141
- package/lib/{index-ee45a01a.js → index-4635557b.js} +10896 -10844
- package/lib/{python-1c6a2ac7.js → python-aa056c80.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/FactorWarning/index.vue +268 -202
- package/src/pages/FactorWarning/index.vue +852 -0
- package/es/base-1bc9f12c.js +0 -762
- package/es/base-315cbfab.cjs +0 -9
- package/es/castArray-f42865a2.js +0 -10
- package/es/castArray-f54f6f75.cjs +0 -1
- package/es/config-provider-17c85684.cjs +0 -1
- package/es/config-provider-c8d3957d.js +0 -46
- package/es/el-icon-0ea8fbf8.cjs +0 -1
- package/es/el-icon-4ed993c7.js +0 -1
- package/es/el-input-29806e42.js +0 -543
- package/es/el-input-a8791103.cjs +0 -9
- package/es/el-overlay-53eb27a5.js +0 -678
- package/es/el-overlay-6d0c5cc3.cjs +0 -5
- package/es/el-popover-1d087574.cjs +0 -1
- package/es/el-popover-dd66e2c8.js +0 -133
- package/es/el-radio-group-46e8f574.cjs +0 -12
- package/es/el-radio-group-caebab9d.js +0 -1743
- package/es/el-select-64511731.cjs +0 -1
- package/es/el-select-ac302f3c.js +0 -1360
- package/es/el-table-column-773986c7.cjs +0 -20
- package/es/el-table-column-b8e2141b.js +0 -3795
- package/es/el-tag-a6a4d4ef.cjs +0 -1
- package/es/focus-trap-ea177336.cjs +0 -1
- package/es/raf-6d7e80f4.js +0 -6
- package/es/use-form-item-7924b6c1.cjs +0 -3
- package/es/use-form-item-aeec8499.js +0 -669
- package/es/use-global-config-b07c467a.js +0 -110
- package/es/use-global-config-d02be80b.cjs +0 -1
- package/es/zh-cn-0024c96d.cjs +0 -1
|
@@ -1,3795 +0,0 @@
|
|
|
1
|
-
import { inject as re, computed as T, getCurrentInstance as ee, watch as ie, nextTick as Ee, ref as E, toRaw as Bt, defineComponent as he, useSlots as al, openBlock as D, createBlock as Le, resolveDynamicComponent as il, unref as O, normalizeClass as I, withCtx as ye, createElementVNode as oe, withDirectives as xe, createElementBlock as U, isRef as Be, withModifiers as Qe, vModelCheckbox as Ze, renderSlot as Fe, Fragment as Je, createTextVNode as ot, toDisplayString as Se, createCommentVNode as Ce, normalizeStyle as ke, provide as ul, toRefs as dl, resolveComponent as fe, resolveDirective as cl, createVNode as we, renderList as It, onBeforeMount as fl, onMounted as Ke, onUpdated as wn, onUnmounted as Rt, h as H, watchEffect as He, vShow as zt, Comment as Sn, onBeforeUnmount as xn } from "vue";
|
|
2
|
-
import { o as hl, p as Ve, q as vl, r as En, t as it, b as kn, v as Rn, U as Kt, k as Ln, f as Nn, w as On, S as Fn, j as Mn, x as An, i as Tn, y as Wn, z as Hn, l as pl, E as $n, C as Pn } from "./el-tag-9493bdff.js";
|
|
3
|
-
import { g as Bn } from "./_commonjsHelpers-10dfc225.js";
|
|
4
|
-
import { z as De, O as ml, S as Vt, A as et, y as gl, P as In, Q as zn, R as Kn, T as Vn, U as Dn, V as jn, i as ut, k as dt, l as tt, E as lt, j as Lt, B as Me, e as ct, u as se, _ as je, b as Gn, d as Un, w as bl, f as Nt, W as Ie, t as Yn, J as Dt, o as ze, g as yl, a as Cl, v as qn, h as Ue, r as ft } from "./base-1bc9f12c.js";
|
|
5
|
-
import { d as jt, c as wl, a as Xn, e as _n, g as Qn } from "./use-global-config-b07c467a.js";
|
|
6
|
-
import { G as Zn, r as Ot, s as Jn, t as Ft, h as ht, v as Sl, E as Mt, a as eo, x as to, y as lo, b as xl, H as no } from "./use-form-item-aeec8499.js";
|
|
7
|
-
import { d as nt, a as Gt, u as Ut } from "./el-scrollbar-e17fad47.js";
|
|
8
|
-
import { U as rt } from "./focus-trap-1b2aef75.js";
|
|
9
|
-
import { r as oo } from "./raf-6d7e80f4.js";
|
|
10
|
-
var Yt = Object.create, ro = function() {
|
|
11
|
-
function e() {
|
|
12
|
-
}
|
|
13
|
-
return function(t) {
|
|
14
|
-
if (!De(t))
|
|
15
|
-
return {};
|
|
16
|
-
if (Yt)
|
|
17
|
-
return Yt(t);
|
|
18
|
-
e.prototype = t;
|
|
19
|
-
var l = new e();
|
|
20
|
-
return e.prototype = void 0, l;
|
|
21
|
-
};
|
|
22
|
-
}();
|
|
23
|
-
const so = ro;
|
|
24
|
-
function ao(e, t, l) {
|
|
25
|
-
switch (l.length) {
|
|
26
|
-
case 0:
|
|
27
|
-
return e.call(t);
|
|
28
|
-
case 1:
|
|
29
|
-
return e.call(t, l[0]);
|
|
30
|
-
case 2:
|
|
31
|
-
return e.call(t, l[0], l[1]);
|
|
32
|
-
case 3:
|
|
33
|
-
return e.call(t, l[0], l[1], l[2]);
|
|
34
|
-
}
|
|
35
|
-
return e.apply(t, l);
|
|
36
|
-
}
|
|
37
|
-
function io(e, t) {
|
|
38
|
-
var l = -1, n = e.length;
|
|
39
|
-
for (t || (t = Array(n)); ++l < n; )
|
|
40
|
-
t[l] = e[l];
|
|
41
|
-
return t;
|
|
42
|
-
}
|
|
43
|
-
var uo = 800, co = 16, fo = Date.now;
|
|
44
|
-
function ho(e) {
|
|
45
|
-
var t = 0, l = 0;
|
|
46
|
-
return function() {
|
|
47
|
-
var n = fo(), r = co - (n - l);
|
|
48
|
-
if (l = n, r > 0) {
|
|
49
|
-
if (++t >= uo)
|
|
50
|
-
return arguments[0];
|
|
51
|
-
} else
|
|
52
|
-
t = 0;
|
|
53
|
-
return e.apply(void 0, arguments);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function vo(e) {
|
|
57
|
-
return function() {
|
|
58
|
-
return e;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
var po = jt ? function(e, t) {
|
|
62
|
-
return jt(e, "toString", {
|
|
63
|
-
configurable: !0,
|
|
64
|
-
enumerable: !1,
|
|
65
|
-
value: vo(t),
|
|
66
|
-
writable: !0
|
|
67
|
-
});
|
|
68
|
-
} : hl;
|
|
69
|
-
const mo = po;
|
|
70
|
-
var go = ho(mo);
|
|
71
|
-
const El = go;
|
|
72
|
-
function bo(e, t, l, n) {
|
|
73
|
-
var r = !l;
|
|
74
|
-
l || (l = {});
|
|
75
|
-
for (var a = -1, i = t.length; ++a < i; ) {
|
|
76
|
-
var o = t[a], s = n ? n(l[o], e[o], o, l, e) : void 0;
|
|
77
|
-
s === void 0 && (s = e[o]), r ? wl(l, o, s) : Xn(l, o, s);
|
|
78
|
-
}
|
|
79
|
-
return l;
|
|
80
|
-
}
|
|
81
|
-
var qt = Math.max;
|
|
82
|
-
function kl(e, t, l) {
|
|
83
|
-
return t = qt(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
84
|
-
for (var n = arguments, r = -1, a = qt(n.length - t, 0), i = Array(a); ++r < a; )
|
|
85
|
-
i[r] = n[t + r];
|
|
86
|
-
r = -1;
|
|
87
|
-
for (var o = Array(t + 1); ++r < t; )
|
|
88
|
-
o[r] = n[r];
|
|
89
|
-
return o[t] = l(i), ao(e, this, o);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function yo(e, t) {
|
|
93
|
-
return El(kl(e, t, hl), e + "");
|
|
94
|
-
}
|
|
95
|
-
function Co(e, t, l) {
|
|
96
|
-
if (!De(l))
|
|
97
|
-
return !1;
|
|
98
|
-
var n = typeof t;
|
|
99
|
-
return (n == "number" ? Ve(l) && Zn(t, l.length) : n == "string" && t in l) ? ml(l[t], e) : !1;
|
|
100
|
-
}
|
|
101
|
-
function wo(e) {
|
|
102
|
-
return yo(function(t, l) {
|
|
103
|
-
var n = -1, r = l.length, a = r > 1 ? l[r - 1] : void 0, i = r > 2 ? l[2] : void 0;
|
|
104
|
-
for (a = e.length > 3 && typeof a == "function" ? (r--, a) : void 0, i && Co(l[0], l[1], i) && (a = r < 3 ? void 0 : a, r = 1), t = Object(t); ++n < r; ) {
|
|
105
|
-
var o = l[n];
|
|
106
|
-
o && e(t, o, n, a);
|
|
107
|
-
}
|
|
108
|
-
return t;
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function So(e) {
|
|
112
|
-
var t = [];
|
|
113
|
-
if (e != null)
|
|
114
|
-
for (var l in Object(e))
|
|
115
|
-
t.push(l);
|
|
116
|
-
return t;
|
|
117
|
-
}
|
|
118
|
-
var xo = Object.prototype, Eo = xo.hasOwnProperty;
|
|
119
|
-
function ko(e) {
|
|
120
|
-
if (!De(e))
|
|
121
|
-
return So(e);
|
|
122
|
-
var t = vl(e), l = [];
|
|
123
|
-
for (var n in e)
|
|
124
|
-
n == "constructor" && (t || !Eo.call(e, n)) || l.push(n);
|
|
125
|
-
return l;
|
|
126
|
-
}
|
|
127
|
-
function Rl(e) {
|
|
128
|
-
return Ve(e) ? En(e, !0) : ko(e);
|
|
129
|
-
}
|
|
130
|
-
var Xt = Vt ? Vt.isConcatSpreadable : void 0;
|
|
131
|
-
function Ro(e) {
|
|
132
|
-
return et(e) || it(e) || !!(Xt && e && e[Xt]);
|
|
133
|
-
}
|
|
134
|
-
function At(e, t, l, n, r) {
|
|
135
|
-
var a = -1, i = e.length;
|
|
136
|
-
for (l || (l = Ro), r || (r = []); ++a < i; ) {
|
|
137
|
-
var o = e[a];
|
|
138
|
-
t > 0 && l(o) ? t > 1 ? At(o, t - 1, l, n, r) : kn(r, o) : n || (r[r.length] = o);
|
|
139
|
-
}
|
|
140
|
-
return r;
|
|
141
|
-
}
|
|
142
|
-
function Lo(e) {
|
|
143
|
-
var t = e == null ? 0 : e.length;
|
|
144
|
-
return t ? At(e, 1) : [];
|
|
145
|
-
}
|
|
146
|
-
function No(e) {
|
|
147
|
-
return El(kl(e, void 0, Lo), e + "");
|
|
148
|
-
}
|
|
149
|
-
var Oo = Rn(Object.getPrototypeOf, Object);
|
|
150
|
-
const Ll = Oo;
|
|
151
|
-
var Fo = "[object Object]", Mo = Function.prototype, Ao = Object.prototype, Nl = Mo.toString, To = Ao.hasOwnProperty, Wo = Nl.call(Object);
|
|
152
|
-
function Ho(e) {
|
|
153
|
-
if (!gl(e) || In(e) != Fo)
|
|
154
|
-
return !1;
|
|
155
|
-
var t = Ll(e);
|
|
156
|
-
if (t === null)
|
|
157
|
-
return !0;
|
|
158
|
-
var l = To.call(t, "constructor") && t.constructor;
|
|
159
|
-
return typeof l == "function" && l instanceof l && Nl.call(l) == Wo;
|
|
160
|
-
}
|
|
161
|
-
var Ol = typeof exports == "object" && exports && !exports.nodeType && exports, _t = Ol && typeof module == "object" && module && !module.nodeType && module, $o = _t && _t.exports === Ol, Qt = $o ? zn.Buffer : void 0, Zt = Qt ? Qt.allocUnsafe : void 0;
|
|
162
|
-
function Po(e, t) {
|
|
163
|
-
if (t)
|
|
164
|
-
return e.slice();
|
|
165
|
-
var l = e.length, n = Zt ? Zt(l) : new e.constructor(l);
|
|
166
|
-
return e.copy(n), n;
|
|
167
|
-
}
|
|
168
|
-
function Bo(e) {
|
|
169
|
-
var t = new e.constructor(e.byteLength);
|
|
170
|
-
return new Kt(t).set(new Kt(e)), t;
|
|
171
|
-
}
|
|
172
|
-
function Io(e, t) {
|
|
173
|
-
var l = t ? Bo(e.buffer) : e.buffer;
|
|
174
|
-
return new e.constructor(l, e.byteOffset, e.length);
|
|
175
|
-
}
|
|
176
|
-
function zo(e) {
|
|
177
|
-
return typeof e.constructor == "function" && !vl(e) ? so(Ll(e)) : {};
|
|
178
|
-
}
|
|
179
|
-
function Ko(e) {
|
|
180
|
-
return function(t, l, n) {
|
|
181
|
-
for (var r = -1, a = Object(t), i = n(t), o = i.length; o--; ) {
|
|
182
|
-
var s = i[e ? o : ++r];
|
|
183
|
-
if (l(a[s], s, a) === !1)
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
return t;
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
var Vo = Ko();
|
|
190
|
-
const Fl = Vo;
|
|
191
|
-
function Do(e, t) {
|
|
192
|
-
return e && Fl(e, t, Ln);
|
|
193
|
-
}
|
|
194
|
-
function jo(e, t) {
|
|
195
|
-
return function(l, n) {
|
|
196
|
-
if (l == null)
|
|
197
|
-
return l;
|
|
198
|
-
if (!Ve(l))
|
|
199
|
-
return e(l, n);
|
|
200
|
-
for (var r = l.length, a = t ? r : -1, i = Object(l); (t ? a-- : ++a < r) && n(i[a], a, i) !== !1; )
|
|
201
|
-
;
|
|
202
|
-
return l;
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
var Go = jo(Do);
|
|
206
|
-
const Uo = Go;
|
|
207
|
-
function vt(e, t, l) {
|
|
208
|
-
(l !== void 0 && !ml(e[t], l) || l === void 0 && !(t in e)) && wl(e, t, l);
|
|
209
|
-
}
|
|
210
|
-
function Yo(e) {
|
|
211
|
-
return gl(e) && Ve(e);
|
|
212
|
-
}
|
|
213
|
-
function pt(e, t) {
|
|
214
|
-
if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
|
|
215
|
-
return e[t];
|
|
216
|
-
}
|
|
217
|
-
function qo(e) {
|
|
218
|
-
return bo(e, Rl(e));
|
|
219
|
-
}
|
|
220
|
-
function Xo(e, t, l, n, r, a, i) {
|
|
221
|
-
var o = pt(e, l), s = pt(t, l), u = i.get(s);
|
|
222
|
-
if (u) {
|
|
223
|
-
vt(e, l, u);
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
var d = a ? a(o, s, l + "", e, t, i) : void 0, h = d === void 0;
|
|
227
|
-
if (h) {
|
|
228
|
-
var p = et(s), m = !p && Nn(s), f = !p && !m && On(s);
|
|
229
|
-
d = s, p || m || f ? et(o) ? d = o : Yo(o) ? d = io(o) : m ? (h = !1, d = Po(s, !0)) : f ? (h = !1, d = Io(s, !0)) : d = [] : Ho(s) || it(s) ? (d = o, it(o) ? d = qo(o) : (!De(o) || Kn(o)) && (d = zo(s))) : h = !1;
|
|
230
|
-
}
|
|
231
|
-
h && (i.set(s, d), r(d, s, n, a, i), i.delete(s)), vt(e, l, d);
|
|
232
|
-
}
|
|
233
|
-
function Ml(e, t, l, n, r) {
|
|
234
|
-
e !== t && Fl(t, function(a, i) {
|
|
235
|
-
if (r || (r = new Fn()), De(a))
|
|
236
|
-
Xo(e, t, i, l, Ml, n, r);
|
|
237
|
-
else {
|
|
238
|
-
var o = n ? n(pt(e, i), a, i + "", e, t, r) : void 0;
|
|
239
|
-
o === void 0 && (o = a), vt(e, i, o);
|
|
240
|
-
}
|
|
241
|
-
}, Rl);
|
|
242
|
-
}
|
|
243
|
-
function _o(e, t) {
|
|
244
|
-
var l = -1, n = Ve(e) ? Array(e.length) : [];
|
|
245
|
-
return Uo(e, function(r, a, i) {
|
|
246
|
-
n[++l] = t(r, a, i);
|
|
247
|
-
}), n;
|
|
248
|
-
}
|
|
249
|
-
function Qo(e, t) {
|
|
250
|
-
var l = et(e) ? Vn : _o;
|
|
251
|
-
return l(e, Mn(t));
|
|
252
|
-
}
|
|
253
|
-
function Zo(e, t) {
|
|
254
|
-
return At(Qo(e, t), 1);
|
|
255
|
-
}
|
|
256
|
-
var Jo = wo(function(e, t, l) {
|
|
257
|
-
Ml(e, t, l);
|
|
258
|
-
});
|
|
259
|
-
const Al = Jo;
|
|
260
|
-
function er(e, t, l) {
|
|
261
|
-
for (var n = -1, r = t.length, a = {}; ++n < r; ) {
|
|
262
|
-
var i = t[n], o = Dn(e, i);
|
|
263
|
-
l(o, i) && _n(a, jn(i, e), o);
|
|
264
|
-
}
|
|
265
|
-
return a;
|
|
266
|
-
}
|
|
267
|
-
function tr(e, t) {
|
|
268
|
-
return er(e, t, function(l, n) {
|
|
269
|
-
return An(e, n);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
var lr = No(function(e, t) {
|
|
273
|
-
return e == null ? {} : tr(e, t);
|
|
274
|
-
});
|
|
275
|
-
const nr = lr;
|
|
276
|
-
var Jt = !1, Re, mt, gt, Ye, qe, Tl, Xe, bt, yt, Ct, Wl, wt, St, Hl, $l;
|
|
277
|
-
function ne() {
|
|
278
|
-
if (!Jt) {
|
|
279
|
-
Jt = !0;
|
|
280
|
-
var e = navigator.userAgent, t = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), l = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
|
|
281
|
-
if (wt = /\b(iPhone|iP[ao]d)/.exec(e), St = /\b(iP[ao]d)/.exec(e), Ct = /Android/i.exec(e), Hl = /FBAN\/\w+;/i.exec(e), $l = /Mobile/i.exec(e), Wl = !!/Win64/.exec(e), t) {
|
|
282
|
-
Re = t[1] ? parseFloat(t[1]) : t[5] ? parseFloat(t[5]) : NaN, Re && document && document.documentMode && (Re = document.documentMode);
|
|
283
|
-
var n = /(?:Trident\/(\d+.\d+))/.exec(e);
|
|
284
|
-
Tl = n ? parseFloat(n[1]) + 4 : Re, mt = t[2] ? parseFloat(t[2]) : NaN, gt = t[3] ? parseFloat(t[3]) : NaN, Ye = t[4] ? parseFloat(t[4]) : NaN, Ye ? (t = /(?:Chrome\/(\d+\.\d+))/.exec(e), qe = t && t[1] ? parseFloat(t[1]) : NaN) : qe = NaN;
|
|
285
|
-
} else
|
|
286
|
-
Re = mt = gt = qe = Ye = NaN;
|
|
287
|
-
if (l) {
|
|
288
|
-
if (l[1]) {
|
|
289
|
-
var r = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
|
|
290
|
-
Xe = r ? parseFloat(r[1].replace("_", ".")) : !0;
|
|
291
|
-
} else
|
|
292
|
-
Xe = !1;
|
|
293
|
-
bt = !!l[2], yt = !!l[3];
|
|
294
|
-
} else
|
|
295
|
-
Xe = bt = yt = !1;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
var xt = { ie: function() {
|
|
299
|
-
return ne() || Re;
|
|
300
|
-
}, ieCompatibilityMode: function() {
|
|
301
|
-
return ne() || Tl > Re;
|
|
302
|
-
}, ie64: function() {
|
|
303
|
-
return xt.ie() && Wl;
|
|
304
|
-
}, firefox: function() {
|
|
305
|
-
return ne() || mt;
|
|
306
|
-
}, opera: function() {
|
|
307
|
-
return ne() || gt;
|
|
308
|
-
}, webkit: function() {
|
|
309
|
-
return ne() || Ye;
|
|
310
|
-
}, safari: function() {
|
|
311
|
-
return xt.webkit();
|
|
312
|
-
}, chrome: function() {
|
|
313
|
-
return ne() || qe;
|
|
314
|
-
}, windows: function() {
|
|
315
|
-
return ne() || bt;
|
|
316
|
-
}, osx: function() {
|
|
317
|
-
return ne() || Xe;
|
|
318
|
-
}, linux: function() {
|
|
319
|
-
return ne() || yt;
|
|
320
|
-
}, iphone: function() {
|
|
321
|
-
return ne() || wt;
|
|
322
|
-
}, mobile: function() {
|
|
323
|
-
return ne() || wt || St || Ct || $l;
|
|
324
|
-
}, nativeApp: function() {
|
|
325
|
-
return ne() || Hl;
|
|
326
|
-
}, android: function() {
|
|
327
|
-
return ne() || Ct;
|
|
328
|
-
}, ipad: function() {
|
|
329
|
-
return ne() || St;
|
|
330
|
-
} }, or = xt, Ge = !!(typeof window < "u" && window.document && window.document.createElement), rr = { canUseDOM: Ge, canUseWorkers: typeof Worker < "u", canUseEventListeners: Ge && !!(window.addEventListener || window.attachEvent), canUseViewport: Ge && !!window.screen, isInWorker: !Ge }, Pl = rr, Bl;
|
|
331
|
-
Pl.canUseDOM && (Bl = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
|
|
332
|
-
function sr(e, t) {
|
|
333
|
-
if (!Pl.canUseDOM || t && !("addEventListener" in document))
|
|
334
|
-
return !1;
|
|
335
|
-
var l = "on" + e, n = l in document;
|
|
336
|
-
if (!n) {
|
|
337
|
-
var r = document.createElement("div");
|
|
338
|
-
r.setAttribute(l, "return;"), n = typeof r[l] == "function";
|
|
339
|
-
}
|
|
340
|
-
return !n && Bl && e === "wheel" && (n = document.implementation.hasFeature("Events.wheel", "3.0")), n;
|
|
341
|
-
}
|
|
342
|
-
var ar = sr, el = 10, tl = 40, ll = 800;
|
|
343
|
-
function Il(e) {
|
|
344
|
-
var t = 0, l = 0, n = 0, r = 0;
|
|
345
|
-
return "detail" in e && (l = e.detail), "wheelDelta" in e && (l = -e.wheelDelta / 120), "wheelDeltaY" in e && (l = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = l, l = 0), n = t * el, r = l * el, "deltaY" in e && (r = e.deltaY), "deltaX" in e && (n = e.deltaX), (n || r) && e.deltaMode && (e.deltaMode == 1 ? (n *= tl, r *= tl) : (n *= ll, r *= ll)), n && !t && (t = n < 1 ? -1 : 1), r && !l && (l = r < 1 ? -1 : 1), { spinX: t, spinY: l, pixelX: n, pixelY: r };
|
|
346
|
-
}
|
|
347
|
-
Il.getEventType = function() {
|
|
348
|
-
return or.firefox() ? "DOMMouseScroll" : ar("wheel") ? "wheel" : "mousewheel";
|
|
349
|
-
};
|
|
350
|
-
var ir = Il;
|
|
351
|
-
/**
|
|
352
|
-
* Checks if an event is supported in the current execution environment.
|
|
353
|
-
*
|
|
354
|
-
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
355
|
-
* `reset`, `load`, `error`, and `select`.
|
|
356
|
-
*
|
|
357
|
-
* Borrows from Modernizr.
|
|
358
|
-
*
|
|
359
|
-
* @param {string} eventNameSuffix Event name, e.g. "click".
|
|
360
|
-
* @param {?boolean} capture Check if the capture phase is supported.
|
|
361
|
-
* @return {boolean} True if the event is supported.
|
|
362
|
-
* @internal
|
|
363
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
364
|
-
*/
|
|
365
|
-
const ur = function(e, t) {
|
|
366
|
-
if (e && e.addEventListener) {
|
|
367
|
-
const l = function(n) {
|
|
368
|
-
const r = ir(n);
|
|
369
|
-
t && Reflect.apply(t, this, [n, r]);
|
|
370
|
-
};
|
|
371
|
-
e.addEventListener("wheel", l, { passive: !0 });
|
|
372
|
-
}
|
|
373
|
-
}, dr = {
|
|
374
|
-
beforeMount(e, t) {
|
|
375
|
-
ur(e, t.value);
|
|
376
|
-
}
|
|
377
|
-
}, zl = {
|
|
378
|
-
modelValue: {
|
|
379
|
-
type: [Number, String, Boolean],
|
|
380
|
-
default: void 0
|
|
381
|
-
},
|
|
382
|
-
label: {
|
|
383
|
-
type: [String, Boolean, Number, Object]
|
|
384
|
-
},
|
|
385
|
-
indeterminate: Boolean,
|
|
386
|
-
disabled: Boolean,
|
|
387
|
-
checked: Boolean,
|
|
388
|
-
name: {
|
|
389
|
-
type: String,
|
|
390
|
-
default: void 0
|
|
391
|
-
},
|
|
392
|
-
trueLabel: {
|
|
393
|
-
type: [String, Number],
|
|
394
|
-
default: void 0
|
|
395
|
-
},
|
|
396
|
-
falseLabel: {
|
|
397
|
-
type: [String, Number],
|
|
398
|
-
default: void 0
|
|
399
|
-
},
|
|
400
|
-
id: {
|
|
401
|
-
type: String,
|
|
402
|
-
default: void 0
|
|
403
|
-
},
|
|
404
|
-
controls: {
|
|
405
|
-
type: String,
|
|
406
|
-
default: void 0
|
|
407
|
-
},
|
|
408
|
-
border: Boolean,
|
|
409
|
-
size: Ot,
|
|
410
|
-
tabindex: [String, Number],
|
|
411
|
-
validateEvent: {
|
|
412
|
-
type: Boolean,
|
|
413
|
-
default: !0
|
|
414
|
-
}
|
|
415
|
-
}, Kl = {
|
|
416
|
-
[rt]: (e) => ut(e) || dt(e) || tt(e),
|
|
417
|
-
change: (e) => ut(e) || dt(e) || tt(e)
|
|
418
|
-
}, We = Symbol("checkboxGroupContextKey"), cr = ({
|
|
419
|
-
model: e,
|
|
420
|
-
isChecked: t
|
|
421
|
-
}) => {
|
|
422
|
-
const l = re(We, void 0), n = T(() => {
|
|
423
|
-
var a, i;
|
|
424
|
-
const o = (a = l == null ? void 0 : l.max) == null ? void 0 : a.value, s = (i = l == null ? void 0 : l.min) == null ? void 0 : i.value;
|
|
425
|
-
return !lt(o) && e.value.length >= o && !t.value || !lt(s) && e.value.length <= s && t.value;
|
|
426
|
-
});
|
|
427
|
-
return {
|
|
428
|
-
isDisabled: Jn(T(() => (l == null ? void 0 : l.disabled.value) || n.value)),
|
|
429
|
-
isLimitDisabled: n
|
|
430
|
-
};
|
|
431
|
-
}, fr = (e, {
|
|
432
|
-
model: t,
|
|
433
|
-
isLimitExceeded: l,
|
|
434
|
-
hasOwnLabel: n,
|
|
435
|
-
isDisabled: r,
|
|
436
|
-
isLabeledByFormItem: a
|
|
437
|
-
}) => {
|
|
438
|
-
const i = re(We, void 0), { formItem: o } = Ft(), { emit: s } = ee();
|
|
439
|
-
function u(f) {
|
|
440
|
-
var g, v;
|
|
441
|
-
return f === e.trueLabel || f === !0 ? (g = e.trueLabel) != null ? g : !0 : (v = e.falseLabel) != null ? v : !1;
|
|
442
|
-
}
|
|
443
|
-
function d(f, g) {
|
|
444
|
-
s("change", u(f), g);
|
|
445
|
-
}
|
|
446
|
-
function h(f) {
|
|
447
|
-
if (l.value)
|
|
448
|
-
return;
|
|
449
|
-
const g = f.target;
|
|
450
|
-
s("change", u(g.checked), f);
|
|
451
|
-
}
|
|
452
|
-
async function p(f) {
|
|
453
|
-
l.value || !n.value && !r.value && a.value && (f.composedPath().some((y) => y.tagName === "LABEL") || (t.value = u([!1, e.falseLabel].includes(t.value)), await Ee(), d(t.value, f)));
|
|
454
|
-
}
|
|
455
|
-
const m = T(() => (i == null ? void 0 : i.validateEvent) || e.validateEvent);
|
|
456
|
-
return ie(() => e.modelValue, () => {
|
|
457
|
-
m.value && (o == null || o.validate("change").catch((f) => Lt(f)));
|
|
458
|
-
}), {
|
|
459
|
-
handleChange: h,
|
|
460
|
-
onClickRoot: p
|
|
461
|
-
};
|
|
462
|
-
}, hr = (e) => {
|
|
463
|
-
const t = E(!1), { emit: l } = ee(), n = re(We, void 0), r = T(() => lt(n) === !1), a = E(!1);
|
|
464
|
-
return {
|
|
465
|
-
model: T({
|
|
466
|
-
get() {
|
|
467
|
-
var o, s;
|
|
468
|
-
return r.value ? (o = n == null ? void 0 : n.modelValue) == null ? void 0 : o.value : (s = e.modelValue) != null ? s : t.value;
|
|
469
|
-
},
|
|
470
|
-
set(o) {
|
|
471
|
-
var s, u;
|
|
472
|
-
r.value && Me(o) ? (a.value = ((s = n == null ? void 0 : n.max) == null ? void 0 : s.value) !== void 0 && o.length > (n == null ? void 0 : n.max.value), a.value === !1 && ((u = n == null ? void 0 : n.changeEvent) == null || u.call(n, o))) : (l(rt, o), t.value = o);
|
|
473
|
-
}
|
|
474
|
-
}),
|
|
475
|
-
isGroup: r,
|
|
476
|
-
isLimitExceeded: a
|
|
477
|
-
};
|
|
478
|
-
}, vr = (e, t, { model: l }) => {
|
|
479
|
-
const n = re(We, void 0), r = E(!1), a = T(() => {
|
|
480
|
-
const u = l.value;
|
|
481
|
-
return tt(u) ? u : Me(u) ? ct(e.label) ? u.map(Bt).some((d) => Tn(d, e.label)) : u.map(Bt).includes(e.label) : u != null ? u === e.trueLabel : !!u;
|
|
482
|
-
}), i = ht(T(() => {
|
|
483
|
-
var u;
|
|
484
|
-
return (u = n == null ? void 0 : n.size) == null ? void 0 : u.value;
|
|
485
|
-
}), {
|
|
486
|
-
prop: !0
|
|
487
|
-
}), o = ht(T(() => {
|
|
488
|
-
var u;
|
|
489
|
-
return (u = n == null ? void 0 : n.size) == null ? void 0 : u.value;
|
|
490
|
-
})), s = T(() => !!(t.default || e.label));
|
|
491
|
-
return {
|
|
492
|
-
checkboxButtonSize: i,
|
|
493
|
-
isChecked: a,
|
|
494
|
-
isFocused: r,
|
|
495
|
-
checkboxSize: o,
|
|
496
|
-
hasOwnLabel: s
|
|
497
|
-
};
|
|
498
|
-
}, pr = (e, { model: t }) => {
|
|
499
|
-
function l() {
|
|
500
|
-
Me(t.value) && !t.value.includes(e.label) ? t.value.push(e.label) : t.value = e.trueLabel || !0;
|
|
501
|
-
}
|
|
502
|
-
e.checked && l();
|
|
503
|
-
}, Vl = (e, t) => {
|
|
504
|
-
const { formItem: l } = Ft(), { model: n, isGroup: r, isLimitExceeded: a } = hr(e), {
|
|
505
|
-
isFocused: i,
|
|
506
|
-
isChecked: o,
|
|
507
|
-
checkboxButtonSize: s,
|
|
508
|
-
checkboxSize: u,
|
|
509
|
-
hasOwnLabel: d
|
|
510
|
-
} = vr(e, t, { model: n }), { isDisabled: h } = cr({ model: n, isChecked: o }), { inputId: p, isLabeledByFormItem: m } = Sl(e, {
|
|
511
|
-
formItemContext: l,
|
|
512
|
-
disableIdGeneration: d,
|
|
513
|
-
disableIdManagement: r
|
|
514
|
-
}), { handleChange: f, onClickRoot: g } = fr(e, {
|
|
515
|
-
model: n,
|
|
516
|
-
isLimitExceeded: a,
|
|
517
|
-
hasOwnLabel: d,
|
|
518
|
-
isDisabled: h,
|
|
519
|
-
isLabeledByFormItem: m
|
|
520
|
-
});
|
|
521
|
-
return pr(e, { model: n }), {
|
|
522
|
-
inputId: p,
|
|
523
|
-
isLabeledByFormItem: m,
|
|
524
|
-
isChecked: o,
|
|
525
|
-
isDisabled: h,
|
|
526
|
-
isFocused: i,
|
|
527
|
-
checkboxButtonSize: s,
|
|
528
|
-
checkboxSize: u,
|
|
529
|
-
hasOwnLabel: d,
|
|
530
|
-
model: n,
|
|
531
|
-
handleChange: f,
|
|
532
|
-
onClickRoot: g
|
|
533
|
-
};
|
|
534
|
-
}, mr = ["tabindex", "role", "aria-checked"], gr = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"], br = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"], yr = he({
|
|
535
|
-
name: "ElCheckbox"
|
|
536
|
-
}), Cr = /* @__PURE__ */ he({
|
|
537
|
-
...yr,
|
|
538
|
-
props: zl,
|
|
539
|
-
emits: Kl,
|
|
540
|
-
setup(e) {
|
|
541
|
-
const t = e, l = al(), {
|
|
542
|
-
inputId: n,
|
|
543
|
-
isLabeledByFormItem: r,
|
|
544
|
-
isChecked: a,
|
|
545
|
-
isDisabled: i,
|
|
546
|
-
isFocused: o,
|
|
547
|
-
checkboxSize: s,
|
|
548
|
-
hasOwnLabel: u,
|
|
549
|
-
model: d,
|
|
550
|
-
handleChange: h,
|
|
551
|
-
onClickRoot: p
|
|
552
|
-
} = Vl(t, l), m = se("checkbox"), f = T(() => [
|
|
553
|
-
m.b(),
|
|
554
|
-
m.m(s.value),
|
|
555
|
-
m.is("disabled", i.value),
|
|
556
|
-
m.is("bordered", t.border),
|
|
557
|
-
m.is("checked", a.value)
|
|
558
|
-
]), g = T(() => [
|
|
559
|
-
m.e("input"),
|
|
560
|
-
m.is("disabled", i.value),
|
|
561
|
-
m.is("checked", a.value),
|
|
562
|
-
m.is("indeterminate", t.indeterminate),
|
|
563
|
-
m.is("focus", o.value)
|
|
564
|
-
]);
|
|
565
|
-
return (v, y) => (D(), Le(il(!O(u) && O(r) ? "span" : "label"), {
|
|
566
|
-
class: I(O(f)),
|
|
567
|
-
"aria-controls": v.indeterminate ? v.controls : null,
|
|
568
|
-
onClick: O(p)
|
|
569
|
-
}, {
|
|
570
|
-
default: ye(() => [
|
|
571
|
-
oe("span", {
|
|
572
|
-
class: I(O(g)),
|
|
573
|
-
tabindex: v.indeterminate ? 0 : void 0,
|
|
574
|
-
role: v.indeterminate ? "checkbox" : void 0,
|
|
575
|
-
"aria-checked": v.indeterminate ? "mixed" : void 0
|
|
576
|
-
}, [
|
|
577
|
-
v.trueLabel || v.falseLabel ? xe((D(), U("input", {
|
|
578
|
-
key: 0,
|
|
579
|
-
id: O(n),
|
|
580
|
-
"onUpdate:modelValue": y[0] || (y[0] = (b) => Be(d) ? d.value = b : null),
|
|
581
|
-
class: I(O(m).e("original")),
|
|
582
|
-
type: "checkbox",
|
|
583
|
-
"aria-hidden": v.indeterminate ? "true" : "false",
|
|
584
|
-
name: v.name,
|
|
585
|
-
tabindex: v.tabindex,
|
|
586
|
-
disabled: O(i),
|
|
587
|
-
"true-value": v.trueLabel,
|
|
588
|
-
"false-value": v.falseLabel,
|
|
589
|
-
onChange: y[1] || (y[1] = (...b) => O(h) && O(h)(...b)),
|
|
590
|
-
onFocus: y[2] || (y[2] = (b) => o.value = !0),
|
|
591
|
-
onBlur: y[3] || (y[3] = (b) => o.value = !1),
|
|
592
|
-
onClick: y[4] || (y[4] = Qe(() => {
|
|
593
|
-
}, ["stop"]))
|
|
594
|
-
}, null, 42, gr)), [
|
|
595
|
-
[Ze, O(d)]
|
|
596
|
-
]) : xe((D(), U("input", {
|
|
597
|
-
key: 1,
|
|
598
|
-
id: O(n),
|
|
599
|
-
"onUpdate:modelValue": y[5] || (y[5] = (b) => Be(d) ? d.value = b : null),
|
|
600
|
-
class: I(O(m).e("original")),
|
|
601
|
-
type: "checkbox",
|
|
602
|
-
"aria-hidden": v.indeterminate ? "true" : "false",
|
|
603
|
-
disabled: O(i),
|
|
604
|
-
value: v.label,
|
|
605
|
-
name: v.name,
|
|
606
|
-
tabindex: v.tabindex,
|
|
607
|
-
onChange: y[6] || (y[6] = (...b) => O(h) && O(h)(...b)),
|
|
608
|
-
onFocus: y[7] || (y[7] = (b) => o.value = !0),
|
|
609
|
-
onBlur: y[8] || (y[8] = (b) => o.value = !1),
|
|
610
|
-
onClick: y[9] || (y[9] = Qe(() => {
|
|
611
|
-
}, ["stop"]))
|
|
612
|
-
}, null, 42, br)), [
|
|
613
|
-
[Ze, O(d)]
|
|
614
|
-
]),
|
|
615
|
-
oe("span", {
|
|
616
|
-
class: I(O(m).e("inner"))
|
|
617
|
-
}, null, 2)
|
|
618
|
-
], 10, mr),
|
|
619
|
-
O(u) ? (D(), U("span", {
|
|
620
|
-
key: 0,
|
|
621
|
-
class: I(O(m).e("label"))
|
|
622
|
-
}, [
|
|
623
|
-
Fe(v.$slots, "default"),
|
|
624
|
-
v.$slots.default ? Ce("v-if", !0) : (D(), U(Je, { key: 0 }, [
|
|
625
|
-
ot(Se(v.label), 1)
|
|
626
|
-
], 64))
|
|
627
|
-
], 2)) : Ce("v-if", !0)
|
|
628
|
-
]),
|
|
629
|
-
_: 3
|
|
630
|
-
}, 8, ["class", "aria-controls", "onClick"]));
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
var wr = /* @__PURE__ */ je(Cr, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);
|
|
634
|
-
const Sr = ["name", "tabindex", "disabled", "true-value", "false-value"], xr = ["name", "tabindex", "disabled", "value"], Er = he({
|
|
635
|
-
name: "ElCheckboxButton"
|
|
636
|
-
}), kr = /* @__PURE__ */ he({
|
|
637
|
-
...Er,
|
|
638
|
-
props: zl,
|
|
639
|
-
emits: Kl,
|
|
640
|
-
setup(e) {
|
|
641
|
-
const t = e, l = al(), {
|
|
642
|
-
isFocused: n,
|
|
643
|
-
isChecked: r,
|
|
644
|
-
isDisabled: a,
|
|
645
|
-
checkboxButtonSize: i,
|
|
646
|
-
model: o,
|
|
647
|
-
handleChange: s
|
|
648
|
-
} = Vl(t, l), u = re(We, void 0), d = se("checkbox"), h = T(() => {
|
|
649
|
-
var m, f, g, v;
|
|
650
|
-
const y = (f = (m = u == null ? void 0 : u.fill) == null ? void 0 : m.value) != null ? f : "";
|
|
651
|
-
return {
|
|
652
|
-
backgroundColor: y,
|
|
653
|
-
borderColor: y,
|
|
654
|
-
color: (v = (g = u == null ? void 0 : u.textColor) == null ? void 0 : g.value) != null ? v : "",
|
|
655
|
-
boxShadow: y ? `-1px 0 0 0 ${y}` : void 0
|
|
656
|
-
};
|
|
657
|
-
}), p = T(() => [
|
|
658
|
-
d.b("button"),
|
|
659
|
-
d.bm("button", i.value),
|
|
660
|
-
d.is("disabled", a.value),
|
|
661
|
-
d.is("checked", r.value),
|
|
662
|
-
d.is("focus", n.value)
|
|
663
|
-
]);
|
|
664
|
-
return (m, f) => (D(), U("label", {
|
|
665
|
-
class: I(O(p))
|
|
666
|
-
}, [
|
|
667
|
-
m.trueLabel || m.falseLabel ? xe((D(), U("input", {
|
|
668
|
-
key: 0,
|
|
669
|
-
"onUpdate:modelValue": f[0] || (f[0] = (g) => Be(o) ? o.value = g : null),
|
|
670
|
-
class: I(O(d).be("button", "original")),
|
|
671
|
-
type: "checkbox",
|
|
672
|
-
name: m.name,
|
|
673
|
-
tabindex: m.tabindex,
|
|
674
|
-
disabled: O(a),
|
|
675
|
-
"true-value": m.trueLabel,
|
|
676
|
-
"false-value": m.falseLabel,
|
|
677
|
-
onChange: f[1] || (f[1] = (...g) => O(s) && O(s)(...g)),
|
|
678
|
-
onFocus: f[2] || (f[2] = (g) => n.value = !0),
|
|
679
|
-
onBlur: f[3] || (f[3] = (g) => n.value = !1),
|
|
680
|
-
onClick: f[4] || (f[4] = Qe(() => {
|
|
681
|
-
}, ["stop"]))
|
|
682
|
-
}, null, 42, Sr)), [
|
|
683
|
-
[Ze, O(o)]
|
|
684
|
-
]) : xe((D(), U("input", {
|
|
685
|
-
key: 1,
|
|
686
|
-
"onUpdate:modelValue": f[5] || (f[5] = (g) => Be(o) ? o.value = g : null),
|
|
687
|
-
class: I(O(d).be("button", "original")),
|
|
688
|
-
type: "checkbox",
|
|
689
|
-
name: m.name,
|
|
690
|
-
tabindex: m.tabindex,
|
|
691
|
-
disabled: O(a),
|
|
692
|
-
value: m.label,
|
|
693
|
-
onChange: f[6] || (f[6] = (...g) => O(s) && O(s)(...g)),
|
|
694
|
-
onFocus: f[7] || (f[7] = (g) => n.value = !0),
|
|
695
|
-
onBlur: f[8] || (f[8] = (g) => n.value = !1),
|
|
696
|
-
onClick: f[9] || (f[9] = Qe(() => {
|
|
697
|
-
}, ["stop"]))
|
|
698
|
-
}, null, 42, xr)), [
|
|
699
|
-
[Ze, O(o)]
|
|
700
|
-
]),
|
|
701
|
-
m.$slots.default || m.label ? (D(), U("span", {
|
|
702
|
-
key: 2,
|
|
703
|
-
class: I(O(d).be("button", "inner")),
|
|
704
|
-
style: ke(O(r) ? O(h) : void 0)
|
|
705
|
-
}, [
|
|
706
|
-
Fe(m.$slots, "default", {}, () => [
|
|
707
|
-
ot(Se(m.label), 1)
|
|
708
|
-
])
|
|
709
|
-
], 6)) : Ce("v-if", !0)
|
|
710
|
-
], 2));
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
var Dl = /* @__PURE__ */ je(kr, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);
|
|
714
|
-
const Rr = Gn({
|
|
715
|
-
modelValue: {
|
|
716
|
-
type: Un(Array),
|
|
717
|
-
default: () => []
|
|
718
|
-
},
|
|
719
|
-
disabled: Boolean,
|
|
720
|
-
min: Number,
|
|
721
|
-
max: Number,
|
|
722
|
-
size: Ot,
|
|
723
|
-
label: String,
|
|
724
|
-
fill: String,
|
|
725
|
-
textColor: String,
|
|
726
|
-
tag: {
|
|
727
|
-
type: String,
|
|
728
|
-
default: "div"
|
|
729
|
-
},
|
|
730
|
-
validateEvent: {
|
|
731
|
-
type: Boolean,
|
|
732
|
-
default: !0
|
|
733
|
-
}
|
|
734
|
-
}), Lr = {
|
|
735
|
-
[rt]: (e) => Me(e),
|
|
736
|
-
change: (e) => Me(e)
|
|
737
|
-
}, Nr = he({
|
|
738
|
-
name: "ElCheckboxGroup"
|
|
739
|
-
}), Or = /* @__PURE__ */ he({
|
|
740
|
-
...Nr,
|
|
741
|
-
props: Rr,
|
|
742
|
-
emits: Lr,
|
|
743
|
-
setup(e, { emit: t }) {
|
|
744
|
-
const l = e, n = se("checkbox"), { formItem: r } = Ft(), { inputId: a, isLabeledByFormItem: i } = Sl(l, {
|
|
745
|
-
formItemContext: r
|
|
746
|
-
}), o = async (u) => {
|
|
747
|
-
t(rt, u), await Ee(), t("change", u);
|
|
748
|
-
}, s = T({
|
|
749
|
-
get() {
|
|
750
|
-
return l.modelValue;
|
|
751
|
-
},
|
|
752
|
-
set(u) {
|
|
753
|
-
o(u);
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
return ul(We, {
|
|
757
|
-
...nr(dl(l), [
|
|
758
|
-
"size",
|
|
759
|
-
"min",
|
|
760
|
-
"max",
|
|
761
|
-
"disabled",
|
|
762
|
-
"validateEvent",
|
|
763
|
-
"fill",
|
|
764
|
-
"textColor"
|
|
765
|
-
]),
|
|
766
|
-
modelValue: s,
|
|
767
|
-
changeEvent: o
|
|
768
|
-
}), ie(() => l.modelValue, () => {
|
|
769
|
-
l.validateEvent && (r == null || r.validate("change").catch((u) => Lt(u)));
|
|
770
|
-
}), (u, d) => {
|
|
771
|
-
var h;
|
|
772
|
-
return D(), Le(il(u.tag), {
|
|
773
|
-
id: O(a),
|
|
774
|
-
class: I(O(n).b("group")),
|
|
775
|
-
role: "group",
|
|
776
|
-
"aria-label": O(i) ? void 0 : u.label || "checkbox-group",
|
|
777
|
-
"aria-labelledby": O(i) ? (h = O(r)) == null ? void 0 : h.labelId : void 0
|
|
778
|
-
}, {
|
|
779
|
-
default: ye(() => [
|
|
780
|
-
Fe(u.$slots, "default")
|
|
781
|
-
]),
|
|
782
|
-
_: 3
|
|
783
|
-
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
var jl = /* @__PURE__ */ je(Or, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);
|
|
788
|
-
const Ae = bl(wr, {
|
|
789
|
-
CheckboxButton: Dl,
|
|
790
|
-
CheckboxGroup: jl
|
|
791
|
-
});
|
|
792
|
-
Nt(Dl);
|
|
793
|
-
const qs = Nt(jl);
|
|
794
|
-
/*!
|
|
795
|
-
* escape-html
|
|
796
|
-
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
797
|
-
* Copyright(c) 2015 Andreas Lubbe
|
|
798
|
-
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
799
|
-
* MIT Licensed
|
|
800
|
-
*/
|
|
801
|
-
var Fr = /["'&<>]/, Mr = Ar;
|
|
802
|
-
function Ar(e) {
|
|
803
|
-
var t = "" + e, l = Fr.exec(t);
|
|
804
|
-
if (!l)
|
|
805
|
-
return t;
|
|
806
|
-
var n, r = "", a = 0, i = 0;
|
|
807
|
-
for (a = l.index; a < t.length; a++) {
|
|
808
|
-
switch (t.charCodeAt(a)) {
|
|
809
|
-
case 34:
|
|
810
|
-
n = """;
|
|
811
|
-
break;
|
|
812
|
-
case 38:
|
|
813
|
-
n = "&";
|
|
814
|
-
break;
|
|
815
|
-
case 39:
|
|
816
|
-
n = "'";
|
|
817
|
-
break;
|
|
818
|
-
case 60:
|
|
819
|
-
n = "<";
|
|
820
|
-
break;
|
|
821
|
-
case 62:
|
|
822
|
-
n = ">";
|
|
823
|
-
break;
|
|
824
|
-
default:
|
|
825
|
-
continue;
|
|
826
|
-
}
|
|
827
|
-
i !== a && (r += t.substring(i, a)), i = a + 1, r += n;
|
|
828
|
-
}
|
|
829
|
-
return i !== a ? r + t.substring(i, a) : r;
|
|
830
|
-
}
|
|
831
|
-
const Tr = /* @__PURE__ */ Bn(Mr), at = function(e) {
|
|
832
|
-
var t;
|
|
833
|
-
return (t = e.target) == null ? void 0 : t.closest("td");
|
|
834
|
-
}, Wr = function(e, t, l, n, r) {
|
|
835
|
-
if (!t && !n && (!r || Array.isArray(r) && !r.length))
|
|
836
|
-
return e;
|
|
837
|
-
typeof l == "string" ? l = l === "descending" ? -1 : 1 : l = l && l < 0 ? -1 : 1;
|
|
838
|
-
const a = n ? null : function(o, s) {
|
|
839
|
-
return r ? (Array.isArray(r) || (r = [r]), r.map((u) => typeof u == "string" ? Dt(o, u) : u(o, s, e))) : (t !== "$key" && ct(o) && "$value" in o && (o = o.$value), [ct(o) ? Dt(o, t) : o]);
|
|
840
|
-
}, i = function(o, s) {
|
|
841
|
-
if (n)
|
|
842
|
-
return n(o.value, s.value);
|
|
843
|
-
for (let u = 0, d = o.key.length; u < d; u++) {
|
|
844
|
-
if (o.key[u] < s.key[u])
|
|
845
|
-
return -1;
|
|
846
|
-
if (o.key[u] > s.key[u])
|
|
847
|
-
return 1;
|
|
848
|
-
}
|
|
849
|
-
return 0;
|
|
850
|
-
};
|
|
851
|
-
return e.map((o, s) => ({
|
|
852
|
-
value: o,
|
|
853
|
-
index: s,
|
|
854
|
-
key: a ? a(o, s) : null
|
|
855
|
-
})).sort((o, s) => {
|
|
856
|
-
let u = i(o, s);
|
|
857
|
-
return u || (u = o.index - s.index), u * +l;
|
|
858
|
-
}).map((o) => o.value);
|
|
859
|
-
}, Gl = function(e, t) {
|
|
860
|
-
let l = null;
|
|
861
|
-
return e.columns.forEach((n) => {
|
|
862
|
-
n.id === t && (l = n);
|
|
863
|
-
}), l;
|
|
864
|
-
}, Hr = function(e, t) {
|
|
865
|
-
let l = null;
|
|
866
|
-
for (let n = 0; n < e.columns.length; n++) {
|
|
867
|
-
const r = e.columns[n];
|
|
868
|
-
if (r.columnKey === t) {
|
|
869
|
-
l = r;
|
|
870
|
-
break;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
return l || Yn("ElTable", `No column matching with column-key: ${t}`), l;
|
|
874
|
-
}, nl = function(e, t, l) {
|
|
875
|
-
const n = (t.className || "").match(new RegExp(`${l}-table_[^\\s]+`, "gm"));
|
|
876
|
-
return n ? Gl(e, n[0]) : null;
|
|
877
|
-
}, Z = (e, t) => {
|
|
878
|
-
if (!e)
|
|
879
|
-
throw new Error("Row is required when get row identity");
|
|
880
|
-
if (typeof t == "string") {
|
|
881
|
-
if (!t.includes("."))
|
|
882
|
-
return `${e[t]}`;
|
|
883
|
-
const l = t.split(".");
|
|
884
|
-
let n = e;
|
|
885
|
-
for (const r of l)
|
|
886
|
-
n = n[r];
|
|
887
|
-
return `${n}`;
|
|
888
|
-
} else if (typeof t == "function")
|
|
889
|
-
return t.call(null, e);
|
|
890
|
-
}, Ne = function(e, t) {
|
|
891
|
-
const l = {};
|
|
892
|
-
return (e || []).forEach((n, r) => {
|
|
893
|
-
l[Z(n, t)] = { row: n, index: r };
|
|
894
|
-
}), l;
|
|
895
|
-
};
|
|
896
|
-
function $r(e, t) {
|
|
897
|
-
const l = {};
|
|
898
|
-
let n;
|
|
899
|
-
for (n in e)
|
|
900
|
-
l[n] = e[n];
|
|
901
|
-
for (n in t)
|
|
902
|
-
if (Ie(t, n)) {
|
|
903
|
-
const r = t[n];
|
|
904
|
-
typeof r < "u" && (l[n] = r);
|
|
905
|
-
}
|
|
906
|
-
return l;
|
|
907
|
-
}
|
|
908
|
-
function Tt(e) {
|
|
909
|
-
return e === "" || e !== void 0 && (e = Number.parseInt(e, 10), Number.isNaN(e) && (e = "")), e;
|
|
910
|
-
}
|
|
911
|
-
function Ul(e) {
|
|
912
|
-
return e === "" || e !== void 0 && (e = Tt(e), Number.isNaN(e) && (e = 80)), e;
|
|
913
|
-
}
|
|
914
|
-
function Pr(e) {
|
|
915
|
-
return typeof e == "number" ? e : typeof e == "string" ? /^\d+(?:px)?$/.test(e) ? Number.parseInt(e, 10) : e : null;
|
|
916
|
-
}
|
|
917
|
-
function Br(...e) {
|
|
918
|
-
return e.length === 0 ? (t) => t : e.length === 1 ? e[0] : e.reduce((t, l) => (...n) => t(l(...n)));
|
|
919
|
-
}
|
|
920
|
-
function $e(e, t, l) {
|
|
921
|
-
let n = !1;
|
|
922
|
-
const r = e.indexOf(t), a = r !== -1, i = (o) => {
|
|
923
|
-
o === "add" ? e.push(t) : e.splice(r, 1), n = !0, Me(t.children) && t.children.forEach((s) => {
|
|
924
|
-
$e(e, s, l ?? !a);
|
|
925
|
-
});
|
|
926
|
-
};
|
|
927
|
-
return tt(l) ? l && !a ? i("add") : !l && a && i("remove") : i(a ? "remove" : "add"), n;
|
|
928
|
-
}
|
|
929
|
-
function Ir(e, t, l = "children", n = "hasChildren") {
|
|
930
|
-
const r = (i) => !(Array.isArray(i) && i.length);
|
|
931
|
-
function a(i, o, s) {
|
|
932
|
-
t(i, o, s), o.forEach((u) => {
|
|
933
|
-
if (u[n]) {
|
|
934
|
-
t(u, null, s + 1);
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
const d = u[l];
|
|
938
|
-
r(d) || a(u, d, s + 1);
|
|
939
|
-
});
|
|
940
|
-
}
|
|
941
|
-
e.forEach((i) => {
|
|
942
|
-
if (i[n]) {
|
|
943
|
-
t(i, null, 0);
|
|
944
|
-
return;
|
|
945
|
-
}
|
|
946
|
-
const o = i[l];
|
|
947
|
-
r(o) || a(i, o, 0);
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
let be;
|
|
951
|
-
function zr(e, t, l, n, r) {
|
|
952
|
-
r = Al({
|
|
953
|
-
enterable: !0,
|
|
954
|
-
showArrow: !0
|
|
955
|
-
}, r);
|
|
956
|
-
const a = e == null ? void 0 : e.dataset.prefix, i = e == null ? void 0 : e.querySelector(`.${a}-scrollbar__wrap`);
|
|
957
|
-
function o() {
|
|
958
|
-
const v = r.effect === "light", y = document.createElement("div");
|
|
959
|
-
return y.className = [
|
|
960
|
-
`${a}-popper`,
|
|
961
|
-
v ? "is-light" : "is-dark",
|
|
962
|
-
r.popperClass || ""
|
|
963
|
-
].join(" "), l = Tr(l), y.innerHTML = l, y.style.zIndex = String(n()), e == null || e.appendChild(y), y;
|
|
964
|
-
}
|
|
965
|
-
function s() {
|
|
966
|
-
const v = document.createElement("div");
|
|
967
|
-
return v.className = `${a}-popper__arrow`, v;
|
|
968
|
-
}
|
|
969
|
-
function u() {
|
|
970
|
-
d && d.update();
|
|
971
|
-
}
|
|
972
|
-
be == null || be(), be = () => {
|
|
973
|
-
try {
|
|
974
|
-
d && d.destroy(), m && (e == null || e.removeChild(m)), t.removeEventListener("mouseenter", h), t.removeEventListener("mouseleave", p), i == null || i.removeEventListener("scroll", be), be = void 0;
|
|
975
|
-
} catch {
|
|
976
|
-
}
|
|
977
|
-
};
|
|
978
|
-
let d = null, h = u, p = be;
|
|
979
|
-
r.enterable && ({ onOpen: h, onClose: p } = Wn({
|
|
980
|
-
showAfter: r.showAfter,
|
|
981
|
-
hideAfter: r.hideAfter,
|
|
982
|
-
open: u,
|
|
983
|
-
close: be
|
|
984
|
-
}));
|
|
985
|
-
const m = o();
|
|
986
|
-
m.onmouseenter = h, m.onmouseleave = p;
|
|
987
|
-
const f = [];
|
|
988
|
-
if (r.offset && f.push({
|
|
989
|
-
name: "offset",
|
|
990
|
-
options: {
|
|
991
|
-
offset: [0, r.offset]
|
|
992
|
-
}
|
|
993
|
-
}), r.showArrow) {
|
|
994
|
-
const v = m.appendChild(s());
|
|
995
|
-
f.push({
|
|
996
|
-
name: "arrow",
|
|
997
|
-
options: {
|
|
998
|
-
element: v,
|
|
999
|
-
padding: 10
|
|
1000
|
-
}
|
|
1001
|
-
});
|
|
1002
|
-
}
|
|
1003
|
-
const g = r.popperOptions || {};
|
|
1004
|
-
return d = Hn(t, m, {
|
|
1005
|
-
placement: r.placement || "top",
|
|
1006
|
-
strategy: "fixed",
|
|
1007
|
-
...g,
|
|
1008
|
-
modifiers: g.modifiers ? f.concat(g.modifiers) : f
|
|
1009
|
-
}), t.addEventListener("mouseenter", h), t.addEventListener("mouseleave", p), i == null || i.addEventListener("scroll", be), d;
|
|
1010
|
-
}
|
|
1011
|
-
function Yl(e) {
|
|
1012
|
-
return e.children ? Zo(e.children, Yl) : [e];
|
|
1013
|
-
}
|
|
1014
|
-
function ol(e, t) {
|
|
1015
|
-
return e + t.colSpan;
|
|
1016
|
-
}
|
|
1017
|
-
const ql = (e, t, l, n) => {
|
|
1018
|
-
let r = 0, a = e;
|
|
1019
|
-
const i = l.states.columns.value;
|
|
1020
|
-
if (n) {
|
|
1021
|
-
const s = Yl(n[e]);
|
|
1022
|
-
r = i.slice(0, i.indexOf(s[0])).reduce(ol, 0), a = r + s.reduce(ol, 0) - 1;
|
|
1023
|
-
} else
|
|
1024
|
-
r = e;
|
|
1025
|
-
let o;
|
|
1026
|
-
switch (t) {
|
|
1027
|
-
case "left":
|
|
1028
|
-
a < l.states.fixedLeafColumnsLength.value && (o = "left");
|
|
1029
|
-
break;
|
|
1030
|
-
case "right":
|
|
1031
|
-
r >= i.length - l.states.rightFixedLeafColumnsLength.value && (o = "right");
|
|
1032
|
-
break;
|
|
1033
|
-
default:
|
|
1034
|
-
a < l.states.fixedLeafColumnsLength.value ? o = "left" : r >= i.length - l.states.rightFixedLeafColumnsLength.value && (o = "right");
|
|
1035
|
-
}
|
|
1036
|
-
return o ? {
|
|
1037
|
-
direction: o,
|
|
1038
|
-
start: r,
|
|
1039
|
-
after: a
|
|
1040
|
-
} : {};
|
|
1041
|
-
}, Wt = (e, t, l, n, r, a = 0) => {
|
|
1042
|
-
const i = [], { direction: o, start: s, after: u } = ql(t, l, n, r);
|
|
1043
|
-
if (o) {
|
|
1044
|
-
const d = o === "left";
|
|
1045
|
-
i.push(`${e}-fixed-column--${o}`), d && u + a === n.states.fixedLeafColumnsLength.value - 1 ? i.push("is-last-column") : !d && s - a === n.states.columns.value.length - n.states.rightFixedLeafColumnsLength.value && i.push("is-first-column");
|
|
1046
|
-
}
|
|
1047
|
-
return i;
|
|
1048
|
-
};
|
|
1049
|
-
function rl(e, t) {
|
|
1050
|
-
return e + (t.realWidth === null || Number.isNaN(t.realWidth) ? Number(t.width) : t.realWidth);
|
|
1051
|
-
}
|
|
1052
|
-
const Ht = (e, t, l, n) => {
|
|
1053
|
-
const {
|
|
1054
|
-
direction: r,
|
|
1055
|
-
start: a = 0,
|
|
1056
|
-
after: i = 0
|
|
1057
|
-
} = ql(e, t, l, n);
|
|
1058
|
-
if (!r)
|
|
1059
|
-
return;
|
|
1060
|
-
const o = {}, s = r === "left", u = l.states.columns.value;
|
|
1061
|
-
return s ? o.left = u.slice(0, a).reduce(rl, 0) : o.right = u.slice(i + 1).reverse().reduce(rl, 0), o;
|
|
1062
|
-
}, Te = (e, t) => {
|
|
1063
|
-
e && (Number.isNaN(e[t]) || (e[t] = `${e[t]}px`));
|
|
1064
|
-
};
|
|
1065
|
-
function Kr(e) {
|
|
1066
|
-
const t = ee(), l = E(!1), n = E([]);
|
|
1067
|
-
return {
|
|
1068
|
-
updateExpandRows: () => {
|
|
1069
|
-
const s = e.data.value || [], u = e.rowKey.value;
|
|
1070
|
-
if (l.value)
|
|
1071
|
-
n.value = s.slice();
|
|
1072
|
-
else if (u) {
|
|
1073
|
-
const d = Ne(n.value, u);
|
|
1074
|
-
n.value = s.reduce((h, p) => {
|
|
1075
|
-
const m = Z(p, u);
|
|
1076
|
-
return d[m] && h.push(p), h;
|
|
1077
|
-
}, []);
|
|
1078
|
-
} else
|
|
1079
|
-
n.value = [];
|
|
1080
|
-
},
|
|
1081
|
-
toggleRowExpansion: (s, u) => {
|
|
1082
|
-
$e(n.value, s, u) && t.emit("expand-change", s, n.value.slice());
|
|
1083
|
-
},
|
|
1084
|
-
setExpandRowKeys: (s) => {
|
|
1085
|
-
t.store.assertRowKey();
|
|
1086
|
-
const u = e.data.value || [], d = e.rowKey.value, h = Ne(u, d);
|
|
1087
|
-
n.value = s.reduce((p, m) => {
|
|
1088
|
-
const f = h[m];
|
|
1089
|
-
return f && p.push(f.row), p;
|
|
1090
|
-
}, []);
|
|
1091
|
-
},
|
|
1092
|
-
isRowExpanded: (s) => {
|
|
1093
|
-
const u = e.rowKey.value;
|
|
1094
|
-
return u ? !!Ne(n.value, u)[Z(s, u)] : n.value.includes(s);
|
|
1095
|
-
},
|
|
1096
|
-
states: {
|
|
1097
|
-
expandRows: n,
|
|
1098
|
-
defaultExpandAll: l
|
|
1099
|
-
}
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
function Vr(e) {
|
|
1103
|
-
const t = ee(), l = E(null), n = E(null), r = (u) => {
|
|
1104
|
-
t.store.assertRowKey(), l.value = u, i(u);
|
|
1105
|
-
}, a = () => {
|
|
1106
|
-
l.value = null;
|
|
1107
|
-
}, i = (u) => {
|
|
1108
|
-
const { data: d, rowKey: h } = e;
|
|
1109
|
-
let p = null;
|
|
1110
|
-
h.value && (p = (O(d) || []).find((m) => Z(m, h.value) === u)), n.value = p, t.emit("current-change", n.value, null);
|
|
1111
|
-
};
|
|
1112
|
-
return {
|
|
1113
|
-
setCurrentRowKey: r,
|
|
1114
|
-
restoreCurrentRowKey: a,
|
|
1115
|
-
setCurrentRowByKey: i,
|
|
1116
|
-
updateCurrentRow: (u) => {
|
|
1117
|
-
const d = n.value;
|
|
1118
|
-
if (u && u !== d) {
|
|
1119
|
-
n.value = u, t.emit("current-change", n.value, d);
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
!u && d && (n.value = null, t.emit("current-change", null, d));
|
|
1123
|
-
},
|
|
1124
|
-
updateCurrentRowData: () => {
|
|
1125
|
-
const u = e.rowKey.value, d = e.data.value || [], h = n.value;
|
|
1126
|
-
if (!d.includes(h) && h) {
|
|
1127
|
-
if (u) {
|
|
1128
|
-
const p = Z(h, u);
|
|
1129
|
-
i(p);
|
|
1130
|
-
} else
|
|
1131
|
-
n.value = null;
|
|
1132
|
-
n.value === null && t.emit("current-change", null, h);
|
|
1133
|
-
} else
|
|
1134
|
-
l.value && (i(l.value), a());
|
|
1135
|
-
},
|
|
1136
|
-
states: {
|
|
1137
|
-
_currentRowKey: l,
|
|
1138
|
-
currentRow: n
|
|
1139
|
-
}
|
|
1140
|
-
};
|
|
1141
|
-
}
|
|
1142
|
-
function Dr(e) {
|
|
1143
|
-
const t = E([]), l = E({}), n = E(16), r = E(!1), a = E({}), i = E("hasChildren"), o = E("children"), s = ee(), u = T(() => {
|
|
1144
|
-
if (!e.rowKey.value)
|
|
1145
|
-
return {};
|
|
1146
|
-
const y = e.data.value || [];
|
|
1147
|
-
return h(y);
|
|
1148
|
-
}), d = T(() => {
|
|
1149
|
-
const y = e.rowKey.value, b = Object.keys(a.value), S = {};
|
|
1150
|
-
return b.length && b.forEach((c) => {
|
|
1151
|
-
if (a.value[c].length) {
|
|
1152
|
-
const x = { children: [] };
|
|
1153
|
-
a.value[c].forEach((k) => {
|
|
1154
|
-
const w = Z(k, y);
|
|
1155
|
-
x.children.push(w), k[i.value] && !S[w] && (S[w] = { children: [] });
|
|
1156
|
-
}), S[c] = x;
|
|
1157
|
-
}
|
|
1158
|
-
}), S;
|
|
1159
|
-
}), h = (y) => {
|
|
1160
|
-
const b = e.rowKey.value, S = {};
|
|
1161
|
-
return Ir(y, (c, x, k) => {
|
|
1162
|
-
const w = Z(c, b);
|
|
1163
|
-
Array.isArray(x) ? S[w] = {
|
|
1164
|
-
children: x.map((R) => Z(R, b)),
|
|
1165
|
-
level: k
|
|
1166
|
-
} : r.value && (S[w] = {
|
|
1167
|
-
children: [],
|
|
1168
|
-
lazy: !0,
|
|
1169
|
-
level: k
|
|
1170
|
-
});
|
|
1171
|
-
}, o.value, i.value), S;
|
|
1172
|
-
}, p = (y = !1, b = ((S) => (S = s.store) == null ? void 0 : S.states.defaultExpandAll.value)()) => {
|
|
1173
|
-
var S;
|
|
1174
|
-
const c = u.value, x = d.value, k = Object.keys(c), w = {};
|
|
1175
|
-
if (k.length) {
|
|
1176
|
-
const R = O(l), F = [], K = (M, z) => {
|
|
1177
|
-
if (y)
|
|
1178
|
-
return t.value ? b || t.value.includes(z) : !!(b || M != null && M.expanded);
|
|
1179
|
-
{
|
|
1180
|
-
const j = b || t.value && t.value.includes(z);
|
|
1181
|
-
return !!(M != null && M.expanded || j);
|
|
1182
|
-
}
|
|
1183
|
-
};
|
|
1184
|
-
k.forEach((M) => {
|
|
1185
|
-
const z = R[M], j = { ...c[M] };
|
|
1186
|
-
if (j.expanded = K(z, M), j.lazy) {
|
|
1187
|
-
const { loaded: X = !1, loading: _ = !1 } = z || {};
|
|
1188
|
-
j.loaded = !!X, j.loading = !!_, F.push(M);
|
|
1189
|
-
}
|
|
1190
|
-
w[M] = j;
|
|
1191
|
-
});
|
|
1192
|
-
const B = Object.keys(x);
|
|
1193
|
-
r.value && B.length && F.length && B.forEach((M) => {
|
|
1194
|
-
const z = R[M], j = x[M].children;
|
|
1195
|
-
if (F.includes(M)) {
|
|
1196
|
-
if (w[M].children.length !== 0)
|
|
1197
|
-
throw new Error("[ElTable]children must be an empty array.");
|
|
1198
|
-
w[M].children = j;
|
|
1199
|
-
} else {
|
|
1200
|
-
const { loaded: X = !1, loading: _ = !1 } = z || {};
|
|
1201
|
-
w[M] = {
|
|
1202
|
-
lazy: !0,
|
|
1203
|
-
loaded: !!X,
|
|
1204
|
-
loading: !!_,
|
|
1205
|
-
expanded: K(z, M),
|
|
1206
|
-
children: j,
|
|
1207
|
-
level: ""
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
l.value = w, (S = s.store) == null || S.updateTableScrollY();
|
|
1213
|
-
};
|
|
1214
|
-
ie(() => t.value, () => {
|
|
1215
|
-
p(!0);
|
|
1216
|
-
}), ie(() => u.value, () => {
|
|
1217
|
-
p();
|
|
1218
|
-
}), ie(() => d.value, () => {
|
|
1219
|
-
p();
|
|
1220
|
-
});
|
|
1221
|
-
const m = (y) => {
|
|
1222
|
-
t.value = y, p();
|
|
1223
|
-
}, f = (y, b) => {
|
|
1224
|
-
s.store.assertRowKey();
|
|
1225
|
-
const S = e.rowKey.value, c = Z(y, S), x = c && l.value[c];
|
|
1226
|
-
if (c && x && "expanded" in x) {
|
|
1227
|
-
const k = x.expanded;
|
|
1228
|
-
b = typeof b > "u" ? !x.expanded : b, l.value[c].expanded = b, k !== b && s.emit("expand-change", y, b), s.store.updateTableScrollY();
|
|
1229
|
-
}
|
|
1230
|
-
}, g = (y) => {
|
|
1231
|
-
s.store.assertRowKey();
|
|
1232
|
-
const b = e.rowKey.value, S = Z(y, b), c = l.value[S];
|
|
1233
|
-
r.value && c && "loaded" in c && !c.loaded ? v(y, S, c) : f(y, void 0);
|
|
1234
|
-
}, v = (y, b, S) => {
|
|
1235
|
-
const { load: c } = s.props;
|
|
1236
|
-
c && !l.value[b].loaded && (l.value[b].loading = !0, c(y, S, (x) => {
|
|
1237
|
-
if (!Array.isArray(x))
|
|
1238
|
-
throw new TypeError("[ElTable] data must be an array");
|
|
1239
|
-
l.value[b].loading = !1, l.value[b].loaded = !0, l.value[b].expanded = !0, x.length && (a.value[b] = x), s.emit("expand-change", y, !0);
|
|
1240
|
-
}));
|
|
1241
|
-
};
|
|
1242
|
-
return {
|
|
1243
|
-
loadData: v,
|
|
1244
|
-
loadOrToggle: g,
|
|
1245
|
-
toggleTreeExpansion: f,
|
|
1246
|
-
updateTreeExpandKeys: m,
|
|
1247
|
-
updateTreeData: p,
|
|
1248
|
-
normalize: h,
|
|
1249
|
-
states: {
|
|
1250
|
-
expandRowKeys: t,
|
|
1251
|
-
treeData: l,
|
|
1252
|
-
indent: n,
|
|
1253
|
-
lazy: r,
|
|
1254
|
-
lazyTreeNodeMap: a,
|
|
1255
|
-
lazyColumnIdentifier: i,
|
|
1256
|
-
childrenColumnName: o
|
|
1257
|
-
}
|
|
1258
|
-
};
|
|
1259
|
-
}
|
|
1260
|
-
const jr = (e, t) => {
|
|
1261
|
-
const l = t.sortingColumn;
|
|
1262
|
-
return !l || typeof l.sortable == "string" ? e : Wr(e, t.sortProp, t.sortOrder, l.sortMethod, l.sortBy);
|
|
1263
|
-
}, _e = (e) => {
|
|
1264
|
-
const t = [];
|
|
1265
|
-
return e.forEach((l) => {
|
|
1266
|
-
l.children && l.children.length > 0 ? t.push.apply(t, _e(l.children)) : t.push(l);
|
|
1267
|
-
}), t;
|
|
1268
|
-
};
|
|
1269
|
-
function Gr() {
|
|
1270
|
-
var e;
|
|
1271
|
-
const t = ee(), { size: l } = dl((e = t.proxy) == null ? void 0 : e.$props), n = E(null), r = E([]), a = E([]), i = E(!1), o = E([]), s = E([]), u = E([]), d = E([]), h = E([]), p = E([]), m = E([]), f = E([]), g = [], v = E(0), y = E(0), b = E(0), S = E(!1), c = E([]), x = E(!1), k = E(!1), w = E(null), R = E({}), F = E(null), K = E(null), B = E(null), M = E(null), z = E(null);
|
|
1272
|
-
ie(r, () => t.state && ue(!1), {
|
|
1273
|
-
deep: !0
|
|
1274
|
-
});
|
|
1275
|
-
const j = () => {
|
|
1276
|
-
if (!n.value)
|
|
1277
|
-
throw new Error("[ElTable] prop row-key is required");
|
|
1278
|
-
}, X = (N) => {
|
|
1279
|
-
var A;
|
|
1280
|
-
(A = N.children) == null || A.forEach(($) => {
|
|
1281
|
-
$.fixed = N.fixed, X($);
|
|
1282
|
-
});
|
|
1283
|
-
}, _ = () => {
|
|
1284
|
-
o.value.forEach((V) => {
|
|
1285
|
-
X(V);
|
|
1286
|
-
}), d.value = o.value.filter((V) => V.fixed === !0 || V.fixed === "left"), h.value = o.value.filter((V) => V.fixed === "right"), d.value.length > 0 && o.value[0] && o.value[0].type === "selection" && !o.value[0].fixed && (o.value[0].fixed = !0, d.value.unshift(o.value[0]));
|
|
1287
|
-
const N = o.value.filter((V) => !V.fixed);
|
|
1288
|
-
s.value = [].concat(d.value).concat(N).concat(h.value);
|
|
1289
|
-
const A = _e(N), $ = _e(d.value), W = _e(h.value);
|
|
1290
|
-
v.value = A.length, y.value = $.length, b.value = W.length, u.value = [].concat($).concat(A).concat(W), i.value = d.value.length > 0 || h.value.length > 0;
|
|
1291
|
-
}, ue = (N, A = !1) => {
|
|
1292
|
-
N && _(), A ? t.state.doLayout() : t.state.debouncedUpdateLayout();
|
|
1293
|
-
}, Q = (N) => c.value.includes(N), C = () => {
|
|
1294
|
-
S.value = !1, c.value.length && (c.value = [], t.emit("selection-change", []));
|
|
1295
|
-
}, L = () => {
|
|
1296
|
-
let N;
|
|
1297
|
-
if (n.value) {
|
|
1298
|
-
N = [];
|
|
1299
|
-
const A = Ne(c.value, n.value), $ = Ne(r.value, n.value);
|
|
1300
|
-
for (const W in A)
|
|
1301
|
-
Ie(A, W) && !$[W] && N.push(A[W].row);
|
|
1302
|
-
} else
|
|
1303
|
-
N = c.value.filter((A) => !r.value.includes(A));
|
|
1304
|
-
if (N.length) {
|
|
1305
|
-
const A = c.value.filter(($) => !N.includes($));
|
|
1306
|
-
c.value = A, t.emit("selection-change", A.slice());
|
|
1307
|
-
}
|
|
1308
|
-
}, P = () => (c.value || []).slice(), G = (N, A = void 0, $ = !0) => {
|
|
1309
|
-
if ($e(c.value, N, A)) {
|
|
1310
|
-
const V = (c.value || []).slice();
|
|
1311
|
-
$ && t.emit("select", V, N), t.emit("selection-change", V);
|
|
1312
|
-
}
|
|
1313
|
-
}, Y = () => {
|
|
1314
|
-
var N, A;
|
|
1315
|
-
const $ = k.value ? !S.value : !(S.value || c.value.length);
|
|
1316
|
-
S.value = $;
|
|
1317
|
-
let W = !1, V = 0;
|
|
1318
|
-
const J = (A = (N = t == null ? void 0 : t.store) == null ? void 0 : N.states) == null ? void 0 : A.rowKey.value;
|
|
1319
|
-
r.value.forEach((ce, Oe) => {
|
|
1320
|
-
const ge = Oe + V;
|
|
1321
|
-
w.value ? w.value.call(null, ce, ge) && $e(c.value, ce, $) && (W = !0) : $e(c.value, ce, $) && (W = !0), V += te(Z(ce, J));
|
|
1322
|
-
}), W && t.emit("selection-change", c.value ? c.value.slice() : []), t.emit("select-all", c.value);
|
|
1323
|
-
}, q = () => {
|
|
1324
|
-
const N = Ne(c.value, n.value);
|
|
1325
|
-
r.value.forEach((A) => {
|
|
1326
|
-
const $ = Z(A, n.value), W = N[$];
|
|
1327
|
-
W && (c.value[W.index] = A);
|
|
1328
|
-
});
|
|
1329
|
-
}, ae = () => {
|
|
1330
|
-
var N, A, $;
|
|
1331
|
-
if (((N = r.value) == null ? void 0 : N.length) === 0) {
|
|
1332
|
-
S.value = !1;
|
|
1333
|
-
return;
|
|
1334
|
-
}
|
|
1335
|
-
let W;
|
|
1336
|
-
n.value && (W = Ne(c.value, n.value));
|
|
1337
|
-
const V = function(ge) {
|
|
1338
|
-
return W ? !!W[Z(ge, n.value)] : c.value.includes(ge);
|
|
1339
|
-
};
|
|
1340
|
-
let J = !0, ce = 0, Oe = 0;
|
|
1341
|
-
for (let ge = 0, gn = (r.value || []).length; ge < gn; ge++) {
|
|
1342
|
-
const bn = ($ = (A = t == null ? void 0 : t.store) == null ? void 0 : A.states) == null ? void 0 : $.rowKey.value, yn = ge + Oe, st = r.value[ge], Cn = w.value && w.value.call(null, st, yn);
|
|
1343
|
-
if (V(st))
|
|
1344
|
-
ce++;
|
|
1345
|
-
else if (!w.value || Cn) {
|
|
1346
|
-
J = !1;
|
|
1347
|
-
break;
|
|
1348
|
-
}
|
|
1349
|
-
Oe += te(Z(st, bn));
|
|
1350
|
-
}
|
|
1351
|
-
ce === 0 && (J = !1), S.value = J;
|
|
1352
|
-
}, te = (N) => {
|
|
1353
|
-
var A;
|
|
1354
|
-
if (!t || !t.store)
|
|
1355
|
-
return 0;
|
|
1356
|
-
const { treeData: $ } = t.store.states;
|
|
1357
|
-
let W = 0;
|
|
1358
|
-
const V = (A = $.value[N]) == null ? void 0 : A.children;
|
|
1359
|
-
return V && (W += V.length, V.forEach((J) => {
|
|
1360
|
-
W += te(J);
|
|
1361
|
-
})), W;
|
|
1362
|
-
}, me = (N, A) => {
|
|
1363
|
-
Array.isArray(N) || (N = [N]);
|
|
1364
|
-
const $ = {};
|
|
1365
|
-
return N.forEach((W) => {
|
|
1366
|
-
R.value[W.id] = A, $[W.columnKey || W.id] = A;
|
|
1367
|
-
}), $;
|
|
1368
|
-
}, le = (N, A, $) => {
|
|
1369
|
-
K.value && K.value !== N && (K.value.order = null), K.value = N, B.value = A, M.value = $;
|
|
1370
|
-
}, de = () => {
|
|
1371
|
-
let N = O(a);
|
|
1372
|
-
Object.keys(R.value).forEach((A) => {
|
|
1373
|
-
const $ = R.value[A];
|
|
1374
|
-
if (!$ || $.length === 0)
|
|
1375
|
-
return;
|
|
1376
|
-
const W = Gl({
|
|
1377
|
-
columns: u.value
|
|
1378
|
-
}, A);
|
|
1379
|
-
W && W.filterMethod && (N = N.filter((V) => $.some((J) => W.filterMethod.call(null, J, V, W))));
|
|
1380
|
-
}), F.value = N;
|
|
1381
|
-
}, ve = () => {
|
|
1382
|
-
r.value = jr(F.value, {
|
|
1383
|
-
sortingColumn: K.value,
|
|
1384
|
-
sortProp: B.value,
|
|
1385
|
-
sortOrder: M.value
|
|
1386
|
-
});
|
|
1387
|
-
}, en = (N = void 0) => {
|
|
1388
|
-
N && N.filter || de(), ve();
|
|
1389
|
-
}, tn = (N) => {
|
|
1390
|
-
const { tableHeaderRef: A } = t.refs;
|
|
1391
|
-
if (!A)
|
|
1392
|
-
return;
|
|
1393
|
-
const $ = Object.assign({}, A.filterPanels), W = Object.keys($);
|
|
1394
|
-
if (W.length)
|
|
1395
|
-
if (typeof N == "string" && (N = [N]), Array.isArray(N)) {
|
|
1396
|
-
const V = N.map((J) => Hr({
|
|
1397
|
-
columns: u.value
|
|
1398
|
-
}, J));
|
|
1399
|
-
W.forEach((J) => {
|
|
1400
|
-
const ce = V.find((Oe) => Oe.id === J);
|
|
1401
|
-
ce && (ce.filteredValue = []);
|
|
1402
|
-
}), t.store.commit("filterChange", {
|
|
1403
|
-
column: V,
|
|
1404
|
-
values: [],
|
|
1405
|
-
silent: !0,
|
|
1406
|
-
multi: !0
|
|
1407
|
-
});
|
|
1408
|
-
} else
|
|
1409
|
-
W.forEach((V) => {
|
|
1410
|
-
const J = u.value.find((ce) => ce.id === V);
|
|
1411
|
-
J && (J.filteredValue = []);
|
|
1412
|
-
}), R.value = {}, t.store.commit("filterChange", {
|
|
1413
|
-
column: {},
|
|
1414
|
-
values: [],
|
|
1415
|
-
silent: !0
|
|
1416
|
-
});
|
|
1417
|
-
}, ln = () => {
|
|
1418
|
-
K.value && (le(null, null, null), t.store.commit("changeSortCondition", {
|
|
1419
|
-
silent: !0
|
|
1420
|
-
}));
|
|
1421
|
-
}, {
|
|
1422
|
-
setExpandRowKeys: nn,
|
|
1423
|
-
toggleRowExpansion: Pt,
|
|
1424
|
-
updateExpandRows: on,
|
|
1425
|
-
states: rn,
|
|
1426
|
-
isRowExpanded: sn
|
|
1427
|
-
} = Kr({
|
|
1428
|
-
data: r,
|
|
1429
|
-
rowKey: n
|
|
1430
|
-
}), {
|
|
1431
|
-
updateTreeExpandKeys: an,
|
|
1432
|
-
toggleTreeExpansion: un,
|
|
1433
|
-
updateTreeData: dn,
|
|
1434
|
-
loadOrToggle: cn,
|
|
1435
|
-
states: fn
|
|
1436
|
-
} = Dr({
|
|
1437
|
-
data: r,
|
|
1438
|
-
rowKey: n
|
|
1439
|
-
}), {
|
|
1440
|
-
updateCurrentRowData: hn,
|
|
1441
|
-
updateCurrentRow: vn,
|
|
1442
|
-
setCurrentRowKey: pn,
|
|
1443
|
-
states: mn
|
|
1444
|
-
} = Vr({
|
|
1445
|
-
data: r,
|
|
1446
|
-
rowKey: n
|
|
1447
|
-
});
|
|
1448
|
-
return {
|
|
1449
|
-
assertRowKey: j,
|
|
1450
|
-
updateColumns: _,
|
|
1451
|
-
scheduleLayout: ue,
|
|
1452
|
-
isSelected: Q,
|
|
1453
|
-
clearSelection: C,
|
|
1454
|
-
cleanSelection: L,
|
|
1455
|
-
getSelectionRows: P,
|
|
1456
|
-
toggleRowSelection: G,
|
|
1457
|
-
_toggleAllSelection: Y,
|
|
1458
|
-
toggleAllSelection: null,
|
|
1459
|
-
updateSelectionByRowKey: q,
|
|
1460
|
-
updateAllSelected: ae,
|
|
1461
|
-
updateFilters: me,
|
|
1462
|
-
updateCurrentRow: vn,
|
|
1463
|
-
updateSort: le,
|
|
1464
|
-
execFilter: de,
|
|
1465
|
-
execSort: ve,
|
|
1466
|
-
execQuery: en,
|
|
1467
|
-
clearFilter: tn,
|
|
1468
|
-
clearSort: ln,
|
|
1469
|
-
toggleRowExpansion: Pt,
|
|
1470
|
-
setExpandRowKeysAdapter: (N) => {
|
|
1471
|
-
nn(N), an(N);
|
|
1472
|
-
},
|
|
1473
|
-
setCurrentRowKey: pn,
|
|
1474
|
-
toggleRowExpansionAdapter: (N, A) => {
|
|
1475
|
-
u.value.some(({ type: W }) => W === "expand") ? Pt(N, A) : un(N, A);
|
|
1476
|
-
},
|
|
1477
|
-
isRowExpanded: sn,
|
|
1478
|
-
updateExpandRows: on,
|
|
1479
|
-
updateCurrentRowData: hn,
|
|
1480
|
-
loadOrToggle: cn,
|
|
1481
|
-
updateTreeData: dn,
|
|
1482
|
-
states: {
|
|
1483
|
-
tableSize: l,
|
|
1484
|
-
rowKey: n,
|
|
1485
|
-
data: r,
|
|
1486
|
-
_data: a,
|
|
1487
|
-
isComplex: i,
|
|
1488
|
-
_columns: o,
|
|
1489
|
-
originColumns: s,
|
|
1490
|
-
columns: u,
|
|
1491
|
-
fixedColumns: d,
|
|
1492
|
-
rightFixedColumns: h,
|
|
1493
|
-
leafColumns: p,
|
|
1494
|
-
fixedLeafColumns: m,
|
|
1495
|
-
rightFixedLeafColumns: f,
|
|
1496
|
-
updateOrderFns: g,
|
|
1497
|
-
leafColumnsLength: v,
|
|
1498
|
-
fixedLeafColumnsLength: y,
|
|
1499
|
-
rightFixedLeafColumnsLength: b,
|
|
1500
|
-
isAllSelected: S,
|
|
1501
|
-
selection: c,
|
|
1502
|
-
reserveSelection: x,
|
|
1503
|
-
selectOnIndeterminate: k,
|
|
1504
|
-
selectable: w,
|
|
1505
|
-
filters: R,
|
|
1506
|
-
filteredData: F,
|
|
1507
|
-
sortingColumn: K,
|
|
1508
|
-
sortProp: B,
|
|
1509
|
-
sortOrder: M,
|
|
1510
|
-
hoverRow: z,
|
|
1511
|
-
...rn,
|
|
1512
|
-
...fn,
|
|
1513
|
-
...mn
|
|
1514
|
-
}
|
|
1515
|
-
};
|
|
1516
|
-
}
|
|
1517
|
-
function Et(e, t) {
|
|
1518
|
-
return e.map((l) => {
|
|
1519
|
-
var n;
|
|
1520
|
-
return l.id === t.id ? t : ((n = l.children) != null && n.length && (l.children = Et(l.children, t)), l);
|
|
1521
|
-
});
|
|
1522
|
-
}
|
|
1523
|
-
function kt(e) {
|
|
1524
|
-
e.forEach((t) => {
|
|
1525
|
-
var l, n;
|
|
1526
|
-
t.no = (l = t.getColumnIndex) == null ? void 0 : l.call(t), (n = t.children) != null && n.length && kt(t.children);
|
|
1527
|
-
}), e.sort((t, l) => t.no - l.no);
|
|
1528
|
-
}
|
|
1529
|
-
function Ur() {
|
|
1530
|
-
const e = ee(), t = Gr();
|
|
1531
|
-
return {
|
|
1532
|
-
ns: se("table"),
|
|
1533
|
-
...t,
|
|
1534
|
-
mutations: {
|
|
1535
|
-
setData(i, o) {
|
|
1536
|
-
const s = O(i._data) !== o;
|
|
1537
|
-
i.data.value = o, i._data.value = o, e.store.execQuery(), e.store.updateCurrentRowData(), e.store.updateExpandRows(), e.store.updateTreeData(e.store.states.defaultExpandAll.value), O(i.reserveSelection) ? (e.store.assertRowKey(), e.store.updateSelectionByRowKey()) : s ? e.store.clearSelection() : e.store.cleanSelection(), e.store.updateAllSelected(), e.$ready && e.store.scheduleLayout();
|
|
1538
|
-
},
|
|
1539
|
-
insertColumn(i, o, s, u) {
|
|
1540
|
-
const d = O(i._columns);
|
|
1541
|
-
let h = [];
|
|
1542
|
-
s ? (s && !s.children && (s.children = []), s.children.push(o), h = Et(d, s)) : (d.push(o), h = d), kt(h), i._columns.value = h, i.updateOrderFns.push(u), o.type === "selection" && (i.selectable.value = o.selectable, i.reserveSelection.value = o.reserveSelection), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
|
|
1543
|
-
},
|
|
1544
|
-
updateColumnOrder(i, o) {
|
|
1545
|
-
var s;
|
|
1546
|
-
((s = o.getColumnIndex) == null ? void 0 : s.call(o)) !== o.no && (kt(i._columns.value), e.$ready && e.store.updateColumns());
|
|
1547
|
-
},
|
|
1548
|
-
removeColumn(i, o, s, u) {
|
|
1549
|
-
const d = O(i._columns) || [];
|
|
1550
|
-
if (s)
|
|
1551
|
-
s.children.splice(s.children.findIndex((p) => p.id === o.id), 1), Ee(() => {
|
|
1552
|
-
var p;
|
|
1553
|
-
((p = s.children) == null ? void 0 : p.length) === 0 && delete s.children;
|
|
1554
|
-
}), i._columns.value = Et(d, s);
|
|
1555
|
-
else {
|
|
1556
|
-
const p = d.indexOf(o);
|
|
1557
|
-
p > -1 && (d.splice(p, 1), i._columns.value = d);
|
|
1558
|
-
}
|
|
1559
|
-
const h = i.updateOrderFns.indexOf(u);
|
|
1560
|
-
h > -1 && i.updateOrderFns.splice(h, 1), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
|
|
1561
|
-
},
|
|
1562
|
-
sort(i, o) {
|
|
1563
|
-
const { prop: s, order: u, init: d } = o;
|
|
1564
|
-
if (s) {
|
|
1565
|
-
const h = O(i.columns).find((p) => p.property === s);
|
|
1566
|
-
h && (h.order = u, e.store.updateSort(h, s, u), e.store.commit("changeSortCondition", { init: d }));
|
|
1567
|
-
}
|
|
1568
|
-
},
|
|
1569
|
-
changeSortCondition(i, o) {
|
|
1570
|
-
const { sortingColumn: s, sortProp: u, sortOrder: d } = i, h = O(s), p = O(u), m = O(d);
|
|
1571
|
-
m === null && (i.sortingColumn.value = null, i.sortProp.value = null);
|
|
1572
|
-
const f = { filter: !0 };
|
|
1573
|
-
e.store.execQuery(f), (!o || !(o.silent || o.init)) && e.emit("sort-change", {
|
|
1574
|
-
column: h,
|
|
1575
|
-
prop: p,
|
|
1576
|
-
order: m
|
|
1577
|
-
}), e.store.updateTableScrollY();
|
|
1578
|
-
},
|
|
1579
|
-
filterChange(i, o) {
|
|
1580
|
-
const { column: s, values: u, silent: d } = o, h = e.store.updateFilters(s, u);
|
|
1581
|
-
e.store.execQuery(), d || e.emit("filter-change", h), e.store.updateTableScrollY();
|
|
1582
|
-
},
|
|
1583
|
-
toggleAllSelection() {
|
|
1584
|
-
e.store.toggleAllSelection();
|
|
1585
|
-
},
|
|
1586
|
-
rowSelectedChanged(i, o) {
|
|
1587
|
-
e.store.toggleRowSelection(o), e.store.updateAllSelected();
|
|
1588
|
-
},
|
|
1589
|
-
setHoverRow(i, o) {
|
|
1590
|
-
i.hoverRow.value = o;
|
|
1591
|
-
},
|
|
1592
|
-
setCurrentRow(i, o) {
|
|
1593
|
-
e.store.updateCurrentRow(o);
|
|
1594
|
-
}
|
|
1595
|
-
},
|
|
1596
|
-
commit: function(i, ...o) {
|
|
1597
|
-
const s = e.store.mutations;
|
|
1598
|
-
if (s[i])
|
|
1599
|
-
s[i].apply(e, [e.store.states].concat(o));
|
|
1600
|
-
else
|
|
1601
|
-
throw new Error(`Action not found: ${i}`);
|
|
1602
|
-
},
|
|
1603
|
-
updateTableScrollY: function() {
|
|
1604
|
-
Ee(() => e.layout.updateScrollY.apply(e.layout));
|
|
1605
|
-
}
|
|
1606
|
-
};
|
|
1607
|
-
}
|
|
1608
|
-
const Pe = {
|
|
1609
|
-
rowKey: "rowKey",
|
|
1610
|
-
defaultExpandAll: "defaultExpandAll",
|
|
1611
|
-
selectOnIndeterminate: "selectOnIndeterminate",
|
|
1612
|
-
indent: "indent",
|
|
1613
|
-
lazy: "lazy",
|
|
1614
|
-
data: "data",
|
|
1615
|
-
"treeProps.hasChildren": {
|
|
1616
|
-
key: "lazyColumnIdentifier",
|
|
1617
|
-
default: "hasChildren"
|
|
1618
|
-
},
|
|
1619
|
-
"treeProps.children": {
|
|
1620
|
-
key: "childrenColumnName",
|
|
1621
|
-
default: "children"
|
|
1622
|
-
}
|
|
1623
|
-
};
|
|
1624
|
-
function Yr(e, t) {
|
|
1625
|
-
if (!e)
|
|
1626
|
-
throw new Error("Table is required.");
|
|
1627
|
-
const l = Ur();
|
|
1628
|
-
return l.toggleAllSelection = nt(l._toggleAllSelection, 10), Object.keys(Pe).forEach((n) => {
|
|
1629
|
-
Xl(_l(t, n), n, l);
|
|
1630
|
-
}), qr(l, t), l;
|
|
1631
|
-
}
|
|
1632
|
-
function qr(e, t) {
|
|
1633
|
-
Object.keys(Pe).forEach((l) => {
|
|
1634
|
-
ie(() => _l(t, l), (n) => {
|
|
1635
|
-
Xl(n, l, e);
|
|
1636
|
-
});
|
|
1637
|
-
});
|
|
1638
|
-
}
|
|
1639
|
-
function Xl(e, t, l) {
|
|
1640
|
-
let n = e, r = Pe[t];
|
|
1641
|
-
typeof Pe[t] == "object" && (r = r.key, n = n || Pe[t].default), l.states[r].value = n;
|
|
1642
|
-
}
|
|
1643
|
-
function _l(e, t) {
|
|
1644
|
-
if (t.includes(".")) {
|
|
1645
|
-
const l = t.split(".");
|
|
1646
|
-
let n = e;
|
|
1647
|
-
return l.forEach((r) => {
|
|
1648
|
-
n = n[r];
|
|
1649
|
-
}), n;
|
|
1650
|
-
} else
|
|
1651
|
-
return e[t];
|
|
1652
|
-
}
|
|
1653
|
-
class Xr {
|
|
1654
|
-
constructor(t) {
|
|
1655
|
-
this.observers = [], this.table = null, this.store = null, this.columns = [], this.fit = !0, this.showHeader = !0, this.height = E(null), this.scrollX = E(!1), this.scrollY = E(!1), this.bodyWidth = E(null), this.fixedWidth = E(null), this.rightFixedWidth = E(null), this.gutterWidth = 0;
|
|
1656
|
-
for (const l in t)
|
|
1657
|
-
Ie(t, l) && (Be(this[l]) ? this[l].value = t[l] : this[l] = t[l]);
|
|
1658
|
-
if (!this.table)
|
|
1659
|
-
throw new Error("Table is required for Table Layout");
|
|
1660
|
-
if (!this.store)
|
|
1661
|
-
throw new Error("Store is required for Table Layout");
|
|
1662
|
-
}
|
|
1663
|
-
updateScrollY() {
|
|
1664
|
-
if (this.height.value === null)
|
|
1665
|
-
return !1;
|
|
1666
|
-
const l = this.table.refs.scrollBarRef;
|
|
1667
|
-
if (this.table.vnode.el && (l != null && l.wrapRef)) {
|
|
1668
|
-
let n = !0;
|
|
1669
|
-
const r = this.scrollY.value;
|
|
1670
|
-
return n = l.wrapRef.scrollHeight > l.wrapRef.clientHeight, this.scrollY.value = n, r !== n;
|
|
1671
|
-
}
|
|
1672
|
-
return !1;
|
|
1673
|
-
}
|
|
1674
|
-
setHeight(t, l = "height") {
|
|
1675
|
-
if (!ze)
|
|
1676
|
-
return;
|
|
1677
|
-
const n = this.table.vnode.el;
|
|
1678
|
-
if (t = Pr(t), this.height.value = Number(t), !n && (t || t === 0))
|
|
1679
|
-
return Ee(() => this.setHeight(t, l));
|
|
1680
|
-
typeof t == "number" ? (n.style[l] = `${t}px`, this.updateElsHeight()) : typeof t == "string" && (n.style[l] = t, this.updateElsHeight());
|
|
1681
|
-
}
|
|
1682
|
-
setMaxHeight(t) {
|
|
1683
|
-
this.setHeight(t, "max-height");
|
|
1684
|
-
}
|
|
1685
|
-
getFlattenColumns() {
|
|
1686
|
-
const t = [];
|
|
1687
|
-
return this.table.store.states.columns.value.forEach((n) => {
|
|
1688
|
-
n.isColumnGroup ? t.push.apply(t, n.columns) : t.push(n);
|
|
1689
|
-
}), t;
|
|
1690
|
-
}
|
|
1691
|
-
updateElsHeight() {
|
|
1692
|
-
this.updateScrollY(), this.notifyObservers("scrollable");
|
|
1693
|
-
}
|
|
1694
|
-
headerDisplayNone(t) {
|
|
1695
|
-
if (!t)
|
|
1696
|
-
return !0;
|
|
1697
|
-
let l = t;
|
|
1698
|
-
for (; l.tagName !== "DIV"; ) {
|
|
1699
|
-
if (getComputedStyle(l).display === "none")
|
|
1700
|
-
return !0;
|
|
1701
|
-
l = l.parentElement;
|
|
1702
|
-
}
|
|
1703
|
-
return !1;
|
|
1704
|
-
}
|
|
1705
|
-
updateColumnsWidth() {
|
|
1706
|
-
if (!ze)
|
|
1707
|
-
return;
|
|
1708
|
-
const t = this.fit, l = this.table.vnode.el.clientWidth;
|
|
1709
|
-
let n = 0;
|
|
1710
|
-
const r = this.getFlattenColumns(), a = r.filter((s) => typeof s.width != "number");
|
|
1711
|
-
if (r.forEach((s) => {
|
|
1712
|
-
typeof s.width == "number" && s.realWidth && (s.realWidth = null);
|
|
1713
|
-
}), a.length > 0 && t) {
|
|
1714
|
-
if (r.forEach((s) => {
|
|
1715
|
-
n += Number(s.width || s.minWidth || 80);
|
|
1716
|
-
}), n <= l) {
|
|
1717
|
-
this.scrollX.value = !1;
|
|
1718
|
-
const s = l - n;
|
|
1719
|
-
if (a.length === 1)
|
|
1720
|
-
a[0].realWidth = Number(a[0].minWidth || 80) + s;
|
|
1721
|
-
else {
|
|
1722
|
-
const u = a.reduce((p, m) => p + Number(m.minWidth || 80), 0), d = s / u;
|
|
1723
|
-
let h = 0;
|
|
1724
|
-
a.forEach((p, m) => {
|
|
1725
|
-
if (m === 0)
|
|
1726
|
-
return;
|
|
1727
|
-
const f = Math.floor(Number(p.minWidth || 80) * d);
|
|
1728
|
-
h += f, p.realWidth = Number(p.minWidth || 80) + f;
|
|
1729
|
-
}), a[0].realWidth = Number(a[0].minWidth || 80) + s - h;
|
|
1730
|
-
}
|
|
1731
|
-
} else
|
|
1732
|
-
this.scrollX.value = !0, a.forEach((s) => {
|
|
1733
|
-
s.realWidth = Number(s.minWidth);
|
|
1734
|
-
});
|
|
1735
|
-
this.bodyWidth.value = Math.max(n, l), this.table.state.resizeState.value.width = this.bodyWidth.value;
|
|
1736
|
-
} else
|
|
1737
|
-
r.forEach((s) => {
|
|
1738
|
-
!s.width && !s.minWidth ? s.realWidth = 80 : s.realWidth = Number(s.width || s.minWidth), n += s.realWidth;
|
|
1739
|
-
}), this.scrollX.value = n > l, this.bodyWidth.value = n;
|
|
1740
|
-
const i = this.store.states.fixedColumns.value;
|
|
1741
|
-
if (i.length > 0) {
|
|
1742
|
-
let s = 0;
|
|
1743
|
-
i.forEach((u) => {
|
|
1744
|
-
s += Number(u.realWidth || u.width);
|
|
1745
|
-
}), this.fixedWidth.value = s;
|
|
1746
|
-
}
|
|
1747
|
-
const o = this.store.states.rightFixedColumns.value;
|
|
1748
|
-
if (o.length > 0) {
|
|
1749
|
-
let s = 0;
|
|
1750
|
-
o.forEach((u) => {
|
|
1751
|
-
s += Number(u.realWidth || u.width);
|
|
1752
|
-
}), this.rightFixedWidth.value = s;
|
|
1753
|
-
}
|
|
1754
|
-
this.notifyObservers("columns");
|
|
1755
|
-
}
|
|
1756
|
-
addObserver(t) {
|
|
1757
|
-
this.observers.push(t);
|
|
1758
|
-
}
|
|
1759
|
-
removeObserver(t) {
|
|
1760
|
-
const l = this.observers.indexOf(t);
|
|
1761
|
-
l !== -1 && this.observers.splice(l, 1);
|
|
1762
|
-
}
|
|
1763
|
-
notifyObservers(t) {
|
|
1764
|
-
this.observers.forEach((n) => {
|
|
1765
|
-
var r, a;
|
|
1766
|
-
switch (t) {
|
|
1767
|
-
case "columns":
|
|
1768
|
-
(r = n.state) == null || r.onColumnsChange(this);
|
|
1769
|
-
break;
|
|
1770
|
-
case "scrollable":
|
|
1771
|
-
(a = n.state) == null || a.onScrollableChange(this);
|
|
1772
|
-
break;
|
|
1773
|
-
default:
|
|
1774
|
-
throw new Error(`Table Layout don't have event ${t}.`);
|
|
1775
|
-
}
|
|
1776
|
-
});
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
const { CheckboxGroup: _r } = Ae, Qr = he({
|
|
1780
|
-
name: "ElTableFilterPanel",
|
|
1781
|
-
components: {
|
|
1782
|
-
ElCheckbox: Ae,
|
|
1783
|
-
ElCheckboxGroup: _r,
|
|
1784
|
-
ElScrollbar: pl,
|
|
1785
|
-
ElTooltip: $n,
|
|
1786
|
-
ElIcon: Mt,
|
|
1787
|
-
ArrowDown: eo,
|
|
1788
|
-
ArrowUp: to
|
|
1789
|
-
},
|
|
1790
|
-
directives: { ClickOutside: Pn },
|
|
1791
|
-
props: {
|
|
1792
|
-
placement: {
|
|
1793
|
-
type: String,
|
|
1794
|
-
default: "bottom-start"
|
|
1795
|
-
},
|
|
1796
|
-
store: {
|
|
1797
|
-
type: Object
|
|
1798
|
-
},
|
|
1799
|
-
column: {
|
|
1800
|
-
type: Object
|
|
1801
|
-
},
|
|
1802
|
-
upDataColumn: {
|
|
1803
|
-
type: Function
|
|
1804
|
-
}
|
|
1805
|
-
},
|
|
1806
|
-
setup(e) {
|
|
1807
|
-
const t = ee(), { t: l } = yl(), n = se("table-filter"), r = t == null ? void 0 : t.parent;
|
|
1808
|
-
r.filterPanels.value[e.column.id] || (r.filterPanels.value[e.column.id] = t);
|
|
1809
|
-
const a = E(!1), i = E(null), o = T(() => e.column && e.column.filters), s = T({
|
|
1810
|
-
get: () => {
|
|
1811
|
-
var c;
|
|
1812
|
-
return (((c = e.column) == null ? void 0 : c.filteredValue) || [])[0];
|
|
1813
|
-
},
|
|
1814
|
-
set: (c) => {
|
|
1815
|
-
u.value && (typeof c < "u" && c !== null ? u.value.splice(0, 1, c) : u.value.splice(0, 1));
|
|
1816
|
-
}
|
|
1817
|
-
}), u = T({
|
|
1818
|
-
get() {
|
|
1819
|
-
return e.column ? e.column.filteredValue || [] : [];
|
|
1820
|
-
},
|
|
1821
|
-
set(c) {
|
|
1822
|
-
e.column && e.upDataColumn("filteredValue", c);
|
|
1823
|
-
}
|
|
1824
|
-
}), d = T(() => e.column ? e.column.filterMultiple : !0), h = (c) => c.value === s.value, p = () => {
|
|
1825
|
-
a.value = !1;
|
|
1826
|
-
}, m = (c) => {
|
|
1827
|
-
c.stopPropagation(), a.value = !a.value;
|
|
1828
|
-
}, f = () => {
|
|
1829
|
-
a.value = !1;
|
|
1830
|
-
}, g = () => {
|
|
1831
|
-
b(u.value), p();
|
|
1832
|
-
}, v = () => {
|
|
1833
|
-
u.value = [], b(u.value), p();
|
|
1834
|
-
}, y = (c) => {
|
|
1835
|
-
s.value = c, b(typeof c < "u" && c !== null ? u.value : []), p();
|
|
1836
|
-
}, b = (c) => {
|
|
1837
|
-
e.store.commit("filterChange", {
|
|
1838
|
-
column: e.column,
|
|
1839
|
-
values: c
|
|
1840
|
-
}), e.store.updateAllSelected();
|
|
1841
|
-
};
|
|
1842
|
-
ie(a, (c) => {
|
|
1843
|
-
e.column && e.upDataColumn("filterOpened", c);
|
|
1844
|
-
}, {
|
|
1845
|
-
immediate: !0
|
|
1846
|
-
});
|
|
1847
|
-
const S = T(() => {
|
|
1848
|
-
var c, x;
|
|
1849
|
-
return (x = (c = i.value) == null ? void 0 : c.popperRef) == null ? void 0 : x.contentRef;
|
|
1850
|
-
});
|
|
1851
|
-
return {
|
|
1852
|
-
tooltipVisible: a,
|
|
1853
|
-
multiple: d,
|
|
1854
|
-
filteredValue: u,
|
|
1855
|
-
filterValue: s,
|
|
1856
|
-
filters: o,
|
|
1857
|
-
handleConfirm: g,
|
|
1858
|
-
handleReset: v,
|
|
1859
|
-
handleSelect: y,
|
|
1860
|
-
isActive: h,
|
|
1861
|
-
t: l,
|
|
1862
|
-
ns: n,
|
|
1863
|
-
showFilterPanel: m,
|
|
1864
|
-
hideFilterPanel: f,
|
|
1865
|
-
popperPaneRef: S,
|
|
1866
|
-
tooltip: i
|
|
1867
|
-
};
|
|
1868
|
-
}
|
|
1869
|
-
}), Zr = { key: 0 }, Jr = ["disabled"], es = ["label", "onClick"];
|
|
1870
|
-
function ts(e, t, l, n, r, a) {
|
|
1871
|
-
const i = fe("el-checkbox"), o = fe("el-checkbox-group"), s = fe("el-scrollbar"), u = fe("arrow-up"), d = fe("arrow-down"), h = fe("el-icon"), p = fe("el-tooltip"), m = cl("click-outside");
|
|
1872
|
-
return D(), Le(p, {
|
|
1873
|
-
ref: "tooltip",
|
|
1874
|
-
visible: e.tooltipVisible,
|
|
1875
|
-
offset: 0,
|
|
1876
|
-
placement: e.placement,
|
|
1877
|
-
"show-arrow": !1,
|
|
1878
|
-
"stop-popper-mouse-event": !1,
|
|
1879
|
-
teleported: "",
|
|
1880
|
-
effect: "light",
|
|
1881
|
-
pure: "",
|
|
1882
|
-
"popper-class": e.ns.b(),
|
|
1883
|
-
persistent: ""
|
|
1884
|
-
}, {
|
|
1885
|
-
content: ye(() => [
|
|
1886
|
-
e.multiple ? (D(), U("div", Zr, [
|
|
1887
|
-
oe("div", {
|
|
1888
|
-
class: I(e.ns.e("content"))
|
|
1889
|
-
}, [
|
|
1890
|
-
we(s, {
|
|
1891
|
-
"wrap-class": e.ns.e("wrap")
|
|
1892
|
-
}, {
|
|
1893
|
-
default: ye(() => [
|
|
1894
|
-
we(o, {
|
|
1895
|
-
modelValue: e.filteredValue,
|
|
1896
|
-
"onUpdate:modelValue": t[0] || (t[0] = (f) => e.filteredValue = f),
|
|
1897
|
-
class: I(e.ns.e("checkbox-group"))
|
|
1898
|
-
}, {
|
|
1899
|
-
default: ye(() => [
|
|
1900
|
-
(D(!0), U(Je, null, It(e.filters, (f) => (D(), Le(i, {
|
|
1901
|
-
key: f.value,
|
|
1902
|
-
label: f.value
|
|
1903
|
-
}, {
|
|
1904
|
-
default: ye(() => [
|
|
1905
|
-
ot(Se(f.text), 1)
|
|
1906
|
-
]),
|
|
1907
|
-
_: 2
|
|
1908
|
-
}, 1032, ["label"]))), 128))
|
|
1909
|
-
]),
|
|
1910
|
-
_: 1
|
|
1911
|
-
}, 8, ["modelValue", "class"])
|
|
1912
|
-
]),
|
|
1913
|
-
_: 1
|
|
1914
|
-
}, 8, ["wrap-class"])
|
|
1915
|
-
], 2),
|
|
1916
|
-
oe("div", {
|
|
1917
|
-
class: I(e.ns.e("bottom"))
|
|
1918
|
-
}, [
|
|
1919
|
-
oe("button", {
|
|
1920
|
-
class: I({ [e.ns.is("disabled")]: e.filteredValue.length === 0 }),
|
|
1921
|
-
disabled: e.filteredValue.length === 0,
|
|
1922
|
-
type: "button",
|
|
1923
|
-
onClick: t[1] || (t[1] = (...f) => e.handleConfirm && e.handleConfirm(...f))
|
|
1924
|
-
}, Se(e.t("el.table.confirmFilter")), 11, Jr),
|
|
1925
|
-
oe("button", {
|
|
1926
|
-
type: "button",
|
|
1927
|
-
onClick: t[2] || (t[2] = (...f) => e.handleReset && e.handleReset(...f))
|
|
1928
|
-
}, Se(e.t("el.table.resetFilter")), 1)
|
|
1929
|
-
], 2)
|
|
1930
|
-
])) : (D(), U("ul", {
|
|
1931
|
-
key: 1,
|
|
1932
|
-
class: I(e.ns.e("list"))
|
|
1933
|
-
}, [
|
|
1934
|
-
oe("li", {
|
|
1935
|
-
class: I([
|
|
1936
|
-
e.ns.e("list-item"),
|
|
1937
|
-
{
|
|
1938
|
-
[e.ns.is("active")]: e.filterValue === void 0 || e.filterValue === null
|
|
1939
|
-
}
|
|
1940
|
-
]),
|
|
1941
|
-
onClick: t[3] || (t[3] = (f) => e.handleSelect(null))
|
|
1942
|
-
}, Se(e.t("el.table.clearFilter")), 3),
|
|
1943
|
-
(D(!0), U(Je, null, It(e.filters, (f) => (D(), U("li", {
|
|
1944
|
-
key: f.value,
|
|
1945
|
-
class: I([e.ns.e("list-item"), e.ns.is("active", e.isActive(f))]),
|
|
1946
|
-
label: f.value,
|
|
1947
|
-
onClick: (g) => e.handleSelect(f.value)
|
|
1948
|
-
}, Se(f.text), 11, es))), 128))
|
|
1949
|
-
], 2))
|
|
1950
|
-
]),
|
|
1951
|
-
default: ye(() => [
|
|
1952
|
-
xe((D(), U("span", {
|
|
1953
|
-
class: I([
|
|
1954
|
-
`${e.ns.namespace.value}-table__column-filter-trigger`,
|
|
1955
|
-
`${e.ns.namespace.value}-none-outline`
|
|
1956
|
-
]),
|
|
1957
|
-
onClick: t[4] || (t[4] = (...f) => e.showFilterPanel && e.showFilterPanel(...f))
|
|
1958
|
-
}, [
|
|
1959
|
-
we(h, null, {
|
|
1960
|
-
default: ye(() => [
|
|
1961
|
-
e.column.filterOpened ? (D(), Le(u, { key: 0 })) : (D(), Le(d, { key: 1 }))
|
|
1962
|
-
]),
|
|
1963
|
-
_: 1
|
|
1964
|
-
})
|
|
1965
|
-
], 2)), [
|
|
1966
|
-
[m, e.hideFilterPanel, e.popperPaneRef]
|
|
1967
|
-
])
|
|
1968
|
-
]),
|
|
1969
|
-
_: 1
|
|
1970
|
-
}, 8, ["visible", "placement", "popper-class"]);
|
|
1971
|
-
}
|
|
1972
|
-
var ls = /* @__PURE__ */ je(Qr, [["render", ts], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);
|
|
1973
|
-
function Ql(e) {
|
|
1974
|
-
const t = ee();
|
|
1975
|
-
fl(() => {
|
|
1976
|
-
l.value.addObserver(t);
|
|
1977
|
-
}), Ke(() => {
|
|
1978
|
-
n(l.value), r(l.value);
|
|
1979
|
-
}), wn(() => {
|
|
1980
|
-
n(l.value), r(l.value);
|
|
1981
|
-
}), Rt(() => {
|
|
1982
|
-
l.value.removeObserver(t);
|
|
1983
|
-
});
|
|
1984
|
-
const l = T(() => {
|
|
1985
|
-
const a = e.layout;
|
|
1986
|
-
if (!a)
|
|
1987
|
-
throw new Error("Can not find table layout.");
|
|
1988
|
-
return a;
|
|
1989
|
-
}), n = (a) => {
|
|
1990
|
-
var i;
|
|
1991
|
-
const o = ((i = e.vnode.el) == null ? void 0 : i.querySelectorAll("colgroup > col")) || [];
|
|
1992
|
-
if (!o.length)
|
|
1993
|
-
return;
|
|
1994
|
-
const s = a.getFlattenColumns(), u = {};
|
|
1995
|
-
s.forEach((d) => {
|
|
1996
|
-
u[d.id] = d;
|
|
1997
|
-
});
|
|
1998
|
-
for (let d = 0, h = o.length; d < h; d++) {
|
|
1999
|
-
const p = o[d], m = p.getAttribute("name"), f = u[m];
|
|
2000
|
-
f && p.setAttribute("width", f.realWidth || f.width);
|
|
2001
|
-
}
|
|
2002
|
-
}, r = (a) => {
|
|
2003
|
-
var i, o;
|
|
2004
|
-
const s = ((i = e.vnode.el) == null ? void 0 : i.querySelectorAll("colgroup > col[name=gutter]")) || [];
|
|
2005
|
-
for (let d = 0, h = s.length; d < h; d++)
|
|
2006
|
-
s[d].setAttribute("width", a.scrollY.value ? a.gutterWidth : "0");
|
|
2007
|
-
const u = ((o = e.vnode.el) == null ? void 0 : o.querySelectorAll("th.gutter")) || [];
|
|
2008
|
-
for (let d = 0, h = u.length; d < h; d++) {
|
|
2009
|
-
const p = u[d];
|
|
2010
|
-
p.style.width = a.scrollY.value ? `${a.gutterWidth}px` : "0", p.style.display = a.scrollY.value ? "" : "none";
|
|
2011
|
-
}
|
|
2012
|
-
};
|
|
2013
|
-
return {
|
|
2014
|
-
tableLayout: l.value,
|
|
2015
|
-
onColumnsChange: n,
|
|
2016
|
-
onScrollableChange: r
|
|
2017
|
-
};
|
|
2018
|
-
}
|
|
2019
|
-
const pe = Symbol("ElTable");
|
|
2020
|
-
function ns(e, t) {
|
|
2021
|
-
const l = ee(), n = re(pe), r = (g) => {
|
|
2022
|
-
g.stopPropagation();
|
|
2023
|
-
}, a = (g, v) => {
|
|
2024
|
-
!v.filters && v.sortable ? f(g, v, !1) : v.filterable && !v.sortable && r(g), n == null || n.emit("header-click", v, g);
|
|
2025
|
-
}, i = (g, v) => {
|
|
2026
|
-
n == null || n.emit("header-contextmenu", v, g);
|
|
2027
|
-
}, o = E(null), s = E(!1), u = E({}), d = (g, v) => {
|
|
2028
|
-
if (ze && !(v.children && v.children.length > 0) && o.value && e.border) {
|
|
2029
|
-
s.value = !0;
|
|
2030
|
-
const y = n;
|
|
2031
|
-
t("set-drag-visible", !0);
|
|
2032
|
-
const S = (y == null ? void 0 : y.vnode.el).getBoundingClientRect().left, c = l.vnode.el.querySelector(`th.${v.id}`), x = c.getBoundingClientRect(), k = x.left - S + 30;
|
|
2033
|
-
Cl(c, "noclick"), u.value = {
|
|
2034
|
-
startMouseLeft: g.clientX,
|
|
2035
|
-
startLeft: x.right - S,
|
|
2036
|
-
startColumnLeft: x.left - S,
|
|
2037
|
-
tableLeft: S
|
|
2038
|
-
};
|
|
2039
|
-
const w = y == null ? void 0 : y.refs.resizeProxy;
|
|
2040
|
-
w.style.left = `${u.value.startLeft}px`, document.onselectstart = function() {
|
|
2041
|
-
return !1;
|
|
2042
|
-
}, document.ondragstart = function() {
|
|
2043
|
-
return !1;
|
|
2044
|
-
};
|
|
2045
|
-
const R = (K) => {
|
|
2046
|
-
const B = K.clientX - u.value.startMouseLeft, M = u.value.startLeft + B;
|
|
2047
|
-
w.style.left = `${Math.max(k, M)}px`;
|
|
2048
|
-
}, F = () => {
|
|
2049
|
-
if (s.value) {
|
|
2050
|
-
const { startColumnLeft: K, startLeft: B } = u.value, z = Number.parseInt(w.style.left, 10) - K;
|
|
2051
|
-
v.width = v.realWidth = z, y == null || y.emit("header-dragend", v.width, B - K, v, g), requestAnimationFrame(() => {
|
|
2052
|
-
e.store.scheduleLayout(!1, !0);
|
|
2053
|
-
}), document.body.style.cursor = "", s.value = !1, o.value = null, u.value = {}, t("set-drag-visible", !1);
|
|
2054
|
-
}
|
|
2055
|
-
document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", F), document.onselectstart = null, document.ondragstart = null, setTimeout(() => {
|
|
2056
|
-
ft(c, "noclick");
|
|
2057
|
-
}, 0);
|
|
2058
|
-
};
|
|
2059
|
-
document.addEventListener("mousemove", R), document.addEventListener("mouseup", F);
|
|
2060
|
-
}
|
|
2061
|
-
}, h = (g, v) => {
|
|
2062
|
-
if (v.children && v.children.length > 0)
|
|
2063
|
-
return;
|
|
2064
|
-
const y = g.target;
|
|
2065
|
-
if (!qn(y))
|
|
2066
|
-
return;
|
|
2067
|
-
const b = y == null ? void 0 : y.closest("th");
|
|
2068
|
-
if (!(!v || !v.resizable) && !s.value && e.border) {
|
|
2069
|
-
const S = b.getBoundingClientRect(), c = document.body.style;
|
|
2070
|
-
S.width > 12 && S.right - g.pageX < 8 ? (c.cursor = "col-resize", Ue(b, "is-sortable") && (b.style.cursor = "col-resize"), o.value = v) : s.value || (c.cursor = "", Ue(b, "is-sortable") && (b.style.cursor = "pointer"), o.value = null);
|
|
2071
|
-
}
|
|
2072
|
-
}, p = () => {
|
|
2073
|
-
ze && (document.body.style.cursor = "");
|
|
2074
|
-
}, m = ({ order: g, sortOrders: v }) => {
|
|
2075
|
-
if (g === "")
|
|
2076
|
-
return v[0];
|
|
2077
|
-
const y = v.indexOf(g || null);
|
|
2078
|
-
return v[y > v.length - 2 ? 0 : y + 1];
|
|
2079
|
-
}, f = (g, v, y) => {
|
|
2080
|
-
var b;
|
|
2081
|
-
g.stopPropagation();
|
|
2082
|
-
const S = v.order === y ? null : y || m(v), c = (b = g.target) == null ? void 0 : b.closest("th");
|
|
2083
|
-
if (c && Ue(c, "noclick")) {
|
|
2084
|
-
ft(c, "noclick");
|
|
2085
|
-
return;
|
|
2086
|
-
}
|
|
2087
|
-
if (!v.sortable)
|
|
2088
|
-
return;
|
|
2089
|
-
const x = e.store.states;
|
|
2090
|
-
let k = x.sortProp.value, w;
|
|
2091
|
-
const R = x.sortingColumn.value;
|
|
2092
|
-
(R !== v || R === v && R.order === null) && (R && (R.order = null), x.sortingColumn.value = v, k = v.property), S ? w = v.order = S : w = v.order = null, x.sortProp.value = k, x.sortOrder.value = w, n == null || n.store.commit("changeSortCondition");
|
|
2093
|
-
};
|
|
2094
|
-
return {
|
|
2095
|
-
handleHeaderClick: a,
|
|
2096
|
-
handleHeaderContextMenu: i,
|
|
2097
|
-
handleMouseDown: d,
|
|
2098
|
-
handleMouseMove: h,
|
|
2099
|
-
handleMouseOut: p,
|
|
2100
|
-
handleSortClick: f,
|
|
2101
|
-
handleFilterClick: r
|
|
2102
|
-
};
|
|
2103
|
-
}
|
|
2104
|
-
function os(e) {
|
|
2105
|
-
const t = re(pe), l = se("table");
|
|
2106
|
-
return {
|
|
2107
|
-
getHeaderRowStyle: (o) => {
|
|
2108
|
-
const s = t == null ? void 0 : t.props.headerRowStyle;
|
|
2109
|
-
return typeof s == "function" ? s.call(null, { rowIndex: o }) : s;
|
|
2110
|
-
},
|
|
2111
|
-
getHeaderRowClass: (o) => {
|
|
2112
|
-
const s = [], u = t == null ? void 0 : t.props.headerRowClassName;
|
|
2113
|
-
return typeof u == "string" ? s.push(u) : typeof u == "function" && s.push(u.call(null, { rowIndex: o })), s.join(" ");
|
|
2114
|
-
},
|
|
2115
|
-
getHeaderCellStyle: (o, s, u, d) => {
|
|
2116
|
-
var h;
|
|
2117
|
-
let p = (h = t == null ? void 0 : t.props.headerCellStyle) != null ? h : {};
|
|
2118
|
-
typeof p == "function" && (p = p.call(null, {
|
|
2119
|
-
rowIndex: o,
|
|
2120
|
-
columnIndex: s,
|
|
2121
|
-
row: u,
|
|
2122
|
-
column: d
|
|
2123
|
-
}));
|
|
2124
|
-
const m = Ht(s, d.fixed, e.store, u);
|
|
2125
|
-
return Te(m, "left"), Te(m, "right"), Object.assign({}, p, m);
|
|
2126
|
-
},
|
|
2127
|
-
getHeaderCellClass: (o, s, u, d) => {
|
|
2128
|
-
const h = Wt(l.b(), s, d.fixed, e.store, u), p = [
|
|
2129
|
-
d.id,
|
|
2130
|
-
d.order,
|
|
2131
|
-
d.headerAlign,
|
|
2132
|
-
d.className,
|
|
2133
|
-
d.labelClassName,
|
|
2134
|
-
...h
|
|
2135
|
-
];
|
|
2136
|
-
d.children || p.push("is-leaf"), d.sortable && p.push("is-sortable");
|
|
2137
|
-
const m = t == null ? void 0 : t.props.headerCellClassName;
|
|
2138
|
-
return typeof m == "string" ? p.push(m) : typeof m == "function" && p.push(m.call(null, {
|
|
2139
|
-
rowIndex: o,
|
|
2140
|
-
columnIndex: s,
|
|
2141
|
-
row: u,
|
|
2142
|
-
column: d
|
|
2143
|
-
})), p.push(l.e("cell")), p.filter((f) => !!f).join(" ");
|
|
2144
|
-
}
|
|
2145
|
-
};
|
|
2146
|
-
}
|
|
2147
|
-
const Zl = (e) => {
|
|
2148
|
-
const t = [];
|
|
2149
|
-
return e.forEach((l) => {
|
|
2150
|
-
l.children ? (t.push(l), t.push.apply(t, Zl(l.children))) : t.push(l);
|
|
2151
|
-
}), t;
|
|
2152
|
-
}, rs = (e) => {
|
|
2153
|
-
let t = 1;
|
|
2154
|
-
const l = (a, i) => {
|
|
2155
|
-
if (i && (a.level = i.level + 1, t < a.level && (t = a.level)), a.children) {
|
|
2156
|
-
let o = 0;
|
|
2157
|
-
a.children.forEach((s) => {
|
|
2158
|
-
l(s, a), o += s.colSpan;
|
|
2159
|
-
}), a.colSpan = o;
|
|
2160
|
-
} else
|
|
2161
|
-
a.colSpan = 1;
|
|
2162
|
-
};
|
|
2163
|
-
e.forEach((a) => {
|
|
2164
|
-
a.level = 1, l(a, void 0);
|
|
2165
|
-
});
|
|
2166
|
-
const n = [];
|
|
2167
|
-
for (let a = 0; a < t; a++)
|
|
2168
|
-
n.push([]);
|
|
2169
|
-
return Zl(e).forEach((a) => {
|
|
2170
|
-
a.children ? (a.rowSpan = 1, a.children.forEach((i) => i.isSubColumn = !0)) : a.rowSpan = t - a.level + 1, n[a.level - 1].push(a);
|
|
2171
|
-
}), n;
|
|
2172
|
-
};
|
|
2173
|
-
function ss(e) {
|
|
2174
|
-
const t = re(pe), l = T(() => rs(e.store.states.originColumns.value));
|
|
2175
|
-
return {
|
|
2176
|
-
isGroup: T(() => {
|
|
2177
|
-
const a = l.value.length > 1;
|
|
2178
|
-
return a && t && (t.state.isGroup.value = !0), a;
|
|
2179
|
-
}),
|
|
2180
|
-
toggleAllSelection: (a) => {
|
|
2181
|
-
a.stopPropagation(), t == null || t.store.commit("toggleAllSelection");
|
|
2182
|
-
},
|
|
2183
|
-
columnRows: l
|
|
2184
|
-
};
|
|
2185
|
-
}
|
|
2186
|
-
var as = he({
|
|
2187
|
-
name: "ElTableHeader",
|
|
2188
|
-
components: {
|
|
2189
|
-
ElCheckbox: Ae
|
|
2190
|
-
},
|
|
2191
|
-
props: {
|
|
2192
|
-
fixed: {
|
|
2193
|
-
type: String,
|
|
2194
|
-
default: ""
|
|
2195
|
-
},
|
|
2196
|
-
store: {
|
|
2197
|
-
required: !0,
|
|
2198
|
-
type: Object
|
|
2199
|
-
},
|
|
2200
|
-
border: Boolean,
|
|
2201
|
-
defaultSort: {
|
|
2202
|
-
type: Object,
|
|
2203
|
-
default: () => ({
|
|
2204
|
-
prop: "",
|
|
2205
|
-
order: ""
|
|
2206
|
-
})
|
|
2207
|
-
}
|
|
2208
|
-
},
|
|
2209
|
-
setup(e, { emit: t }) {
|
|
2210
|
-
const l = ee(), n = re(pe), r = se("table"), a = E({}), { onColumnsChange: i, onScrollableChange: o } = Ql(n);
|
|
2211
|
-
Ke(async () => {
|
|
2212
|
-
await Ee(), await Ee();
|
|
2213
|
-
const { prop: k, order: w } = e.defaultSort;
|
|
2214
|
-
n == null || n.store.commit("sort", { prop: k, order: w, init: !0 });
|
|
2215
|
-
});
|
|
2216
|
-
const {
|
|
2217
|
-
handleHeaderClick: s,
|
|
2218
|
-
handleHeaderContextMenu: u,
|
|
2219
|
-
handleMouseDown: d,
|
|
2220
|
-
handleMouseMove: h,
|
|
2221
|
-
handleMouseOut: p,
|
|
2222
|
-
handleSortClick: m,
|
|
2223
|
-
handleFilterClick: f
|
|
2224
|
-
} = ns(e, t), {
|
|
2225
|
-
getHeaderRowStyle: g,
|
|
2226
|
-
getHeaderRowClass: v,
|
|
2227
|
-
getHeaderCellStyle: y,
|
|
2228
|
-
getHeaderCellClass: b
|
|
2229
|
-
} = os(e), { isGroup: S, toggleAllSelection: c, columnRows: x } = ss(e);
|
|
2230
|
-
return l.state = {
|
|
2231
|
-
onColumnsChange: i,
|
|
2232
|
-
onScrollableChange: o
|
|
2233
|
-
}, l.filterPanels = a, {
|
|
2234
|
-
ns: r,
|
|
2235
|
-
filterPanels: a,
|
|
2236
|
-
onColumnsChange: i,
|
|
2237
|
-
onScrollableChange: o,
|
|
2238
|
-
columnRows: x,
|
|
2239
|
-
getHeaderRowClass: v,
|
|
2240
|
-
getHeaderRowStyle: g,
|
|
2241
|
-
getHeaderCellClass: b,
|
|
2242
|
-
getHeaderCellStyle: y,
|
|
2243
|
-
handleHeaderClick: s,
|
|
2244
|
-
handleHeaderContextMenu: u,
|
|
2245
|
-
handleMouseDown: d,
|
|
2246
|
-
handleMouseMove: h,
|
|
2247
|
-
handleMouseOut: p,
|
|
2248
|
-
handleSortClick: m,
|
|
2249
|
-
handleFilterClick: f,
|
|
2250
|
-
isGroup: S,
|
|
2251
|
-
toggleAllSelection: c
|
|
2252
|
-
};
|
|
2253
|
-
},
|
|
2254
|
-
render() {
|
|
2255
|
-
const {
|
|
2256
|
-
ns: e,
|
|
2257
|
-
isGroup: t,
|
|
2258
|
-
columnRows: l,
|
|
2259
|
-
getHeaderCellStyle: n,
|
|
2260
|
-
getHeaderCellClass: r,
|
|
2261
|
-
getHeaderRowClass: a,
|
|
2262
|
-
getHeaderRowStyle: i,
|
|
2263
|
-
handleHeaderClick: o,
|
|
2264
|
-
handleHeaderContextMenu: s,
|
|
2265
|
-
handleMouseDown: u,
|
|
2266
|
-
handleMouseMove: d,
|
|
2267
|
-
handleSortClick: h,
|
|
2268
|
-
handleMouseOut: p,
|
|
2269
|
-
store: m,
|
|
2270
|
-
$parent: f
|
|
2271
|
-
} = this;
|
|
2272
|
-
let g = 1;
|
|
2273
|
-
return H("thead", {
|
|
2274
|
-
class: { [e.is("group")]: t }
|
|
2275
|
-
}, l.map((v, y) => H("tr", {
|
|
2276
|
-
class: a(y),
|
|
2277
|
-
key: y,
|
|
2278
|
-
style: i(y)
|
|
2279
|
-
}, v.map((b, S) => (b.rowSpan > g && (g = b.rowSpan), H("th", {
|
|
2280
|
-
class: r(y, S, v, b),
|
|
2281
|
-
colspan: b.colSpan,
|
|
2282
|
-
key: `${b.id}-thead`,
|
|
2283
|
-
rowspan: b.rowSpan,
|
|
2284
|
-
style: n(y, S, v, b),
|
|
2285
|
-
onClick: (c) => o(c, b),
|
|
2286
|
-
onContextmenu: (c) => s(c, b),
|
|
2287
|
-
onMousedown: (c) => u(c, b),
|
|
2288
|
-
onMousemove: (c) => d(c, b),
|
|
2289
|
-
onMouseout: p
|
|
2290
|
-
}, [
|
|
2291
|
-
H("div", {
|
|
2292
|
-
class: [
|
|
2293
|
-
"cell",
|
|
2294
|
-
b.filteredValue && b.filteredValue.length > 0 ? "highlight" : ""
|
|
2295
|
-
]
|
|
2296
|
-
}, [
|
|
2297
|
-
b.renderHeader ? b.renderHeader({
|
|
2298
|
-
column: b,
|
|
2299
|
-
$index: S,
|
|
2300
|
-
store: m,
|
|
2301
|
-
_self: f
|
|
2302
|
-
}) : b.label,
|
|
2303
|
-
b.sortable && H("span", {
|
|
2304
|
-
onClick: (c) => h(c, b),
|
|
2305
|
-
class: "caret-wrapper"
|
|
2306
|
-
}, [
|
|
2307
|
-
H("i", {
|
|
2308
|
-
onClick: (c) => h(c, b, "ascending"),
|
|
2309
|
-
class: "sort-caret ascending"
|
|
2310
|
-
}),
|
|
2311
|
-
H("i", {
|
|
2312
|
-
onClick: (c) => h(c, b, "descending"),
|
|
2313
|
-
class: "sort-caret descending"
|
|
2314
|
-
})
|
|
2315
|
-
]),
|
|
2316
|
-
b.filterable && H(ls, {
|
|
2317
|
-
store: m,
|
|
2318
|
-
placement: b.filterPlacement || "bottom-start",
|
|
2319
|
-
column: b,
|
|
2320
|
-
upDataColumn: (c, x) => {
|
|
2321
|
-
b[c] = x;
|
|
2322
|
-
}
|
|
2323
|
-
})
|
|
2324
|
-
])
|
|
2325
|
-
]))))));
|
|
2326
|
-
}
|
|
2327
|
-
});
|
|
2328
|
-
function is(e) {
|
|
2329
|
-
const t = re(pe), l = E(""), n = E(H("div")), { nextZIndex: r } = lo(), a = (f, g, v) => {
|
|
2330
|
-
var y;
|
|
2331
|
-
const b = t, S = at(f);
|
|
2332
|
-
let c;
|
|
2333
|
-
const x = (y = b == null ? void 0 : b.vnode.el) == null ? void 0 : y.dataset.prefix;
|
|
2334
|
-
S && (c = nl({
|
|
2335
|
-
columns: e.store.states.columns.value
|
|
2336
|
-
}, S, x), c && (b == null || b.emit(`cell-${v}`, g, c, S, f))), b == null || b.emit(`row-${v}`, g, c, f);
|
|
2337
|
-
}, i = (f, g) => {
|
|
2338
|
-
a(f, g, "dblclick");
|
|
2339
|
-
}, o = (f, g) => {
|
|
2340
|
-
e.store.commit("setCurrentRow", g), a(f, g, "click");
|
|
2341
|
-
}, s = (f, g) => {
|
|
2342
|
-
a(f, g, "contextmenu");
|
|
2343
|
-
}, u = nt((f) => {
|
|
2344
|
-
e.store.commit("setHoverRow", f);
|
|
2345
|
-
}, 30), d = nt(() => {
|
|
2346
|
-
e.store.commit("setHoverRow", null);
|
|
2347
|
-
}, 30), h = (f) => {
|
|
2348
|
-
const g = window.getComputedStyle(f, null), v = Number.parseInt(g.paddingLeft, 10) || 0, y = Number.parseInt(g.paddingRight, 10) || 0, b = Number.parseInt(g.paddingTop, 10) || 0, S = Number.parseInt(g.paddingBottom, 10) || 0;
|
|
2349
|
-
return {
|
|
2350
|
-
left: v,
|
|
2351
|
-
right: y,
|
|
2352
|
-
top: b,
|
|
2353
|
-
bottom: S
|
|
2354
|
-
};
|
|
2355
|
-
};
|
|
2356
|
-
return {
|
|
2357
|
-
handleDoubleClick: i,
|
|
2358
|
-
handleClick: o,
|
|
2359
|
-
handleContextMenu: s,
|
|
2360
|
-
handleMouseEnter: u,
|
|
2361
|
-
handleMouseLeave: d,
|
|
2362
|
-
handleCellMouseEnter: (f, g, v) => {
|
|
2363
|
-
var y;
|
|
2364
|
-
const b = t, S = at(f), c = (y = b == null ? void 0 : b.vnode.el) == null ? void 0 : y.dataset.prefix;
|
|
2365
|
-
if (S) {
|
|
2366
|
-
const ue = nl({
|
|
2367
|
-
columns: e.store.states.columns.value
|
|
2368
|
-
}, S, c), Q = b.hoverState = { cell: S, column: ue, row: g };
|
|
2369
|
-
b == null || b.emit("cell-mouse-enter", Q.row, Q.column, Q.cell, f);
|
|
2370
|
-
}
|
|
2371
|
-
if (!v)
|
|
2372
|
-
return;
|
|
2373
|
-
const x = f.target.querySelector(".cell");
|
|
2374
|
-
if (!(Ue(x, `${c}-tooltip`) && x.childNodes.length))
|
|
2375
|
-
return;
|
|
2376
|
-
const k = document.createRange();
|
|
2377
|
-
k.setStart(x, 0), k.setEnd(x, x.childNodes.length);
|
|
2378
|
-
let w = k.getBoundingClientRect().width, R = k.getBoundingClientRect().height;
|
|
2379
|
-
w - Math.floor(w) < 1e-3 && (w = Math.floor(w)), R - Math.floor(R) < 1e-3 && (R = Math.floor(R));
|
|
2380
|
-
const { top: B, left: M, right: z, bottom: j } = h(x), X = M + z, _ = B + j;
|
|
2381
|
-
(w + X > x.offsetWidth || R + _ > x.offsetHeight || x.scrollWidth > x.offsetWidth) && zr(t == null ? void 0 : t.refs.tableWrapper, S, S.innerText || S.textContent, r, v);
|
|
2382
|
-
},
|
|
2383
|
-
handleCellMouseLeave: (f) => {
|
|
2384
|
-
if (!at(f))
|
|
2385
|
-
return;
|
|
2386
|
-
const v = t == null ? void 0 : t.hoverState;
|
|
2387
|
-
t == null || t.emit("cell-mouse-leave", v == null ? void 0 : v.row, v == null ? void 0 : v.column, v == null ? void 0 : v.cell, f);
|
|
2388
|
-
},
|
|
2389
|
-
tooltipContent: l,
|
|
2390
|
-
tooltipTrigger: n
|
|
2391
|
-
};
|
|
2392
|
-
}
|
|
2393
|
-
function us(e) {
|
|
2394
|
-
const t = re(pe), l = se("table");
|
|
2395
|
-
return {
|
|
2396
|
-
getRowStyle: (u, d) => {
|
|
2397
|
-
const h = t == null ? void 0 : t.props.rowStyle;
|
|
2398
|
-
return typeof h == "function" ? h.call(null, {
|
|
2399
|
-
row: u,
|
|
2400
|
-
rowIndex: d
|
|
2401
|
-
}) : h || null;
|
|
2402
|
-
},
|
|
2403
|
-
getRowClass: (u, d) => {
|
|
2404
|
-
const h = [l.e("row")];
|
|
2405
|
-
t != null && t.props.highlightCurrentRow && u === e.store.states.currentRow.value && h.push("current-row"), e.stripe && d % 2 === 1 && h.push(l.em("row", "striped"));
|
|
2406
|
-
const p = t == null ? void 0 : t.props.rowClassName;
|
|
2407
|
-
return typeof p == "string" ? h.push(p) : typeof p == "function" && h.push(p.call(null, {
|
|
2408
|
-
row: u,
|
|
2409
|
-
rowIndex: d
|
|
2410
|
-
})), h;
|
|
2411
|
-
},
|
|
2412
|
-
getCellStyle: (u, d, h, p) => {
|
|
2413
|
-
const m = t == null ? void 0 : t.props.cellStyle;
|
|
2414
|
-
let f = m ?? {};
|
|
2415
|
-
typeof m == "function" && (f = m.call(null, {
|
|
2416
|
-
rowIndex: u,
|
|
2417
|
-
columnIndex: d,
|
|
2418
|
-
row: h,
|
|
2419
|
-
column: p
|
|
2420
|
-
}));
|
|
2421
|
-
const g = Ht(d, e == null ? void 0 : e.fixed, e.store);
|
|
2422
|
-
return Te(g, "left"), Te(g, "right"), Object.assign({}, f, g);
|
|
2423
|
-
},
|
|
2424
|
-
getCellClass: (u, d, h, p, m) => {
|
|
2425
|
-
const f = Wt(l.b(), d, e == null ? void 0 : e.fixed, e.store, void 0, m), g = [p.id, p.align, p.className, ...f], v = t == null ? void 0 : t.props.cellClassName;
|
|
2426
|
-
return typeof v == "string" ? g.push(v) : typeof v == "function" && g.push(v.call(null, {
|
|
2427
|
-
rowIndex: u,
|
|
2428
|
-
columnIndex: d,
|
|
2429
|
-
row: h,
|
|
2430
|
-
column: p
|
|
2431
|
-
})), g.push(l.e("cell")), g.filter((y) => !!y).join(" ");
|
|
2432
|
-
},
|
|
2433
|
-
getSpan: (u, d, h, p) => {
|
|
2434
|
-
let m = 1, f = 1;
|
|
2435
|
-
const g = t == null ? void 0 : t.props.spanMethod;
|
|
2436
|
-
if (typeof g == "function") {
|
|
2437
|
-
const v = g({
|
|
2438
|
-
row: u,
|
|
2439
|
-
column: d,
|
|
2440
|
-
rowIndex: h,
|
|
2441
|
-
columnIndex: p
|
|
2442
|
-
});
|
|
2443
|
-
Array.isArray(v) ? (m = v[0], f = v[1]) : typeof v == "object" && (m = v.rowspan, f = v.colspan);
|
|
2444
|
-
}
|
|
2445
|
-
return { rowspan: m, colspan: f };
|
|
2446
|
-
},
|
|
2447
|
-
getColspanRealWidth: (u, d, h) => {
|
|
2448
|
-
if (d < 1)
|
|
2449
|
-
return u[h].realWidth;
|
|
2450
|
-
const p = u.map(({ realWidth: m, width: f }) => m || f).slice(h, h + d);
|
|
2451
|
-
return Number(p.reduce((m, f) => Number(m) + Number(f), -1));
|
|
2452
|
-
}
|
|
2453
|
-
};
|
|
2454
|
-
}
|
|
2455
|
-
function ds(e) {
|
|
2456
|
-
const t = re(pe), l = se("table"), {
|
|
2457
|
-
handleDoubleClick: n,
|
|
2458
|
-
handleClick: r,
|
|
2459
|
-
handleContextMenu: a,
|
|
2460
|
-
handleMouseEnter: i,
|
|
2461
|
-
handleMouseLeave: o,
|
|
2462
|
-
handleCellMouseEnter: s,
|
|
2463
|
-
handleCellMouseLeave: u,
|
|
2464
|
-
tooltipContent: d,
|
|
2465
|
-
tooltipTrigger: h
|
|
2466
|
-
} = is(e), {
|
|
2467
|
-
getRowStyle: p,
|
|
2468
|
-
getRowClass: m,
|
|
2469
|
-
getCellStyle: f,
|
|
2470
|
-
getCellClass: g,
|
|
2471
|
-
getSpan: v,
|
|
2472
|
-
getColspanRealWidth: y
|
|
2473
|
-
} = us(e), b = T(() => e.store.states.columns.value.findIndex(({ type: w }) => w === "default")), S = (w, R) => {
|
|
2474
|
-
const F = t.props.rowKey;
|
|
2475
|
-
return F ? Z(w, F) : R;
|
|
2476
|
-
}, c = (w, R, F, K = !1) => {
|
|
2477
|
-
const { tooltipEffect: B, tooltipOptions: M, store: z } = e, { indent: j, columns: X } = z.states, _ = m(w, R);
|
|
2478
|
-
let ue = !0;
|
|
2479
|
-
return F && (_.push(l.em("row", `level-${F.level}`)), ue = F.display), H("tr", {
|
|
2480
|
-
style: [ue ? null : {
|
|
2481
|
-
display: "none"
|
|
2482
|
-
}, p(w, R)],
|
|
2483
|
-
class: _,
|
|
2484
|
-
key: S(w, R),
|
|
2485
|
-
onDblclick: (C) => n(C, w),
|
|
2486
|
-
onClick: (C) => r(C, w),
|
|
2487
|
-
onContextmenu: (C) => a(C, w),
|
|
2488
|
-
onMouseenter: () => i(R),
|
|
2489
|
-
onMouseleave: o
|
|
2490
|
-
}, X.value.map((C, L) => {
|
|
2491
|
-
const { rowspan: P, colspan: G } = v(w, C, R, L);
|
|
2492
|
-
if (!P || !G)
|
|
2493
|
-
return null;
|
|
2494
|
-
const Y = Object.assign({}, C);
|
|
2495
|
-
Y.realWidth = y(X.value, G, L);
|
|
2496
|
-
const q = {
|
|
2497
|
-
store: e.store,
|
|
2498
|
-
_self: e.context || t,
|
|
2499
|
-
column: Y,
|
|
2500
|
-
row: w,
|
|
2501
|
-
$index: R,
|
|
2502
|
-
cellIndex: L,
|
|
2503
|
-
expanded: K
|
|
2504
|
-
};
|
|
2505
|
-
L === b.value && F && (q.treeNode = {
|
|
2506
|
-
indent: F.level * j.value,
|
|
2507
|
-
level: F.level
|
|
2508
|
-
}, typeof F.expanded == "boolean" && (q.treeNode.expanded = F.expanded, "loading" in F && (q.treeNode.loading = F.loading), "noLazyChildren" in F && (q.treeNode.noLazyChildren = F.noLazyChildren)));
|
|
2509
|
-
const ae = `${R},${L}`, te = Y.columnKey || Y.rawColumnKey || "", me = x(L, C, q), le = C.showOverflowTooltip && Al({
|
|
2510
|
-
effect: B
|
|
2511
|
-
}, M, C.showOverflowTooltip);
|
|
2512
|
-
return H("td", {
|
|
2513
|
-
style: f(R, L, w, C),
|
|
2514
|
-
class: g(R, L, w, C, G - 1),
|
|
2515
|
-
key: `${te}${ae}`,
|
|
2516
|
-
rowspan: P,
|
|
2517
|
-
colspan: G,
|
|
2518
|
-
onMouseenter: (de) => s(de, w, le),
|
|
2519
|
-
onMouseleave: u
|
|
2520
|
-
}, [me]);
|
|
2521
|
-
}));
|
|
2522
|
-
}, x = (w, R, F) => R.renderCell(F);
|
|
2523
|
-
return {
|
|
2524
|
-
wrappedRowRender: (w, R) => {
|
|
2525
|
-
const F = e.store, { isRowExpanded: K, assertRowKey: B } = F, { treeData: M, lazyTreeNodeMap: z, childrenColumnName: j, rowKey: X } = F.states, _ = F.states.columns.value;
|
|
2526
|
-
if (_.some(({ type: Q }) => Q === "expand")) {
|
|
2527
|
-
const Q = K(w), C = c(w, R, void 0, Q), L = t.renderExpanded;
|
|
2528
|
-
return Q ? L ? [
|
|
2529
|
-
[
|
|
2530
|
-
C,
|
|
2531
|
-
H("tr", {
|
|
2532
|
-
key: `expanded-row__${C.key}`
|
|
2533
|
-
}, [
|
|
2534
|
-
H("td", {
|
|
2535
|
-
colspan: _.length,
|
|
2536
|
-
class: `${l.e("cell")} ${l.e("expanded-cell")}`
|
|
2537
|
-
}, [L({ row: w, $index: R, store: F, expanded: Q })])
|
|
2538
|
-
])
|
|
2539
|
-
]
|
|
2540
|
-
] : (console.error("[Element Error]renderExpanded is required."), C) : [[C]];
|
|
2541
|
-
} else if (Object.keys(M.value).length) {
|
|
2542
|
-
B();
|
|
2543
|
-
const Q = Z(w, X.value);
|
|
2544
|
-
let C = M.value[Q], L = null;
|
|
2545
|
-
C && (L = {
|
|
2546
|
-
expanded: C.expanded,
|
|
2547
|
-
level: C.level,
|
|
2548
|
-
display: !0
|
|
2549
|
-
}, typeof C.lazy == "boolean" && (typeof C.loaded == "boolean" && C.loaded && (L.noLazyChildren = !(C.children && C.children.length)), L.loading = C.loading));
|
|
2550
|
-
const P = [c(w, R, L)];
|
|
2551
|
-
if (C) {
|
|
2552
|
-
let G = 0;
|
|
2553
|
-
const Y = (ae, te) => {
|
|
2554
|
-
ae && ae.length && te && ae.forEach((me) => {
|
|
2555
|
-
const le = {
|
|
2556
|
-
display: te.display && te.expanded,
|
|
2557
|
-
level: te.level + 1,
|
|
2558
|
-
expanded: !1,
|
|
2559
|
-
noLazyChildren: !1,
|
|
2560
|
-
loading: !1
|
|
2561
|
-
}, de = Z(me, X.value);
|
|
2562
|
-
if (de == null)
|
|
2563
|
-
throw new Error("For nested data item, row-key is required.");
|
|
2564
|
-
if (C = { ...M.value[de] }, C && (le.expanded = C.expanded, C.level = C.level || le.level, C.display = !!(C.expanded && le.display), typeof C.lazy == "boolean" && (typeof C.loaded == "boolean" && C.loaded && (le.noLazyChildren = !(C.children && C.children.length)), le.loading = C.loading)), G++, P.push(c(me, R + G, le)), C) {
|
|
2565
|
-
const ve = z.value[de] || me[j.value];
|
|
2566
|
-
Y(ve, C);
|
|
2567
|
-
}
|
|
2568
|
-
});
|
|
2569
|
-
};
|
|
2570
|
-
C.display = !0;
|
|
2571
|
-
const q = z.value[Q] || w[j.value];
|
|
2572
|
-
Y(q, C);
|
|
2573
|
-
}
|
|
2574
|
-
return P;
|
|
2575
|
-
} else
|
|
2576
|
-
return c(w, R, void 0);
|
|
2577
|
-
},
|
|
2578
|
-
tooltipContent: d,
|
|
2579
|
-
tooltipTrigger: h
|
|
2580
|
-
};
|
|
2581
|
-
}
|
|
2582
|
-
const cs = {
|
|
2583
|
-
store: {
|
|
2584
|
-
required: !0,
|
|
2585
|
-
type: Object
|
|
2586
|
-
},
|
|
2587
|
-
stripe: Boolean,
|
|
2588
|
-
tooltipEffect: String,
|
|
2589
|
-
tooltipOptions: {
|
|
2590
|
-
type: Object
|
|
2591
|
-
},
|
|
2592
|
-
context: {
|
|
2593
|
-
default: () => ({}),
|
|
2594
|
-
type: Object
|
|
2595
|
-
},
|
|
2596
|
-
rowClassName: [String, Function],
|
|
2597
|
-
rowStyle: [Object, Function],
|
|
2598
|
-
fixed: {
|
|
2599
|
-
type: String,
|
|
2600
|
-
default: ""
|
|
2601
|
-
},
|
|
2602
|
-
highlight: Boolean
|
|
2603
|
-
};
|
|
2604
|
-
var fs = he({
|
|
2605
|
-
name: "ElTableBody",
|
|
2606
|
-
props: cs,
|
|
2607
|
-
setup(e) {
|
|
2608
|
-
const t = ee(), l = re(pe), n = se("table"), { wrappedRowRender: r, tooltipContent: a, tooltipTrigger: i } = ds(e), { onColumnsChange: o, onScrollableChange: s } = Ql(l);
|
|
2609
|
-
return ie(e.store.states.hoverRow, (u, d) => {
|
|
2610
|
-
!e.store.states.isComplex.value || !ze || oo(() => {
|
|
2611
|
-
const h = t == null ? void 0 : t.vnode.el, p = Array.from((h == null ? void 0 : h.children) || []).filter((g) => g == null ? void 0 : g.classList.contains(`${n.e("row")}`)), m = p[d], f = p[u];
|
|
2612
|
-
m && ft(m, "hover-row"), f && Cl(f, "hover-row");
|
|
2613
|
-
});
|
|
2614
|
-
}), Rt(() => {
|
|
2615
|
-
var u;
|
|
2616
|
-
(u = be) == null || u();
|
|
2617
|
-
}), {
|
|
2618
|
-
ns: n,
|
|
2619
|
-
onColumnsChange: o,
|
|
2620
|
-
onScrollableChange: s,
|
|
2621
|
-
wrappedRowRender: r,
|
|
2622
|
-
tooltipContent: a,
|
|
2623
|
-
tooltipTrigger: i
|
|
2624
|
-
};
|
|
2625
|
-
},
|
|
2626
|
-
render() {
|
|
2627
|
-
const { wrappedRowRender: e, store: t } = this, l = t.states.data.value || [];
|
|
2628
|
-
return H("tbody", { tabIndex: -1 }, [
|
|
2629
|
-
l.reduce((n, r) => n.concat(e(r, n.length)), [])
|
|
2630
|
-
]);
|
|
2631
|
-
}
|
|
2632
|
-
});
|
|
2633
|
-
function $t(e) {
|
|
2634
|
-
const t = e.tableLayout === "auto";
|
|
2635
|
-
let l = e.columns || [];
|
|
2636
|
-
t && l.every((r) => r.width === void 0) && (l = []);
|
|
2637
|
-
const n = (r) => {
|
|
2638
|
-
const a = {
|
|
2639
|
-
key: `${e.tableLayout}_${r.id}`,
|
|
2640
|
-
style: {},
|
|
2641
|
-
name: void 0
|
|
2642
|
-
};
|
|
2643
|
-
return t ? a.style = {
|
|
2644
|
-
width: `${r.width}px`
|
|
2645
|
-
} : a.name = r.id, a;
|
|
2646
|
-
};
|
|
2647
|
-
return H("colgroup", {}, l.map((r) => H("col", n(r))));
|
|
2648
|
-
}
|
|
2649
|
-
$t.props = ["columns", "tableLayout"];
|
|
2650
|
-
function hs() {
|
|
2651
|
-
const e = re(pe), t = e == null ? void 0 : e.store, l = T(() => t.states.fixedLeafColumnsLength.value), n = T(() => t.states.rightFixedColumns.value.length), r = T(() => t.states.columns.value.length), a = T(() => t.states.fixedColumns.value.length), i = T(() => t.states.rightFixedColumns.value.length);
|
|
2652
|
-
return {
|
|
2653
|
-
leftFixedLeafCount: l,
|
|
2654
|
-
rightFixedLeafCount: n,
|
|
2655
|
-
columnsCount: r,
|
|
2656
|
-
leftFixedCount: a,
|
|
2657
|
-
rightFixedCount: i,
|
|
2658
|
-
columns: t.states.columns
|
|
2659
|
-
};
|
|
2660
|
-
}
|
|
2661
|
-
function vs(e) {
|
|
2662
|
-
const { columns: t } = hs(), l = se("table");
|
|
2663
|
-
return {
|
|
2664
|
-
getCellClasses: (a, i) => {
|
|
2665
|
-
const o = a[i], s = [
|
|
2666
|
-
l.e("cell"),
|
|
2667
|
-
o.id,
|
|
2668
|
-
o.align,
|
|
2669
|
-
o.labelClassName,
|
|
2670
|
-
...Wt(l.b(), i, o.fixed, e.store)
|
|
2671
|
-
];
|
|
2672
|
-
return o.className && s.push(o.className), o.children || s.push(l.is("leaf")), s;
|
|
2673
|
-
},
|
|
2674
|
-
getCellStyles: (a, i) => {
|
|
2675
|
-
const o = Ht(i, a.fixed, e.store);
|
|
2676
|
-
return Te(o, "left"), Te(o, "right"), o;
|
|
2677
|
-
},
|
|
2678
|
-
columns: t
|
|
2679
|
-
};
|
|
2680
|
-
}
|
|
2681
|
-
var ps = he({
|
|
2682
|
-
name: "ElTableFooter",
|
|
2683
|
-
props: {
|
|
2684
|
-
fixed: {
|
|
2685
|
-
type: String,
|
|
2686
|
-
default: ""
|
|
2687
|
-
},
|
|
2688
|
-
store: {
|
|
2689
|
-
required: !0,
|
|
2690
|
-
type: Object
|
|
2691
|
-
},
|
|
2692
|
-
summaryMethod: Function,
|
|
2693
|
-
sumText: String,
|
|
2694
|
-
border: Boolean,
|
|
2695
|
-
defaultSort: {
|
|
2696
|
-
type: Object,
|
|
2697
|
-
default: () => ({
|
|
2698
|
-
prop: "",
|
|
2699
|
-
order: ""
|
|
2700
|
-
})
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
setup(e) {
|
|
2704
|
-
const { getCellClasses: t, getCellStyles: l, columns: n } = vs(e);
|
|
2705
|
-
return {
|
|
2706
|
-
ns: se("table"),
|
|
2707
|
-
getCellClasses: t,
|
|
2708
|
-
getCellStyles: l,
|
|
2709
|
-
columns: n
|
|
2710
|
-
};
|
|
2711
|
-
},
|
|
2712
|
-
render() {
|
|
2713
|
-
const {
|
|
2714
|
-
columns: e,
|
|
2715
|
-
getCellStyles: t,
|
|
2716
|
-
getCellClasses: l,
|
|
2717
|
-
summaryMethod: n,
|
|
2718
|
-
sumText: r,
|
|
2719
|
-
ns: a
|
|
2720
|
-
} = this, i = this.store.states.data.value;
|
|
2721
|
-
let o = [];
|
|
2722
|
-
return n ? o = n({
|
|
2723
|
-
columns: e,
|
|
2724
|
-
data: i
|
|
2725
|
-
}) : e.forEach((s, u) => {
|
|
2726
|
-
if (u === 0) {
|
|
2727
|
-
o[u] = r;
|
|
2728
|
-
return;
|
|
2729
|
-
}
|
|
2730
|
-
const d = i.map((f) => Number(f[s.property])), h = [];
|
|
2731
|
-
let p = !0;
|
|
2732
|
-
d.forEach((f) => {
|
|
2733
|
-
if (!Number.isNaN(+f)) {
|
|
2734
|
-
p = !1;
|
|
2735
|
-
const g = `${f}`.split(".")[1];
|
|
2736
|
-
h.push(g ? g.length : 0);
|
|
2737
|
-
}
|
|
2738
|
-
});
|
|
2739
|
-
const m = Math.max.apply(null, h);
|
|
2740
|
-
p ? o[u] = "" : o[u] = d.reduce((f, g) => {
|
|
2741
|
-
const v = Number(g);
|
|
2742
|
-
return Number.isNaN(+v) ? f : Number.parseFloat((f + g).toFixed(Math.min(m, 20)));
|
|
2743
|
-
}, 0);
|
|
2744
|
-
}), H("table", {
|
|
2745
|
-
class: a.e("footer"),
|
|
2746
|
-
cellspacing: "0",
|
|
2747
|
-
cellpadding: "0",
|
|
2748
|
-
border: "0"
|
|
2749
|
-
}, [
|
|
2750
|
-
$t({
|
|
2751
|
-
columns: e
|
|
2752
|
-
}),
|
|
2753
|
-
H("tbody", [
|
|
2754
|
-
H("tr", {}, [
|
|
2755
|
-
...e.map((s, u) => H("td", {
|
|
2756
|
-
key: u,
|
|
2757
|
-
colspan: s.colSpan,
|
|
2758
|
-
rowspan: s.rowSpan,
|
|
2759
|
-
class: l(e, u),
|
|
2760
|
-
style: t(s, u)
|
|
2761
|
-
}, [
|
|
2762
|
-
H("div", {
|
|
2763
|
-
class: ["cell", s.labelClassName]
|
|
2764
|
-
}, [o[u]])
|
|
2765
|
-
]))
|
|
2766
|
-
])
|
|
2767
|
-
])
|
|
2768
|
-
]);
|
|
2769
|
-
}
|
|
2770
|
-
});
|
|
2771
|
-
function ms(e) {
|
|
2772
|
-
return {
|
|
2773
|
-
setCurrentRow: (d) => {
|
|
2774
|
-
e.commit("setCurrentRow", d);
|
|
2775
|
-
},
|
|
2776
|
-
getSelectionRows: () => e.getSelectionRows(),
|
|
2777
|
-
toggleRowSelection: (d, h) => {
|
|
2778
|
-
e.toggleRowSelection(d, h, !1), e.updateAllSelected();
|
|
2779
|
-
},
|
|
2780
|
-
clearSelection: () => {
|
|
2781
|
-
e.clearSelection();
|
|
2782
|
-
},
|
|
2783
|
-
clearFilter: (d) => {
|
|
2784
|
-
e.clearFilter(d);
|
|
2785
|
-
},
|
|
2786
|
-
toggleAllSelection: () => {
|
|
2787
|
-
e.commit("toggleAllSelection");
|
|
2788
|
-
},
|
|
2789
|
-
toggleRowExpansion: (d, h) => {
|
|
2790
|
-
e.toggleRowExpansionAdapter(d, h);
|
|
2791
|
-
},
|
|
2792
|
-
clearSort: () => {
|
|
2793
|
-
e.clearSort();
|
|
2794
|
-
},
|
|
2795
|
-
sort: (d, h) => {
|
|
2796
|
-
e.commit("sort", { prop: d, order: h });
|
|
2797
|
-
}
|
|
2798
|
-
};
|
|
2799
|
-
}
|
|
2800
|
-
function gs(e, t, l, n) {
|
|
2801
|
-
const r = E(!1), a = E(null), i = E(!1), o = (C) => {
|
|
2802
|
-
i.value = C;
|
|
2803
|
-
}, s = E({
|
|
2804
|
-
width: null,
|
|
2805
|
-
height: null,
|
|
2806
|
-
headerHeight: null
|
|
2807
|
-
}), u = E(!1), d = {
|
|
2808
|
-
display: "inline-block",
|
|
2809
|
-
verticalAlign: "middle"
|
|
2810
|
-
}, h = E(), p = E(0), m = E(0), f = E(0), g = E(0), v = E(0);
|
|
2811
|
-
He(() => {
|
|
2812
|
-
t.setHeight(e.height);
|
|
2813
|
-
}), He(() => {
|
|
2814
|
-
t.setMaxHeight(e.maxHeight);
|
|
2815
|
-
}), ie(() => [e.currentRowKey, l.states.rowKey], ([C, L]) => {
|
|
2816
|
-
!O(L) || !O(C) || l.setCurrentRowKey(`${C}`);
|
|
2817
|
-
}, {
|
|
2818
|
-
immediate: !0
|
|
2819
|
-
}), ie(() => e.data, (C) => {
|
|
2820
|
-
n.store.commit("setData", C);
|
|
2821
|
-
}, {
|
|
2822
|
-
immediate: !0,
|
|
2823
|
-
deep: !0
|
|
2824
|
-
}), He(() => {
|
|
2825
|
-
e.expandRowKeys && l.setExpandRowKeysAdapter(e.expandRowKeys);
|
|
2826
|
-
});
|
|
2827
|
-
const y = () => {
|
|
2828
|
-
n.store.commit("setHoverRow", null), n.hoverState && (n.hoverState = null);
|
|
2829
|
-
}, b = (C, L) => {
|
|
2830
|
-
const { pixelX: P, pixelY: G } = L;
|
|
2831
|
-
Math.abs(P) >= Math.abs(G) && (n.refs.bodyWrapper.scrollLeft += L.pixelX / 5);
|
|
2832
|
-
}, S = T(() => e.height || e.maxHeight || l.states.fixedColumns.value.length > 0 || l.states.rightFixedColumns.value.length > 0), c = T(() => ({
|
|
2833
|
-
width: t.bodyWidth.value ? `${t.bodyWidth.value}px` : ""
|
|
2834
|
-
})), x = () => {
|
|
2835
|
-
S.value && t.updateElsHeight(), t.updateColumnsWidth(), requestAnimationFrame(F);
|
|
2836
|
-
};
|
|
2837
|
-
Ke(async () => {
|
|
2838
|
-
await Ee(), l.updateColumns(), K(), requestAnimationFrame(x);
|
|
2839
|
-
const C = n.vnode.el, L = n.refs.headerWrapper;
|
|
2840
|
-
e.flexible && C && C.parentElement && (C.parentElement.style.minWidth = "0"), s.value = {
|
|
2841
|
-
width: h.value = C.offsetWidth,
|
|
2842
|
-
height: C.offsetHeight,
|
|
2843
|
-
headerHeight: e.showHeader && L ? L.offsetHeight : null
|
|
2844
|
-
}, l.states.columns.value.forEach((P) => {
|
|
2845
|
-
P.filteredValue && P.filteredValue.length && n.store.commit("filterChange", {
|
|
2846
|
-
column: P,
|
|
2847
|
-
values: P.filteredValue,
|
|
2848
|
-
silent: !0
|
|
2849
|
-
});
|
|
2850
|
-
}), n.$ready = !0;
|
|
2851
|
-
});
|
|
2852
|
-
const k = (C, L) => {
|
|
2853
|
-
if (!C)
|
|
2854
|
-
return;
|
|
2855
|
-
const P = Array.from(C.classList).filter((G) => !G.startsWith("is-scrolling-"));
|
|
2856
|
-
P.push(t.scrollX.value ? L : "is-scrolling-none"), C.className = P.join(" ");
|
|
2857
|
-
}, w = (C) => {
|
|
2858
|
-
const { tableWrapper: L } = n.refs;
|
|
2859
|
-
k(L, C);
|
|
2860
|
-
}, R = (C) => {
|
|
2861
|
-
const { tableWrapper: L } = n.refs;
|
|
2862
|
-
return !!(L && L.classList.contains(C));
|
|
2863
|
-
}, F = function() {
|
|
2864
|
-
if (!n.refs.scrollBarRef)
|
|
2865
|
-
return;
|
|
2866
|
-
if (!t.scrollX.value) {
|
|
2867
|
-
const te = "is-scrolling-none";
|
|
2868
|
-
R(te) || w(te);
|
|
2869
|
-
return;
|
|
2870
|
-
}
|
|
2871
|
-
const C = n.refs.scrollBarRef.wrapRef;
|
|
2872
|
-
if (!C)
|
|
2873
|
-
return;
|
|
2874
|
-
const { scrollLeft: L, offsetWidth: P, scrollWidth: G } = C, { headerWrapper: Y, footerWrapper: q } = n.refs;
|
|
2875
|
-
Y && (Y.scrollLeft = L), q && (q.scrollLeft = L);
|
|
2876
|
-
const ae = G - P - 1;
|
|
2877
|
-
L >= ae ? w("is-scrolling-right") : w(L === 0 ? "is-scrolling-left" : "is-scrolling-middle");
|
|
2878
|
-
}, K = () => {
|
|
2879
|
-
n.refs.scrollBarRef && (n.refs.scrollBarRef.wrapRef && Gt(n.refs.scrollBarRef.wrapRef, "scroll", F, {
|
|
2880
|
-
passive: !0
|
|
2881
|
-
}), e.fit ? Ut(n.vnode.el, B) : Gt(window, "resize", B), Ut(n.refs.bodyWrapper, () => {
|
|
2882
|
-
var C, L;
|
|
2883
|
-
B(), (L = (C = n.refs) == null ? void 0 : C.scrollBarRef) == null || L.update();
|
|
2884
|
-
}));
|
|
2885
|
-
}, B = () => {
|
|
2886
|
-
var C, L, P, G;
|
|
2887
|
-
const Y = n.vnode.el;
|
|
2888
|
-
if (!n.$ready || !Y)
|
|
2889
|
-
return;
|
|
2890
|
-
let q = !1;
|
|
2891
|
-
const {
|
|
2892
|
-
width: ae,
|
|
2893
|
-
height: te,
|
|
2894
|
-
headerHeight: me
|
|
2895
|
-
} = s.value, le = h.value = Y.offsetWidth;
|
|
2896
|
-
ae !== le && (q = !0);
|
|
2897
|
-
const de = Y.offsetHeight;
|
|
2898
|
-
(e.height || S.value) && te !== de && (q = !0);
|
|
2899
|
-
const ve = e.tableLayout === "fixed" ? n.refs.headerWrapper : (C = n.refs.tableHeaderRef) == null ? void 0 : C.$el;
|
|
2900
|
-
e.showHeader && (ve == null ? void 0 : ve.offsetHeight) !== me && (q = !0), p.value = ((L = n.refs.tableWrapper) == null ? void 0 : L.scrollHeight) || 0, f.value = (ve == null ? void 0 : ve.scrollHeight) || 0, g.value = ((P = n.refs.footerWrapper) == null ? void 0 : P.offsetHeight) || 0, v.value = ((G = n.refs.appendWrapper) == null ? void 0 : G.offsetHeight) || 0, m.value = p.value - f.value - g.value - v.value, q && (s.value = {
|
|
2901
|
-
width: le,
|
|
2902
|
-
height: de,
|
|
2903
|
-
headerHeight: e.showHeader && (ve == null ? void 0 : ve.offsetHeight) || 0
|
|
2904
|
-
}, x());
|
|
2905
|
-
}, M = ht(), z = T(() => {
|
|
2906
|
-
const { bodyWidth: C, scrollY: L, gutterWidth: P } = t;
|
|
2907
|
-
return C.value ? `${C.value - (L.value ? P : 0)}px` : "";
|
|
2908
|
-
}), j = T(() => e.maxHeight ? "fixed" : e.tableLayout), X = T(() => {
|
|
2909
|
-
if (e.data && e.data.length)
|
|
2910
|
-
return null;
|
|
2911
|
-
let C = "100%";
|
|
2912
|
-
e.height && m.value && (C = `${m.value}px`);
|
|
2913
|
-
const L = h.value;
|
|
2914
|
-
return {
|
|
2915
|
-
width: L ? `${L}px` : "",
|
|
2916
|
-
height: C
|
|
2917
|
-
};
|
|
2918
|
-
}), _ = T(() => e.height ? {
|
|
2919
|
-
height: Number.isNaN(Number(e.height)) ? e.height : `${e.height}px`
|
|
2920
|
-
} : e.maxHeight ? {
|
|
2921
|
-
maxHeight: Number.isNaN(Number(e.maxHeight)) ? e.maxHeight : `${e.maxHeight}px`
|
|
2922
|
-
} : {}), ue = T(() => e.height ? {
|
|
2923
|
-
height: "100%"
|
|
2924
|
-
} : e.maxHeight ? Number.isNaN(Number(e.maxHeight)) ? {
|
|
2925
|
-
maxHeight: `calc(${e.maxHeight} - ${f.value + g.value}px)`
|
|
2926
|
-
} : {
|
|
2927
|
-
maxHeight: `${e.maxHeight - f.value - g.value}px`
|
|
2928
|
-
} : {});
|
|
2929
|
-
return {
|
|
2930
|
-
isHidden: r,
|
|
2931
|
-
renderExpanded: a,
|
|
2932
|
-
setDragVisible: o,
|
|
2933
|
-
isGroup: u,
|
|
2934
|
-
handleMouseLeave: y,
|
|
2935
|
-
handleHeaderFooterMousewheel: b,
|
|
2936
|
-
tableSize: M,
|
|
2937
|
-
emptyBlockStyle: X,
|
|
2938
|
-
handleFixedMousewheel: (C, L) => {
|
|
2939
|
-
const P = n.refs.bodyWrapper;
|
|
2940
|
-
if (Math.abs(L.spinY) > 0) {
|
|
2941
|
-
const G = P.scrollTop;
|
|
2942
|
-
L.pixelY < 0 && G !== 0 && C.preventDefault(), L.pixelY > 0 && P.scrollHeight - P.clientHeight > G && C.preventDefault(), P.scrollTop += Math.ceil(L.pixelY / 5);
|
|
2943
|
-
} else
|
|
2944
|
-
P.scrollLeft += Math.ceil(L.pixelX / 5);
|
|
2945
|
-
},
|
|
2946
|
-
resizeProxyVisible: i,
|
|
2947
|
-
bodyWidth: z,
|
|
2948
|
-
resizeState: s,
|
|
2949
|
-
doLayout: x,
|
|
2950
|
-
tableBodyStyles: c,
|
|
2951
|
-
tableLayout: j,
|
|
2952
|
-
scrollbarViewStyle: d,
|
|
2953
|
-
tableInnerStyle: _,
|
|
2954
|
-
scrollbarStyle: ue
|
|
2955
|
-
};
|
|
2956
|
-
}
|
|
2957
|
-
function bs(e) {
|
|
2958
|
-
const t = E(), l = () => {
|
|
2959
|
-
const r = e.vnode.el.querySelector(".hidden-columns"), a = { childList: !0, subtree: !0 }, i = e.store.states.updateOrderFns;
|
|
2960
|
-
t.value = new MutationObserver(() => {
|
|
2961
|
-
i.forEach((o) => o());
|
|
2962
|
-
}), t.value.observe(r, a);
|
|
2963
|
-
};
|
|
2964
|
-
Ke(() => {
|
|
2965
|
-
l();
|
|
2966
|
-
}), Rt(() => {
|
|
2967
|
-
var n;
|
|
2968
|
-
(n = t.value) == null || n.disconnect();
|
|
2969
|
-
});
|
|
2970
|
-
}
|
|
2971
|
-
var ys = {
|
|
2972
|
-
data: {
|
|
2973
|
-
type: Array,
|
|
2974
|
-
default: () => []
|
|
2975
|
-
},
|
|
2976
|
-
size: Ot,
|
|
2977
|
-
width: [String, Number],
|
|
2978
|
-
height: [String, Number],
|
|
2979
|
-
maxHeight: [String, Number],
|
|
2980
|
-
fit: {
|
|
2981
|
-
type: Boolean,
|
|
2982
|
-
default: !0
|
|
2983
|
-
},
|
|
2984
|
-
stripe: Boolean,
|
|
2985
|
-
border: Boolean,
|
|
2986
|
-
rowKey: [String, Function],
|
|
2987
|
-
showHeader: {
|
|
2988
|
-
type: Boolean,
|
|
2989
|
-
default: !0
|
|
2990
|
-
},
|
|
2991
|
-
showSummary: Boolean,
|
|
2992
|
-
sumText: String,
|
|
2993
|
-
summaryMethod: Function,
|
|
2994
|
-
rowClassName: [String, Function],
|
|
2995
|
-
rowStyle: [Object, Function],
|
|
2996
|
-
cellClassName: [String, Function],
|
|
2997
|
-
cellStyle: [Object, Function],
|
|
2998
|
-
headerRowClassName: [String, Function],
|
|
2999
|
-
headerRowStyle: [Object, Function],
|
|
3000
|
-
headerCellClassName: [String, Function],
|
|
3001
|
-
headerCellStyle: [Object, Function],
|
|
3002
|
-
highlightCurrentRow: Boolean,
|
|
3003
|
-
currentRowKey: [String, Number],
|
|
3004
|
-
emptyText: String,
|
|
3005
|
-
expandRowKeys: Array,
|
|
3006
|
-
defaultExpandAll: Boolean,
|
|
3007
|
-
defaultSort: Object,
|
|
3008
|
-
tooltipEffect: String,
|
|
3009
|
-
tooltipOptions: Object,
|
|
3010
|
-
spanMethod: Function,
|
|
3011
|
-
selectOnIndeterminate: {
|
|
3012
|
-
type: Boolean,
|
|
3013
|
-
default: !0
|
|
3014
|
-
},
|
|
3015
|
-
indent: {
|
|
3016
|
-
type: Number,
|
|
3017
|
-
default: 16
|
|
3018
|
-
},
|
|
3019
|
-
treeProps: {
|
|
3020
|
-
type: Object,
|
|
3021
|
-
default: () => ({
|
|
3022
|
-
hasChildren: "hasChildren",
|
|
3023
|
-
children: "children"
|
|
3024
|
-
})
|
|
3025
|
-
},
|
|
3026
|
-
lazy: Boolean,
|
|
3027
|
-
load: Function,
|
|
3028
|
-
style: {
|
|
3029
|
-
type: Object,
|
|
3030
|
-
default: () => ({})
|
|
3031
|
-
},
|
|
3032
|
-
className: {
|
|
3033
|
-
type: String,
|
|
3034
|
-
default: ""
|
|
3035
|
-
},
|
|
3036
|
-
tableLayout: {
|
|
3037
|
-
type: String,
|
|
3038
|
-
default: "fixed"
|
|
3039
|
-
},
|
|
3040
|
-
scrollbarAlwaysOn: {
|
|
3041
|
-
type: Boolean,
|
|
3042
|
-
default: !1
|
|
3043
|
-
},
|
|
3044
|
-
flexible: Boolean,
|
|
3045
|
-
showOverflowTooltip: [Boolean, Object]
|
|
3046
|
-
};
|
|
3047
|
-
const Cs = () => {
|
|
3048
|
-
const e = E(), t = (a, i) => {
|
|
3049
|
-
const o = e.value;
|
|
3050
|
-
o && o.scrollTo(a, i);
|
|
3051
|
-
}, l = (a, i) => {
|
|
3052
|
-
const o = e.value;
|
|
3053
|
-
o && dt(i) && ["Top", "Left"].includes(a) && o[`setScroll${a}`](i);
|
|
3054
|
-
};
|
|
3055
|
-
return {
|
|
3056
|
-
scrollBarRef: e,
|
|
3057
|
-
scrollTo: t,
|
|
3058
|
-
setScrollTop: (a) => l("Top", a),
|
|
3059
|
-
setScrollLeft: (a) => l("Left", a)
|
|
3060
|
-
};
|
|
3061
|
-
};
|
|
3062
|
-
let ws = 1;
|
|
3063
|
-
const Ss = he({
|
|
3064
|
-
name: "ElTable",
|
|
3065
|
-
directives: {
|
|
3066
|
-
Mousewheel: dr
|
|
3067
|
-
},
|
|
3068
|
-
components: {
|
|
3069
|
-
TableHeader: as,
|
|
3070
|
-
TableBody: fs,
|
|
3071
|
-
TableFooter: ps,
|
|
3072
|
-
ElScrollbar: pl,
|
|
3073
|
-
hColgroup: $t
|
|
3074
|
-
},
|
|
3075
|
-
props: ys,
|
|
3076
|
-
emits: [
|
|
3077
|
-
"select",
|
|
3078
|
-
"select-all",
|
|
3079
|
-
"selection-change",
|
|
3080
|
-
"cell-mouse-enter",
|
|
3081
|
-
"cell-mouse-leave",
|
|
3082
|
-
"cell-contextmenu",
|
|
3083
|
-
"cell-click",
|
|
3084
|
-
"cell-dblclick",
|
|
3085
|
-
"row-click",
|
|
3086
|
-
"row-contextmenu",
|
|
3087
|
-
"row-dblclick",
|
|
3088
|
-
"header-click",
|
|
3089
|
-
"header-contextmenu",
|
|
3090
|
-
"sort-change",
|
|
3091
|
-
"filter-change",
|
|
3092
|
-
"current-change",
|
|
3093
|
-
"header-dragend",
|
|
3094
|
-
"expand-change"
|
|
3095
|
-
],
|
|
3096
|
-
setup(e) {
|
|
3097
|
-
const { t } = yl(), l = se("table"), n = ee();
|
|
3098
|
-
ul(pe, n);
|
|
3099
|
-
const r = Yr(n, e);
|
|
3100
|
-
n.store = r;
|
|
3101
|
-
const a = new Xr({
|
|
3102
|
-
store: n.store,
|
|
3103
|
-
table: n,
|
|
3104
|
-
fit: e.fit,
|
|
3105
|
-
showHeader: e.showHeader
|
|
3106
|
-
});
|
|
3107
|
-
n.layout = a;
|
|
3108
|
-
const i = T(() => (r.states.data.value || []).length === 0), {
|
|
3109
|
-
setCurrentRow: o,
|
|
3110
|
-
getSelectionRows: s,
|
|
3111
|
-
toggleRowSelection: u,
|
|
3112
|
-
clearSelection: d,
|
|
3113
|
-
clearFilter: h,
|
|
3114
|
-
toggleAllSelection: p,
|
|
3115
|
-
toggleRowExpansion: m,
|
|
3116
|
-
clearSort: f,
|
|
3117
|
-
sort: g
|
|
3118
|
-
} = ms(r), {
|
|
3119
|
-
isHidden: v,
|
|
3120
|
-
renderExpanded: y,
|
|
3121
|
-
setDragVisible: b,
|
|
3122
|
-
isGroup: S,
|
|
3123
|
-
handleMouseLeave: c,
|
|
3124
|
-
handleHeaderFooterMousewheel: x,
|
|
3125
|
-
tableSize: k,
|
|
3126
|
-
emptyBlockStyle: w,
|
|
3127
|
-
handleFixedMousewheel: R,
|
|
3128
|
-
resizeProxyVisible: F,
|
|
3129
|
-
bodyWidth: K,
|
|
3130
|
-
resizeState: B,
|
|
3131
|
-
doLayout: M,
|
|
3132
|
-
tableBodyStyles: z,
|
|
3133
|
-
tableLayout: j,
|
|
3134
|
-
scrollbarViewStyle: X,
|
|
3135
|
-
tableInnerStyle: _,
|
|
3136
|
-
scrollbarStyle: ue
|
|
3137
|
-
} = gs(e, a, r, n), { scrollBarRef: Q, scrollTo: C, setScrollLeft: L, setScrollTop: P } = Cs(), G = nt(M, 50), Y = `${l.namespace.value}-table_${ws++}`;
|
|
3138
|
-
n.tableId = Y, n.state = {
|
|
3139
|
-
isGroup: S,
|
|
3140
|
-
resizeState: B,
|
|
3141
|
-
doLayout: M,
|
|
3142
|
-
debouncedUpdateLayout: G
|
|
3143
|
-
};
|
|
3144
|
-
const q = T(() => e.sumText || t("el.table.sumText")), ae = T(() => e.emptyText || t("el.table.emptyText"));
|
|
3145
|
-
return bs(n), {
|
|
3146
|
-
ns: l,
|
|
3147
|
-
layout: a,
|
|
3148
|
-
store: r,
|
|
3149
|
-
handleHeaderFooterMousewheel: x,
|
|
3150
|
-
handleMouseLeave: c,
|
|
3151
|
-
tableId: Y,
|
|
3152
|
-
tableSize: k,
|
|
3153
|
-
isHidden: v,
|
|
3154
|
-
isEmpty: i,
|
|
3155
|
-
renderExpanded: y,
|
|
3156
|
-
resizeProxyVisible: F,
|
|
3157
|
-
resizeState: B,
|
|
3158
|
-
isGroup: S,
|
|
3159
|
-
bodyWidth: K,
|
|
3160
|
-
tableBodyStyles: z,
|
|
3161
|
-
emptyBlockStyle: w,
|
|
3162
|
-
debouncedUpdateLayout: G,
|
|
3163
|
-
handleFixedMousewheel: R,
|
|
3164
|
-
setCurrentRow: o,
|
|
3165
|
-
getSelectionRows: s,
|
|
3166
|
-
toggleRowSelection: u,
|
|
3167
|
-
clearSelection: d,
|
|
3168
|
-
clearFilter: h,
|
|
3169
|
-
toggleAllSelection: p,
|
|
3170
|
-
toggleRowExpansion: m,
|
|
3171
|
-
clearSort: f,
|
|
3172
|
-
doLayout: M,
|
|
3173
|
-
sort: g,
|
|
3174
|
-
t,
|
|
3175
|
-
setDragVisible: b,
|
|
3176
|
-
context: n,
|
|
3177
|
-
computedSumText: q,
|
|
3178
|
-
computedEmptyText: ae,
|
|
3179
|
-
tableLayout: j,
|
|
3180
|
-
scrollbarViewStyle: X,
|
|
3181
|
-
tableInnerStyle: _,
|
|
3182
|
-
scrollbarStyle: ue,
|
|
3183
|
-
scrollBarRef: Q,
|
|
3184
|
-
scrollTo: C,
|
|
3185
|
-
setScrollLeft: L,
|
|
3186
|
-
setScrollTop: P
|
|
3187
|
-
};
|
|
3188
|
-
}
|
|
3189
|
-
}), xs = ["data-prefix"], Es = {
|
|
3190
|
-
ref: "hiddenColumns",
|
|
3191
|
-
class: "hidden-columns"
|
|
3192
|
-
};
|
|
3193
|
-
function ks(e, t, l, n, r, a) {
|
|
3194
|
-
const i = fe("hColgroup"), o = fe("table-header"), s = fe("table-body"), u = fe("el-scrollbar"), d = fe("table-footer"), h = cl("mousewheel");
|
|
3195
|
-
return D(), U("div", {
|
|
3196
|
-
ref: "tableWrapper",
|
|
3197
|
-
class: I([
|
|
3198
|
-
{
|
|
3199
|
-
[e.ns.m("fit")]: e.fit,
|
|
3200
|
-
[e.ns.m("striped")]: e.stripe,
|
|
3201
|
-
[e.ns.m("border")]: e.border || e.isGroup,
|
|
3202
|
-
[e.ns.m("hidden")]: e.isHidden,
|
|
3203
|
-
[e.ns.m("group")]: e.isGroup,
|
|
3204
|
-
[e.ns.m("fluid-height")]: e.maxHeight,
|
|
3205
|
-
[e.ns.m("scrollable-x")]: e.layout.scrollX.value,
|
|
3206
|
-
[e.ns.m("scrollable-y")]: e.layout.scrollY.value,
|
|
3207
|
-
[e.ns.m("enable-row-hover")]: !e.store.states.isComplex.value,
|
|
3208
|
-
[e.ns.m("enable-row-transition")]: (e.store.states.data.value || []).length !== 0 && (e.store.states.data.value || []).length < 100,
|
|
3209
|
-
"has-footer": e.showSummary
|
|
3210
|
-
},
|
|
3211
|
-
e.ns.m(e.tableSize),
|
|
3212
|
-
e.className,
|
|
3213
|
-
e.ns.b(),
|
|
3214
|
-
e.ns.m(`layout-${e.tableLayout}`)
|
|
3215
|
-
]),
|
|
3216
|
-
style: ke(e.style),
|
|
3217
|
-
"data-prefix": e.ns.namespace.value,
|
|
3218
|
-
onMouseleave: t[0] || (t[0] = (...p) => e.handleMouseLeave && e.handleMouseLeave(...p))
|
|
3219
|
-
}, [
|
|
3220
|
-
oe("div", {
|
|
3221
|
-
class: I(e.ns.e("inner-wrapper")),
|
|
3222
|
-
style: ke(e.tableInnerStyle)
|
|
3223
|
-
}, [
|
|
3224
|
-
oe("div", Es, [
|
|
3225
|
-
Fe(e.$slots, "default")
|
|
3226
|
-
], 512),
|
|
3227
|
-
e.showHeader && e.tableLayout === "fixed" ? xe((D(), U("div", {
|
|
3228
|
-
key: 0,
|
|
3229
|
-
ref: "headerWrapper",
|
|
3230
|
-
class: I(e.ns.e("header-wrapper"))
|
|
3231
|
-
}, [
|
|
3232
|
-
oe("table", {
|
|
3233
|
-
ref: "tableHeader",
|
|
3234
|
-
class: I(e.ns.e("header")),
|
|
3235
|
-
style: ke(e.tableBodyStyles),
|
|
3236
|
-
border: "0",
|
|
3237
|
-
cellpadding: "0",
|
|
3238
|
-
cellspacing: "0"
|
|
3239
|
-
}, [
|
|
3240
|
-
we(i, {
|
|
3241
|
-
columns: e.store.states.columns.value,
|
|
3242
|
-
"table-layout": e.tableLayout
|
|
3243
|
-
}, null, 8, ["columns", "table-layout"]),
|
|
3244
|
-
we(o, {
|
|
3245
|
-
ref: "tableHeaderRef",
|
|
3246
|
-
border: e.border,
|
|
3247
|
-
"default-sort": e.defaultSort,
|
|
3248
|
-
store: e.store,
|
|
3249
|
-
onSetDragVisible: e.setDragVisible
|
|
3250
|
-
}, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])
|
|
3251
|
-
], 6)
|
|
3252
|
-
], 2)), [
|
|
3253
|
-
[h, e.handleHeaderFooterMousewheel]
|
|
3254
|
-
]) : Ce("v-if", !0),
|
|
3255
|
-
oe("div", {
|
|
3256
|
-
ref: "bodyWrapper",
|
|
3257
|
-
class: I(e.ns.e("body-wrapper"))
|
|
3258
|
-
}, [
|
|
3259
|
-
we(u, {
|
|
3260
|
-
ref: "scrollBarRef",
|
|
3261
|
-
"view-style": e.scrollbarViewStyle,
|
|
3262
|
-
"wrap-style": e.scrollbarStyle,
|
|
3263
|
-
always: e.scrollbarAlwaysOn
|
|
3264
|
-
}, {
|
|
3265
|
-
default: ye(() => [
|
|
3266
|
-
oe("table", {
|
|
3267
|
-
ref: "tableBody",
|
|
3268
|
-
class: I(e.ns.e("body")),
|
|
3269
|
-
cellspacing: "0",
|
|
3270
|
-
cellpadding: "0",
|
|
3271
|
-
border: "0",
|
|
3272
|
-
style: ke({
|
|
3273
|
-
width: e.bodyWidth,
|
|
3274
|
-
tableLayout: e.tableLayout
|
|
3275
|
-
})
|
|
3276
|
-
}, [
|
|
3277
|
-
we(i, {
|
|
3278
|
-
columns: e.store.states.columns.value,
|
|
3279
|
-
"table-layout": e.tableLayout
|
|
3280
|
-
}, null, 8, ["columns", "table-layout"]),
|
|
3281
|
-
e.showHeader && e.tableLayout === "auto" ? (D(), Le(o, {
|
|
3282
|
-
key: 0,
|
|
3283
|
-
ref: "tableHeaderRef",
|
|
3284
|
-
border: e.border,
|
|
3285
|
-
"default-sort": e.defaultSort,
|
|
3286
|
-
store: e.store,
|
|
3287
|
-
onSetDragVisible: e.setDragVisible
|
|
3288
|
-
}, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])) : Ce("v-if", !0),
|
|
3289
|
-
we(s, {
|
|
3290
|
-
context: e.context,
|
|
3291
|
-
highlight: e.highlightCurrentRow,
|
|
3292
|
-
"row-class-name": e.rowClassName,
|
|
3293
|
-
"tooltip-effect": e.tooltipEffect,
|
|
3294
|
-
"tooltip-options": e.tooltipOptions,
|
|
3295
|
-
"row-style": e.rowStyle,
|
|
3296
|
-
store: e.store,
|
|
3297
|
-
stripe: e.stripe
|
|
3298
|
-
}, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"])
|
|
3299
|
-
], 6),
|
|
3300
|
-
e.isEmpty ? (D(), U("div", {
|
|
3301
|
-
key: 0,
|
|
3302
|
-
ref: "emptyBlock",
|
|
3303
|
-
style: ke(e.emptyBlockStyle),
|
|
3304
|
-
class: I(e.ns.e("empty-block"))
|
|
3305
|
-
}, [
|
|
3306
|
-
oe("span", {
|
|
3307
|
-
class: I(e.ns.e("empty-text"))
|
|
3308
|
-
}, [
|
|
3309
|
-
Fe(e.$slots, "empty", {}, () => [
|
|
3310
|
-
ot(Se(e.computedEmptyText), 1)
|
|
3311
|
-
])
|
|
3312
|
-
], 2)
|
|
3313
|
-
], 6)) : Ce("v-if", !0),
|
|
3314
|
-
e.$slots.append ? (D(), U("div", {
|
|
3315
|
-
key: 1,
|
|
3316
|
-
ref: "appendWrapper",
|
|
3317
|
-
class: I(e.ns.e("append-wrapper"))
|
|
3318
|
-
}, [
|
|
3319
|
-
Fe(e.$slots, "append")
|
|
3320
|
-
], 2)) : Ce("v-if", !0)
|
|
3321
|
-
]),
|
|
3322
|
-
_: 3
|
|
3323
|
-
}, 8, ["view-style", "wrap-style", "always"])
|
|
3324
|
-
], 2),
|
|
3325
|
-
e.showSummary ? xe((D(), U("div", {
|
|
3326
|
-
key: 1,
|
|
3327
|
-
ref: "footerWrapper",
|
|
3328
|
-
class: I(e.ns.e("footer-wrapper"))
|
|
3329
|
-
}, [
|
|
3330
|
-
we(d, {
|
|
3331
|
-
border: e.border,
|
|
3332
|
-
"default-sort": e.defaultSort,
|
|
3333
|
-
store: e.store,
|
|
3334
|
-
style: ke(e.tableBodyStyles),
|
|
3335
|
-
"sum-text": e.computedSumText,
|
|
3336
|
-
"summary-method": e.summaryMethod
|
|
3337
|
-
}, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])
|
|
3338
|
-
], 2)), [
|
|
3339
|
-
[zt, !e.isEmpty],
|
|
3340
|
-
[h, e.handleHeaderFooterMousewheel]
|
|
3341
|
-
]) : Ce("v-if", !0),
|
|
3342
|
-
e.border || e.isGroup ? (D(), U("div", {
|
|
3343
|
-
key: 2,
|
|
3344
|
-
class: I(e.ns.e("border-left-patch"))
|
|
3345
|
-
}, null, 2)) : Ce("v-if", !0)
|
|
3346
|
-
], 6),
|
|
3347
|
-
xe(oe("div", {
|
|
3348
|
-
ref: "resizeProxy",
|
|
3349
|
-
class: I(e.ns.e("column-resize-proxy"))
|
|
3350
|
-
}, null, 2), [
|
|
3351
|
-
[zt, e.resizeProxyVisible]
|
|
3352
|
-
])
|
|
3353
|
-
], 46, xs);
|
|
3354
|
-
}
|
|
3355
|
-
var Rs = /* @__PURE__ */ je(Ss, [["render", ks], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);
|
|
3356
|
-
const Ls = {
|
|
3357
|
-
selection: "table-column--selection",
|
|
3358
|
-
expand: "table__expand-column"
|
|
3359
|
-
}, Ns = {
|
|
3360
|
-
default: {
|
|
3361
|
-
order: ""
|
|
3362
|
-
},
|
|
3363
|
-
selection: {
|
|
3364
|
-
width: 48,
|
|
3365
|
-
minWidth: 48,
|
|
3366
|
-
realWidth: 48,
|
|
3367
|
-
order: ""
|
|
3368
|
-
},
|
|
3369
|
-
expand: {
|
|
3370
|
-
width: 48,
|
|
3371
|
-
minWidth: 48,
|
|
3372
|
-
realWidth: 48,
|
|
3373
|
-
order: ""
|
|
3374
|
-
},
|
|
3375
|
-
index: {
|
|
3376
|
-
width: 48,
|
|
3377
|
-
minWidth: 48,
|
|
3378
|
-
realWidth: 48,
|
|
3379
|
-
order: ""
|
|
3380
|
-
}
|
|
3381
|
-
}, Os = (e) => Ls[e] || "", Fs = {
|
|
3382
|
-
selection: {
|
|
3383
|
-
renderHeader({ store: e, column: t }) {
|
|
3384
|
-
function l() {
|
|
3385
|
-
return e.states.data.value && e.states.data.value.length === 0;
|
|
3386
|
-
}
|
|
3387
|
-
return H(Ae, {
|
|
3388
|
-
disabled: l(),
|
|
3389
|
-
size: e.states.tableSize.value,
|
|
3390
|
-
indeterminate: e.states.selection.value.length > 0 && !e.states.isAllSelected.value,
|
|
3391
|
-
"onUpdate:modelValue": e.toggleAllSelection,
|
|
3392
|
-
modelValue: e.states.isAllSelected.value,
|
|
3393
|
-
ariaLabel: t.label
|
|
3394
|
-
});
|
|
3395
|
-
},
|
|
3396
|
-
renderCell({
|
|
3397
|
-
row: e,
|
|
3398
|
-
column: t,
|
|
3399
|
-
store: l,
|
|
3400
|
-
$index: n
|
|
3401
|
-
}) {
|
|
3402
|
-
return H(Ae, {
|
|
3403
|
-
disabled: t.selectable ? !t.selectable.call(null, e, n) : !1,
|
|
3404
|
-
size: l.states.tableSize.value,
|
|
3405
|
-
onChange: () => {
|
|
3406
|
-
l.commit("rowSelectedChanged", e);
|
|
3407
|
-
},
|
|
3408
|
-
onClick: (r) => r.stopPropagation(),
|
|
3409
|
-
modelValue: l.isSelected(e),
|
|
3410
|
-
ariaLabel: t.label
|
|
3411
|
-
});
|
|
3412
|
-
},
|
|
3413
|
-
sortable: !1,
|
|
3414
|
-
resizable: !1
|
|
3415
|
-
},
|
|
3416
|
-
index: {
|
|
3417
|
-
renderHeader({ column: e }) {
|
|
3418
|
-
return e.label || "#";
|
|
3419
|
-
},
|
|
3420
|
-
renderCell({
|
|
3421
|
-
column: e,
|
|
3422
|
-
$index: t
|
|
3423
|
-
}) {
|
|
3424
|
-
let l = t + 1;
|
|
3425
|
-
const n = e.index;
|
|
3426
|
-
return typeof n == "number" ? l = t + n : typeof n == "function" && (l = n(t)), H("div", {}, [l]);
|
|
3427
|
-
},
|
|
3428
|
-
sortable: !1
|
|
3429
|
-
},
|
|
3430
|
-
expand: {
|
|
3431
|
-
renderHeader({ column: e }) {
|
|
3432
|
-
return e.label || "";
|
|
3433
|
-
},
|
|
3434
|
-
renderCell({
|
|
3435
|
-
row: e,
|
|
3436
|
-
store: t,
|
|
3437
|
-
expanded: l
|
|
3438
|
-
}) {
|
|
3439
|
-
const { ns: n } = t, r = [n.e("expand-icon")];
|
|
3440
|
-
return l && r.push(n.em("expand-icon", "expanded")), H("div", {
|
|
3441
|
-
class: r,
|
|
3442
|
-
onClick: function(i) {
|
|
3443
|
-
i.stopPropagation(), t.toggleRowExpansion(e);
|
|
3444
|
-
}
|
|
3445
|
-
}, {
|
|
3446
|
-
default: () => [
|
|
3447
|
-
H(Mt, null, {
|
|
3448
|
-
default: () => [H(xl)]
|
|
3449
|
-
})
|
|
3450
|
-
]
|
|
3451
|
-
});
|
|
3452
|
-
},
|
|
3453
|
-
sortable: !1,
|
|
3454
|
-
resizable: !1
|
|
3455
|
-
}
|
|
3456
|
-
};
|
|
3457
|
-
function Ms({
|
|
3458
|
-
row: e,
|
|
3459
|
-
column: t,
|
|
3460
|
-
$index: l
|
|
3461
|
-
}) {
|
|
3462
|
-
var n;
|
|
3463
|
-
const r = t.property, a = r && Qn(e, r).value;
|
|
3464
|
-
return t && t.formatter ? t.formatter(e, t, a, l) : ((n = a == null ? void 0 : a.toString) == null ? void 0 : n.call(a)) || "";
|
|
3465
|
-
}
|
|
3466
|
-
function As({
|
|
3467
|
-
row: e,
|
|
3468
|
-
treeNode: t,
|
|
3469
|
-
store: l
|
|
3470
|
-
}, n = !1) {
|
|
3471
|
-
const { ns: r } = l;
|
|
3472
|
-
if (!t)
|
|
3473
|
-
return n ? [
|
|
3474
|
-
H("span", {
|
|
3475
|
-
class: r.e("placeholder")
|
|
3476
|
-
})
|
|
3477
|
-
] : null;
|
|
3478
|
-
const a = [], i = function(o) {
|
|
3479
|
-
o.stopPropagation(), !t.loading && l.loadOrToggle(e);
|
|
3480
|
-
};
|
|
3481
|
-
if (t.indent && a.push(H("span", {
|
|
3482
|
-
class: r.e("indent"),
|
|
3483
|
-
style: { "padding-left": `${t.indent}px` }
|
|
3484
|
-
})), typeof t.expanded == "boolean" && !t.noLazyChildren) {
|
|
3485
|
-
const o = [
|
|
3486
|
-
r.e("expand-icon"),
|
|
3487
|
-
t.expanded ? r.em("expand-icon", "expanded") : ""
|
|
3488
|
-
];
|
|
3489
|
-
let s = xl;
|
|
3490
|
-
t.loading && (s = no), a.push(H("div", {
|
|
3491
|
-
class: o,
|
|
3492
|
-
onClick: i
|
|
3493
|
-
}, {
|
|
3494
|
-
default: () => [
|
|
3495
|
-
H(Mt, { class: { [r.is("loading")]: t.loading } }, {
|
|
3496
|
-
default: () => [H(s)]
|
|
3497
|
-
})
|
|
3498
|
-
]
|
|
3499
|
-
}));
|
|
3500
|
-
} else
|
|
3501
|
-
a.push(H("span", {
|
|
3502
|
-
class: r.e("placeholder")
|
|
3503
|
-
}));
|
|
3504
|
-
return a;
|
|
3505
|
-
}
|
|
3506
|
-
function sl(e, t) {
|
|
3507
|
-
return e.reduce((l, n) => (l[n] = n, l), t);
|
|
3508
|
-
}
|
|
3509
|
-
function Ts(e, t) {
|
|
3510
|
-
const l = ee();
|
|
3511
|
-
return {
|
|
3512
|
-
registerComplexWatchers: () => {
|
|
3513
|
-
const a = ["fixed"], i = {
|
|
3514
|
-
realWidth: "width",
|
|
3515
|
-
realMinWidth: "minWidth"
|
|
3516
|
-
}, o = sl(a, i);
|
|
3517
|
-
Object.keys(o).forEach((s) => {
|
|
3518
|
-
const u = i[s];
|
|
3519
|
-
Ie(t, u) && ie(() => t[u], (d) => {
|
|
3520
|
-
let h = d;
|
|
3521
|
-
u === "width" && s === "realWidth" && (h = Tt(d)), u === "minWidth" && s === "realMinWidth" && (h = Ul(d)), l.columnConfig.value[u] = h, l.columnConfig.value[s] = h;
|
|
3522
|
-
const p = u === "fixed";
|
|
3523
|
-
e.value.store.scheduleLayout(p);
|
|
3524
|
-
});
|
|
3525
|
-
});
|
|
3526
|
-
},
|
|
3527
|
-
registerNormalWatchers: () => {
|
|
3528
|
-
const a = [
|
|
3529
|
-
"label",
|
|
3530
|
-
"filters",
|
|
3531
|
-
"filterMultiple",
|
|
3532
|
-
"filteredValue",
|
|
3533
|
-
"sortable",
|
|
3534
|
-
"index",
|
|
3535
|
-
"formatter",
|
|
3536
|
-
"className",
|
|
3537
|
-
"labelClassName",
|
|
3538
|
-
"showOverflowTooltip"
|
|
3539
|
-
], i = {
|
|
3540
|
-
property: "prop",
|
|
3541
|
-
align: "realAlign",
|
|
3542
|
-
headerAlign: "realHeaderAlign"
|
|
3543
|
-
}, o = sl(a, i);
|
|
3544
|
-
Object.keys(o).forEach((s) => {
|
|
3545
|
-
const u = i[s];
|
|
3546
|
-
Ie(t, u) && ie(() => t[u], (d) => {
|
|
3547
|
-
l.columnConfig.value[s] = d;
|
|
3548
|
-
});
|
|
3549
|
-
});
|
|
3550
|
-
}
|
|
3551
|
-
};
|
|
3552
|
-
}
|
|
3553
|
-
function Ws(e, t, l) {
|
|
3554
|
-
const n = ee(), r = E(""), a = E(!1), i = E(), o = E(), s = se("table");
|
|
3555
|
-
He(() => {
|
|
3556
|
-
i.value = e.align ? `is-${e.align}` : null, i.value;
|
|
3557
|
-
}), He(() => {
|
|
3558
|
-
o.value = e.headerAlign ? `is-${e.headerAlign}` : i.value, o.value;
|
|
3559
|
-
});
|
|
3560
|
-
const u = T(() => {
|
|
3561
|
-
let c = n.vnode.vParent || n.parent;
|
|
3562
|
-
for (; c && !c.tableId && !c.columnId; )
|
|
3563
|
-
c = c.vnode.vParent || c.parent;
|
|
3564
|
-
return c;
|
|
3565
|
-
}), d = T(() => {
|
|
3566
|
-
const { store: c } = n.parent;
|
|
3567
|
-
if (!c)
|
|
3568
|
-
return !1;
|
|
3569
|
-
const { treeData: x } = c.states, k = x.value;
|
|
3570
|
-
return k && Object.keys(k).length > 0;
|
|
3571
|
-
}), h = E(Tt(e.width)), p = E(Ul(e.minWidth)), m = (c) => (h.value && (c.width = h.value), p.value && (c.minWidth = p.value), !h.value && p.value && (c.width = void 0), c.minWidth || (c.minWidth = 80), c.realWidth = Number(c.width === void 0 ? c.minWidth : c.width), c), f = (c) => {
|
|
3572
|
-
const x = c.type, k = Fs[x] || {};
|
|
3573
|
-
Object.keys(k).forEach((R) => {
|
|
3574
|
-
const F = k[R];
|
|
3575
|
-
R !== "className" && F !== void 0 && (c[R] = F);
|
|
3576
|
-
});
|
|
3577
|
-
const w = Os(x);
|
|
3578
|
-
if (w) {
|
|
3579
|
-
const R = `${O(s.namespace)}-${w}`;
|
|
3580
|
-
c.className = c.className ? `${c.className} ${R}` : R;
|
|
3581
|
-
}
|
|
3582
|
-
return c;
|
|
3583
|
-
}, g = (c) => {
|
|
3584
|
-
Array.isArray(c) ? c.forEach((k) => x(k)) : x(c);
|
|
3585
|
-
function x(k) {
|
|
3586
|
-
var w;
|
|
3587
|
-
((w = k == null ? void 0 : k.type) == null ? void 0 : w.name) === "ElTableColumn" && (k.vParent = n);
|
|
3588
|
-
}
|
|
3589
|
-
};
|
|
3590
|
-
return {
|
|
3591
|
-
columnId: r,
|
|
3592
|
-
realAlign: i,
|
|
3593
|
-
isSubColumn: a,
|
|
3594
|
-
realHeaderAlign: o,
|
|
3595
|
-
columnOrTableParent: u,
|
|
3596
|
-
setColumnWidth: m,
|
|
3597
|
-
setColumnForcedProps: f,
|
|
3598
|
-
setColumnRenders: (c) => {
|
|
3599
|
-
e.renderHeader ? Lt("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.") : c.type !== "selection" && (c.renderHeader = (k) => {
|
|
3600
|
-
n.columnConfig.value.label;
|
|
3601
|
-
const w = t.header;
|
|
3602
|
-
return w ? w(k) : c.label;
|
|
3603
|
-
});
|
|
3604
|
-
let x = c.renderCell;
|
|
3605
|
-
return c.type === "expand" ? (c.renderCell = (k) => H("div", {
|
|
3606
|
-
class: "cell"
|
|
3607
|
-
}, [x(k)]), l.value.renderExpanded = (k) => t.default ? t.default(k) : t.default) : (x = x || Ms, c.renderCell = (k) => {
|
|
3608
|
-
let w = null;
|
|
3609
|
-
if (t.default) {
|
|
3610
|
-
const z = t.default(k);
|
|
3611
|
-
w = z.some((j) => j.type !== Sn) ? z : x(k);
|
|
3612
|
-
} else
|
|
3613
|
-
w = x(k);
|
|
3614
|
-
const { columns: R } = l.value.store.states, F = R.value.findIndex((z) => z.type === "default"), K = d.value && k.cellIndex === F, B = As(k, K), M = {
|
|
3615
|
-
class: "cell",
|
|
3616
|
-
style: {}
|
|
3617
|
-
};
|
|
3618
|
-
return c.showOverflowTooltip && (M.class = `${M.class} ${O(s.namespace)}-tooltip`, M.style = {
|
|
3619
|
-
width: `${(k.column.realWidth || Number(k.column.width)) - 1}px`
|
|
3620
|
-
}), g(w), H("div", M, [B, w]);
|
|
3621
|
-
}), c;
|
|
3622
|
-
},
|
|
3623
|
-
getPropsData: (...c) => c.reduce((x, k) => (Array.isArray(k) && k.forEach((w) => {
|
|
3624
|
-
x[w] = e[w];
|
|
3625
|
-
}), x), {}),
|
|
3626
|
-
getColumnElIndex: (c, x) => Array.prototype.indexOf.call(c, x),
|
|
3627
|
-
updateColumnOrder: () => {
|
|
3628
|
-
l.value.store.commit("updateColumnOrder", n.columnConfig.value);
|
|
3629
|
-
}
|
|
3630
|
-
};
|
|
3631
|
-
}
|
|
3632
|
-
var Hs = {
|
|
3633
|
-
type: {
|
|
3634
|
-
type: String,
|
|
3635
|
-
default: "default"
|
|
3636
|
-
},
|
|
3637
|
-
label: String,
|
|
3638
|
-
className: String,
|
|
3639
|
-
labelClassName: String,
|
|
3640
|
-
property: String,
|
|
3641
|
-
prop: String,
|
|
3642
|
-
width: {
|
|
3643
|
-
type: [String, Number],
|
|
3644
|
-
default: ""
|
|
3645
|
-
},
|
|
3646
|
-
minWidth: {
|
|
3647
|
-
type: [String, Number],
|
|
3648
|
-
default: ""
|
|
3649
|
-
},
|
|
3650
|
-
renderHeader: Function,
|
|
3651
|
-
sortable: {
|
|
3652
|
-
type: [Boolean, String],
|
|
3653
|
-
default: !1
|
|
3654
|
-
},
|
|
3655
|
-
sortMethod: Function,
|
|
3656
|
-
sortBy: [String, Function, Array],
|
|
3657
|
-
resizable: {
|
|
3658
|
-
type: Boolean,
|
|
3659
|
-
default: !0
|
|
3660
|
-
},
|
|
3661
|
-
columnKey: String,
|
|
3662
|
-
align: String,
|
|
3663
|
-
headerAlign: String,
|
|
3664
|
-
showOverflowTooltip: {
|
|
3665
|
-
type: [Boolean, Object],
|
|
3666
|
-
default: void 0
|
|
3667
|
-
},
|
|
3668
|
-
fixed: [Boolean, String],
|
|
3669
|
-
formatter: Function,
|
|
3670
|
-
selectable: Function,
|
|
3671
|
-
reserveSelection: Boolean,
|
|
3672
|
-
filterMethod: Function,
|
|
3673
|
-
filteredValue: Array,
|
|
3674
|
-
filters: Array,
|
|
3675
|
-
filterPlacement: String,
|
|
3676
|
-
filterMultiple: {
|
|
3677
|
-
type: Boolean,
|
|
3678
|
-
default: !0
|
|
3679
|
-
},
|
|
3680
|
-
index: [Number, Function],
|
|
3681
|
-
sortOrders: {
|
|
3682
|
-
type: Array,
|
|
3683
|
-
default: () => ["ascending", "descending", null],
|
|
3684
|
-
validator: (e) => e.every((t) => ["ascending", "descending", null].includes(t))
|
|
3685
|
-
}
|
|
3686
|
-
};
|
|
3687
|
-
let $s = 1;
|
|
3688
|
-
var Jl = he({
|
|
3689
|
-
name: "ElTableColumn",
|
|
3690
|
-
components: {
|
|
3691
|
-
ElCheckbox: Ae
|
|
3692
|
-
},
|
|
3693
|
-
props: Hs,
|
|
3694
|
-
setup(e, { slots: t }) {
|
|
3695
|
-
const l = ee(), n = E({}), r = T(() => {
|
|
3696
|
-
let S = l.parent;
|
|
3697
|
-
for (; S && !S.tableId; )
|
|
3698
|
-
S = S.parent;
|
|
3699
|
-
return S;
|
|
3700
|
-
}), { registerNormalWatchers: a, registerComplexWatchers: i } = Ts(r, e), {
|
|
3701
|
-
columnId: o,
|
|
3702
|
-
isSubColumn: s,
|
|
3703
|
-
realHeaderAlign: u,
|
|
3704
|
-
columnOrTableParent: d,
|
|
3705
|
-
setColumnWidth: h,
|
|
3706
|
-
setColumnForcedProps: p,
|
|
3707
|
-
setColumnRenders: m,
|
|
3708
|
-
getPropsData: f,
|
|
3709
|
-
getColumnElIndex: g,
|
|
3710
|
-
realAlign: v,
|
|
3711
|
-
updateColumnOrder: y
|
|
3712
|
-
} = Ws(e, t, r), b = d.value;
|
|
3713
|
-
o.value = `${b.tableId || b.columnId}_column_${$s++}`, fl(() => {
|
|
3714
|
-
s.value = r.value !== b;
|
|
3715
|
-
const S = e.type || "default", c = e.sortable === "" ? !0 : e.sortable, x = lt(e.showOverflowTooltip) ? b.props.showOverflowTooltip : e.showOverflowTooltip, k = {
|
|
3716
|
-
...Ns[S],
|
|
3717
|
-
id: o.value,
|
|
3718
|
-
type: S,
|
|
3719
|
-
property: e.prop || e.property,
|
|
3720
|
-
align: v,
|
|
3721
|
-
headerAlign: u,
|
|
3722
|
-
showOverflowTooltip: x,
|
|
3723
|
-
filterable: e.filters || e.filterMethod,
|
|
3724
|
-
filteredValue: [],
|
|
3725
|
-
filterPlacement: "",
|
|
3726
|
-
isColumnGroup: !1,
|
|
3727
|
-
isSubColumn: !1,
|
|
3728
|
-
filterOpened: !1,
|
|
3729
|
-
sortable: c,
|
|
3730
|
-
index: e.index,
|
|
3731
|
-
rawColumnKey: l.vnode.key
|
|
3732
|
-
};
|
|
3733
|
-
let B = f([
|
|
3734
|
-
"columnKey",
|
|
3735
|
-
"label",
|
|
3736
|
-
"className",
|
|
3737
|
-
"labelClassName",
|
|
3738
|
-
"type",
|
|
3739
|
-
"renderHeader",
|
|
3740
|
-
"formatter",
|
|
3741
|
-
"fixed",
|
|
3742
|
-
"resizable"
|
|
3743
|
-
], ["sortMethod", "sortBy", "sortOrders"], ["selectable", "reserveSelection"], [
|
|
3744
|
-
"filterMethod",
|
|
3745
|
-
"filters",
|
|
3746
|
-
"filterMultiple",
|
|
3747
|
-
"filterOpened",
|
|
3748
|
-
"filteredValue",
|
|
3749
|
-
"filterPlacement"
|
|
3750
|
-
]);
|
|
3751
|
-
B = $r(k, B), B = Br(m, h, p)(B), n.value = B, a(), i();
|
|
3752
|
-
}), Ke(() => {
|
|
3753
|
-
var S;
|
|
3754
|
-
const c = d.value, x = s.value ? c.vnode.el.children : (S = c.refs.hiddenColumns) == null ? void 0 : S.children, k = () => g(x || [], l.vnode.el);
|
|
3755
|
-
n.value.getColumnIndex = k, k() > -1 && r.value.store.commit("insertColumn", n.value, s.value ? c.columnConfig.value : null, y);
|
|
3756
|
-
}), xn(() => {
|
|
3757
|
-
r.value.store.commit("removeColumn", n.value, s.value ? b.columnConfig.value : null, y);
|
|
3758
|
-
}), l.columnId = o.value, l.columnConfig = n;
|
|
3759
|
-
},
|
|
3760
|
-
render() {
|
|
3761
|
-
var e, t, l;
|
|
3762
|
-
try {
|
|
3763
|
-
const n = (t = (e = this.$slots).default) == null ? void 0 : t.call(e, {
|
|
3764
|
-
row: {},
|
|
3765
|
-
column: {},
|
|
3766
|
-
$index: -1
|
|
3767
|
-
}), r = [];
|
|
3768
|
-
if (Array.isArray(n))
|
|
3769
|
-
for (const i of n)
|
|
3770
|
-
((l = i.type) == null ? void 0 : l.name) === "ElTableColumn" || i.shapeFlag & 2 ? r.push(i) : i.type === Je && Array.isArray(i.children) && i.children.forEach((o) => {
|
|
3771
|
-
(o == null ? void 0 : o.patchFlag) !== 1024 && !ut(o == null ? void 0 : o.children) && r.push(o);
|
|
3772
|
-
});
|
|
3773
|
-
return H("div", r);
|
|
3774
|
-
} catch {
|
|
3775
|
-
return H("div", []);
|
|
3776
|
-
}
|
|
3777
|
-
}
|
|
3778
|
-
});
|
|
3779
|
-
const Xs = bl(Rs, {
|
|
3780
|
-
TableColumn: Jl
|
|
3781
|
-
}), _s = Nt(Jl);
|
|
3782
|
-
export {
|
|
3783
|
-
Ae as E,
|
|
3784
|
-
qs as a,
|
|
3785
|
-
_s as b,
|
|
3786
|
-
Xs as c,
|
|
3787
|
-
bo as d,
|
|
3788
|
-
Bo as e,
|
|
3789
|
-
Io as f,
|
|
3790
|
-
Ll as g,
|
|
3791
|
-
io as h,
|
|
3792
|
-
Po as i,
|
|
3793
|
-
zo as j,
|
|
3794
|
-
Rl as k
|
|
3795
|
-
};
|