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