st-comp 0.0.164 → 0.0.166
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 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +3 -3
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +16 -14
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +492 -614
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +16 -16
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +477 -766
- package/es/KlineConfig.cjs +1 -0
- package/es/KlineConfig.js +703 -0
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +14 -14
- package/es/KlinePlus.cjs +6 -0
- package/es/KlinePlus.js +1212 -0
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +21 -20
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +100 -279
- package/es/User.cjs +1 -1
- package/es/User.js +41 -39
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +23 -22
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +34 -32
- package/es/VirtualTable.cjs +5 -5
- package/es/VirtualTable.js +1018 -1056
- package/es/{_initCloneObject-47814efa.cjs → _initCloneObject-9ccbb113.cjs} +1 -1
- package/es/{_initCloneObject-c939f3af.js → _initCloneObject-a9305c1e.js} +3 -3
- package/es/base-4bcd2756.js +304 -0
- package/es/base-bdc10baa.cjs +5 -0
- package/es/{castArray-a78ae889.cjs → castArray-37eb9980.cjs} +1 -1
- package/es/{castArray-2440268f.js → castArray-681d750b.js} +1 -1
- package/es/{config-provider-722dca36.js → config-provider-93846ae3.js} +9 -9
- package/es/config-provider-ec6b09df.cjs +1 -0
- package/es/dayjs.min-19fb125f.cjs +1 -0
- package/es/dayjs.min-54a4e095.js +296 -0
- package/es/{debounce-82e23c4b.js → debounce-51046b06.js} +1 -1
- package/es/{debounce-cf26af24.cjs → debounce-9e323221.cjs} +1 -1
- package/es/{dropdown-6f8379f0.js → dropdown-65e74de8.js} +6 -6
- package/es/{dropdown-790d31ea.cjs → dropdown-b2dab5bb.cjs} +1 -1
- package/es/{el-autocomplete-75762ef9.js → el-autocomplete-5064d466.js} +9 -9
- package/es/{el-autocomplete-84de99ba.cjs → el-autocomplete-814993af.cjs} +1 -1
- package/es/el-button-960edd49.cjs +1 -0
- package/es/{el-button-2e878325.js → el-button-d39472d3.js} +37 -36
- package/es/{el-checkbox-group-45247bbf.cjs → el-checkbox-group-020b49f5.cjs} +1 -1
- package/es/{el-checkbox-group-5e4f32f0.js → el-checkbox-group-779f353a.js} +2 -2
- package/es/el-dialog-cd484c1f.cjs +1 -0
- package/es/el-dialog-f45ec2a1.js +267 -0
- package/es/el-divider-40c50ce7.cjs +1 -0
- package/es/el-divider-7cf13678.js +45 -0
- package/es/{el-empty-2ece1134.cjs → el-empty-627ec09e.cjs} +1 -1
- package/es/{el-empty-7f8acbdc.js → el-empty-64b2ea8a.js} +2 -2
- package/es/{el-form-item-45ba08ff.js → el-form-item-b31e7a98.js} +8 -8
- package/es/{el-form-item-47e255d4.cjs → el-form-item-e1c3104b.cjs} +2 -2
- package/es/{el-input-1323afd2.js → el-input-42315ac4.js} +48 -48
- package/es/{el-input-cb340042.cjs → el-input-5163bda3.cjs} +1 -1
- package/es/{el-input-number-0f194f3f.cjs → el-input-number-eb54cde4.cjs} +1 -1
- package/es/{el-input-number-991f8bfc.js → el-input-number-ebd64e22.js} +19 -19
- package/es/el-loading-15a5501c.cjs +1 -0
- package/es/el-loading-5d29f26d.js +187 -0
- package/es/{el-menu-item-4c9eb7ad.cjs → el-menu-item-ac89e804.cjs} +1 -1
- package/es/{el-menu-item-dbbcd01a.js → el-menu-item-d62e0a3f.js} +32 -32
- package/es/el-message-ad87b9dd.cjs +1 -0
- package/es/{el-message-03e6f342.js → el-message-bd1d2c82.js} +17 -17
- package/es/el-overlay-690b50aa.js +269 -0
- package/es/el-overlay-e5d318c3.cjs +1 -0
- package/es/{el-popconfirm-8372cd13.js → el-popconfirm-88bbd066.js} +13 -13
- package/es/{el-popconfirm-86503f8a.cjs → el-popconfirm-a497b279.cjs} +1 -1
- package/es/{el-popper-7adbf1c6.cjs → el-popper-14a9d493.cjs} +1 -1
- package/es/{el-popper-b5315f5b.js → el-popper-85365d5b.js} +63 -63
- package/es/{el-scrollbar-ac525239.cjs → el-scrollbar-8bf765f2.cjs} +1 -1
- package/es/{el-scrollbar-4dc1493a.js → el-scrollbar-bcf29780.js} +21 -21
- package/es/el-segmented-84707138.js +136 -0
- package/es/el-segmented-bccd9f2a.cjs +1 -0
- package/es/{el-select-31f8ac8a.cjs → el-select-1d2309a1.cjs} +1 -1
- package/es/{el-select-a4ad7c8b.js → el-select-d3bce4d1.js} +13 -13
- package/es/{el-table-column-2e7132b3.js → el-table-column-9691b26d.js} +19 -18
- package/es/el-table-column-be9a76bb.cjs +14 -0
- package/es/{el-tag-a79385c6.js → el-tag-6036f51c.js} +39 -39
- package/es/{el-tag-9732314f.cjs → el-tag-8d49d4d2.cjs} +1 -1
- package/es/{index-375e8de4.cjs → index-02ca0096.cjs} +1 -1
- package/es/{index-afc88a4b.cjs → index-19fa1fcf.cjs} +1 -1
- package/es/{index-733cd68a.js → index-21fb27eb.js} +17 -17
- package/es/{index-e5fe37a4.js → index-3425f2f0.js} +10 -10
- package/es/{index-1d85ba4b.cjs → index-5b81f4da.cjs} +1 -1
- package/es/index-8d3c5e96.cjs +3 -0
- package/es/{index-97d24ab7.js → index-8ee89b40.js} +16 -16
- package/es/{index-9e6e8d03.cjs → index-a99a5307.cjs} +1 -1
- package/es/{index-58521b9e.cjs → index-b90c746b.cjs} +1 -1
- package/es/index-c45ac024.js +14 -0
- package/es/{index-f5b9b211.js → index-cb8157f2.js} +2 -2
- package/es/{index-e6a36e09.js → index-d3c37134.js} +7 -7
- package/es/{index-65b4113e.cjs → index-d94bae37.cjs} +1 -1
- package/es/{index-2d9c78d4.cjs → index-e348d5e8.cjs} +1 -1
- package/es/{index-57a7323a.js → index-ef7c4392.js} +11 -11
- package/es/{index-e3353eeb.js → index-fbe85773.js} +13 -13
- package/es/{raf-f46caea0.cjs → raf-07cb6953.cjs} +1 -1
- package/es/{raf-c817c3f7.js → raf-36faa519.js} +1 -1
- package/es/{scroll-4fe7a76f.js → scroll-0277d145.js} +1 -1
- package/es/{scroll-339681d4.cjs → scroll-4769a65d.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-04fb0752.js → use-form-common-props-54c31983.js} +40 -40
- package/es/{use-form-common-props-74a96df2.cjs → use-form-common-props-592797e2.cjs} +1 -1
- package/es/use-global-config-584b62f1.cjs +1 -0
- package/es/use-global-config-946f61a4.js +73 -0
- package/es/{vnode-b15eb11b.cjs → vnode-1b827c99.cjs} +1 -1
- package/es/{vnode-0fd3003d.js → vnode-dfc92f20.js} +1 -1
- package/es/{zh-cn-cac8283b.js → zh-cn-5066f5e9.js} +2 -2
- package/es/{zh-cn-36f34912.cjs → zh-cn-b24a7dc9.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +217 -212
- package/lib/{index-5f63dc2e.js → index-80531492.js} +39042 -37182
- package/lib/{python-5918f7d5.js → python-20a1a5fc.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/config.js +39 -0
- package/packages/KlineConfig/index.ts +8 -0
- package/packages/KlineConfig/index.vue +315 -0
- package/packages/KlinePlus/components/SliderChart.vue +218 -0
- package/packages/KlinePlus/components/Tips.vue +36 -0
- package/packages/KlinePlus/images/buy.svg +1 -0
- package/packages/KlinePlus/images/sell.svg +1 -0
- package/packages/KlinePlus/images/t.svg +1 -0
- package/packages/KlinePlus/index.ts +8 -0
- package/packages/KlinePlus/index.vue +880 -0
- package/packages/KlinePlus/utils.js +705 -0
- package/packages/index.ts +4 -0
- package/src/pages/KlineConfig/index.vue +20 -0
- package/src/pages/KlinePlus/index.vue +180 -0
- package/src/router/routes.ts +10 -0
- package/es/base-0ca7c43a.cjs +0 -5
- package/es/base-b56cf478.js +0 -303
- package/es/config-provider-cfbb9cd8.cjs +0 -1
- package/es/el-button-62966947.cjs +0 -1
- package/es/el-message-d5ed7a4f.cjs +0 -1
- package/es/el-overlay-41994f67.cjs +0 -1
- package/es/el-overlay-47b665a0.js +0 -521
- package/es/el-table-column-bdc46568.cjs +0 -14
- package/es/index-0baeaec7.js +0 -82
- package/es/index-2f958e56.cjs +0 -3
package/es/VirtualTable.js
CHANGED
|
@@ -1,124 +1,86 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as
|
|
3
|
-
import { B as
|
|
4
|
-
import { E as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
1
|
+
import { J as pe, m as I, k as se, u as _e, c as Et, v as Y, o as $e, q as et, i as Be, b as Fl, a as Lt, h as Gl, t as ot, d as Vl, w as ll } from "./base-4bcd2756.js";
|
|
2
|
+
import { E as ol } from "./el-empty-64b2ea8a.js";
|
|
3
|
+
import { B as kl, b as Kl, u as jl } from "./el-scrollbar-bcf29780.js";
|
|
4
|
+
import { E as Bl } from "./el-divider-7cf13678.js";
|
|
5
|
+
import { E as Ul } from "./el-button-d39472d3.js";
|
|
6
|
+
import { getCurrentInstance as at, computed as T, defineComponent as we, ref as V, reactive as ql, unref as n, watch as Me, onBeforeUnmount as nl, h as he, withModifiers as Yl, shallowRef as Le, isVNode as Ie, toRef as Dt, inject as Ct, onUpdated as Zl, createVNode as _, nextTick as Pe, onMounted as st, resolveDynamicComponent as Pt, Fragment as Xl, provide as rl, mergeProps as Z, renderSlot as Ze, mergeModels as $t, useModel as Jl, onUnmounted as Ql, openBlock as Je, createBlock as dt, withCtx as Ne, createElementBlock as eo, createTextVNode as Wt, createCommentVNode as Ft } from "vue";
|
|
7
|
+
import { d as to } from "./debounce-51046b06.js";
|
|
8
|
+
import { m as al } from "./typescript-7ae59c4c.js";
|
|
9
|
+
import { c as lo } from "./castArray-681d750b.js";
|
|
10
|
+
import { c as sl, r as il } from "./raf-36faa519.js";
|
|
11
|
+
import { s as oo, h as no } from "./index-ef7c4392.js";
|
|
12
|
+
import { g as ro } from "./scroll-0277d145.js";
|
|
13
|
+
import { E as cl, b as ao, t as so, w as io } from "./index-3425f2f0.js";
|
|
14
|
+
import { _ as co } from "./_plugin-vue_export-helper-dad06003.js";
|
|
15
|
+
import "./index-c45ac024.js";
|
|
16
|
+
import "./use-global-config-946f61a4.js";
|
|
17
|
+
import "./use-form-common-props-54c31983.js";
|
|
16
18
|
import "./index-657047bb.js";
|
|
17
|
-
|
|
18
|
-
direction: {
|
|
19
|
-
type: String,
|
|
20
|
-
values: ["horizontal", "vertical"],
|
|
21
|
-
default: "horizontal"
|
|
22
|
-
},
|
|
23
|
-
contentPosition: {
|
|
24
|
-
type: String,
|
|
25
|
-
values: ["left", "center", "right"],
|
|
26
|
-
default: "center"
|
|
27
|
-
},
|
|
28
|
-
borderStyle: {
|
|
29
|
-
type: I(String),
|
|
30
|
-
default: "solid"
|
|
31
|
-
}
|
|
32
|
-
}), mn = ie({
|
|
33
|
-
name: "ElDivider"
|
|
34
|
-
}), vn = /* @__PURE__ */ ie({
|
|
35
|
-
...mn,
|
|
36
|
-
props: fn,
|
|
37
|
-
setup(e) {
|
|
38
|
-
const t = e, l = be("divider"), n = T(() => l.cssVar({
|
|
39
|
-
"border-style": t.borderStyle
|
|
40
|
-
}));
|
|
41
|
-
return (r, a) => (De(), ht("div", {
|
|
42
|
-
class: Wt([o(l).b(), o(l).m(r.direction)]),
|
|
43
|
-
style: Zl(o(n)),
|
|
44
|
-
role: "separator"
|
|
45
|
-
}, [
|
|
46
|
-
r.$slots.default && r.direction !== "vertical" ? (De(), ht("div", {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: Wt([o(l).e("text"), o(l).is(r.contentPosition)])
|
|
49
|
-
}, [
|
|
50
|
-
Fe(r.$slots, "default")
|
|
51
|
-
], 2)) : ft("v-if", !0)
|
|
52
|
-
], 6));
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
var gn = /* @__PURE__ */ Vl(vn, [["__file", "divider.vue"]]);
|
|
56
|
-
const yn = pt(gn);
|
|
57
|
-
var Kt = Number.isNaN || function(t) {
|
|
19
|
+
var Gt = Number.isNaN || function(t) {
|
|
58
20
|
return typeof t == "number" && t !== t;
|
|
59
21
|
};
|
|
60
|
-
function
|
|
61
|
-
return !!(e === t ||
|
|
22
|
+
function uo(e, t) {
|
|
23
|
+
return !!(e === t || Gt(e) && Gt(t));
|
|
62
24
|
}
|
|
63
|
-
function
|
|
25
|
+
function ho(e, t) {
|
|
64
26
|
if (e.length !== t.length)
|
|
65
27
|
return !1;
|
|
66
28
|
for (var l = 0; l < e.length; l++)
|
|
67
|
-
if (!
|
|
29
|
+
if (!uo(e[l], t[l]))
|
|
68
30
|
return !1;
|
|
69
31
|
return !0;
|
|
70
32
|
}
|
|
71
|
-
function
|
|
72
|
-
t === void 0 && (t =
|
|
33
|
+
function fo(e, t) {
|
|
34
|
+
t === void 0 && (t = ho);
|
|
73
35
|
var l = null;
|
|
74
|
-
function
|
|
75
|
-
for (var
|
|
76
|
-
r
|
|
77
|
-
if (l && l.lastThis === this && t(
|
|
36
|
+
function o() {
|
|
37
|
+
for (var a = [], r = 0; r < arguments.length; r++)
|
|
38
|
+
a[r] = arguments[r];
|
|
39
|
+
if (l && l.lastThis === this && t(a, l.lastArgs))
|
|
78
40
|
return l.lastResult;
|
|
79
|
-
var s = e.apply(this,
|
|
41
|
+
var s = e.apply(this, a);
|
|
80
42
|
return l = {
|
|
81
43
|
lastResult: s,
|
|
82
|
-
lastArgs:
|
|
44
|
+
lastArgs: a,
|
|
83
45
|
lastThis: this
|
|
84
46
|
}, s;
|
|
85
47
|
}
|
|
86
|
-
return
|
|
48
|
+
return o.clear = function() {
|
|
87
49
|
l = null;
|
|
88
|
-
},
|
|
50
|
+
}, o;
|
|
89
51
|
}
|
|
90
|
-
const
|
|
52
|
+
const mo = () => {
|
|
91
53
|
const t = at().proxy.$props;
|
|
92
54
|
return T(() => {
|
|
93
|
-
const l = (
|
|
94
|
-
return t.perfMode ?
|
|
55
|
+
const l = (o, a, r) => ({});
|
|
56
|
+
return t.perfMode ? oo(l) : fo(l);
|
|
95
57
|
});
|
|
96
|
-
},
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
},
|
|
58
|
+
}, Vt = 50, kt = "itemRendered", Kt = "scroll", je = "forward", ht = "backward", Te = "auto", dl = "smart", ft = "start", De = "center", mt = "end", vt = "horizontal", ul = "vertical", hl = "rtl", gt = "negative", fl = "positive-ascending", ml = "positive-descending", vo = {
|
|
59
|
+
[vt]: "left",
|
|
60
|
+
[ul]: "top"
|
|
61
|
+
}, go = 20, yt = pe({
|
|
100
62
|
type: I([Number, Function]),
|
|
101
63
|
required: !0
|
|
102
|
-
}),
|
|
64
|
+
}), wt = pe({
|
|
103
65
|
type: Number
|
|
104
|
-
}),
|
|
66
|
+
}), bt = pe({
|
|
105
67
|
type: Number,
|
|
106
68
|
default: 2
|
|
107
|
-
}),
|
|
69
|
+
}), yo = pe({
|
|
108
70
|
type: String,
|
|
109
71
|
values: ["ltr", "rtl"],
|
|
110
72
|
default: "ltr"
|
|
111
|
-
}),
|
|
73
|
+
}), St = pe({
|
|
112
74
|
type: Number,
|
|
113
75
|
default: 0
|
|
114
|
-
}),
|
|
76
|
+
}), nt = pe({
|
|
115
77
|
type: Number,
|
|
116
78
|
required: !0
|
|
117
|
-
}),
|
|
79
|
+
}), vl = pe({
|
|
118
80
|
type: String,
|
|
119
81
|
values: ["horizontal", "vertical"],
|
|
120
|
-
default:
|
|
121
|
-
}),
|
|
82
|
+
default: ul
|
|
83
|
+
}), gl = se({
|
|
122
84
|
className: {
|
|
123
85
|
type: String,
|
|
124
86
|
default: ""
|
|
@@ -129,9 +91,9 @@ const Rn = () => {
|
|
|
129
91
|
},
|
|
130
92
|
data: {
|
|
131
93
|
type: I(Array),
|
|
132
|
-
default: () =>
|
|
94
|
+
default: () => al([])
|
|
133
95
|
},
|
|
134
|
-
direction:
|
|
96
|
+
direction: yo,
|
|
135
97
|
height: {
|
|
136
98
|
type: [String, Number],
|
|
137
99
|
required: !0
|
|
@@ -159,24 +121,24 @@ const Rn = () => {
|
|
|
159
121
|
type: Boolean,
|
|
160
122
|
default: !1
|
|
161
123
|
}
|
|
162
|
-
}),
|
|
163
|
-
cache:
|
|
164
|
-
estimatedItemSize:
|
|
165
|
-
layout:
|
|
166
|
-
initScrollOffset:
|
|
167
|
-
total:
|
|
168
|
-
itemSize:
|
|
169
|
-
...
|
|
170
|
-
}),
|
|
124
|
+
}), wo = se({
|
|
125
|
+
cache: bt,
|
|
126
|
+
estimatedItemSize: wt,
|
|
127
|
+
layout: vl,
|
|
128
|
+
initScrollOffset: St,
|
|
129
|
+
total: nt,
|
|
130
|
+
itemSize: yt,
|
|
131
|
+
...gl
|
|
132
|
+
}), xt = {
|
|
171
133
|
type: Number,
|
|
172
134
|
default: 6
|
|
173
|
-
},
|
|
174
|
-
columnCache:
|
|
175
|
-
columnWidth:
|
|
176
|
-
estimatedColumnWidth:
|
|
177
|
-
estimatedRowHeight:
|
|
178
|
-
initScrollLeft:
|
|
179
|
-
initScrollTop:
|
|
135
|
+
}, yl = { type: Number, default: 0 }, wl = { type: Number, default: 2 }, Ce = se({
|
|
136
|
+
columnCache: bt,
|
|
137
|
+
columnWidth: yt,
|
|
138
|
+
estimatedColumnWidth: wt,
|
|
139
|
+
estimatedRowHeight: wt,
|
|
140
|
+
initScrollLeft: St,
|
|
141
|
+
initScrollTop: St,
|
|
180
142
|
itemKey: {
|
|
181
143
|
type: I(Function),
|
|
182
144
|
default: ({
|
|
@@ -184,21 +146,21 @@ const Rn = () => {
|
|
|
184
146
|
rowIndex: t
|
|
185
147
|
}) => `${t}:${e}`
|
|
186
148
|
},
|
|
187
|
-
rowCache:
|
|
188
|
-
rowHeight:
|
|
189
|
-
totalColumn:
|
|
190
|
-
totalRow:
|
|
191
|
-
hScrollbarSize:
|
|
192
|
-
vScrollbarSize:
|
|
193
|
-
scrollbarStartGap:
|
|
194
|
-
scrollbarEndGap:
|
|
149
|
+
rowCache: bt,
|
|
150
|
+
rowHeight: yt,
|
|
151
|
+
totalColumn: nt,
|
|
152
|
+
totalRow: nt,
|
|
153
|
+
hScrollbarSize: xt,
|
|
154
|
+
vScrollbarSize: xt,
|
|
155
|
+
scrollbarStartGap: yl,
|
|
156
|
+
scrollbarEndGap: wl,
|
|
195
157
|
role: String,
|
|
196
|
-
...
|
|
197
|
-
}),
|
|
158
|
+
...gl
|
|
159
|
+
}), bl = se({
|
|
198
160
|
alwaysOn: Boolean,
|
|
199
161
|
class: String,
|
|
200
|
-
layout:
|
|
201
|
-
total:
|
|
162
|
+
layout: vl,
|
|
163
|
+
total: nt,
|
|
202
164
|
ratio: {
|
|
203
165
|
type: Number,
|
|
204
166
|
required: !0
|
|
@@ -211,121 +173,121 @@ const Rn = () => {
|
|
|
211
173
|
type: Number,
|
|
212
174
|
required: !0
|
|
213
175
|
},
|
|
214
|
-
scrollbarSize:
|
|
215
|
-
startGap:
|
|
216
|
-
endGap:
|
|
176
|
+
scrollbarSize: xt,
|
|
177
|
+
startGap: yl,
|
|
178
|
+
endGap: wl,
|
|
217
179
|
visible: Boolean
|
|
218
|
-
}), Qe = (e, t) => e < t ?
|
|
180
|
+
}), Qe = (e, t) => e < t ? je : ht, jt = (e) => e === hl;
|
|
219
181
|
let ze = null;
|
|
220
|
-
function
|
|
182
|
+
function Bt(e = !1) {
|
|
221
183
|
if (ze === null || e) {
|
|
222
184
|
const t = document.createElement("div"), l = t.style;
|
|
223
185
|
l.width = "50px", l.height = "50px", l.overflow = "scroll", l.direction = "rtl";
|
|
224
|
-
const
|
|
225
|
-
return
|
|
186
|
+
const o = document.createElement("div"), a = o.style;
|
|
187
|
+
return a.width = "100px", a.height = "100px", t.appendChild(o), document.body.appendChild(t), t.scrollLeft > 0 ? ze = ml : (t.scrollLeft = 1, t.scrollLeft === 0 ? ze = gt : ze = fl), document.body.removeChild(t), ze;
|
|
226
188
|
}
|
|
227
189
|
return ze;
|
|
228
190
|
}
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
return
|
|
191
|
+
function bo({ move: e, size: t, bar: l }, o) {
|
|
192
|
+
const a = {}, r = `translate${l.axis}(${e}px)`;
|
|
193
|
+
return a[l.size] = t, a.transform = r, a.msTransform = r, a.webkitTransform = r, o === "horizontal" ? a.height = "100%" : a.width = "100%", a;
|
|
232
194
|
}
|
|
233
|
-
const
|
|
195
|
+
const Ut = we({
|
|
234
196
|
name: "ElVirtualScrollBar",
|
|
235
|
-
props:
|
|
197
|
+
props: bl,
|
|
236
198
|
emits: ["scroll", "start-move", "stop-move"],
|
|
237
199
|
setup(e, { emit: t }) {
|
|
238
|
-
const l = T(() => e.startGap + e.endGap),
|
|
200
|
+
const l = T(() => e.startGap + e.endGap), o = _e("virtual-scrollbar"), a = _e("scrollbar"), r = V(), s = V();
|
|
239
201
|
let i = null, v = null;
|
|
240
|
-
const f =
|
|
202
|
+
const f = ql({
|
|
241
203
|
isDragging: !1,
|
|
242
204
|
traveled: 0
|
|
243
|
-
}), d = T(() =>
|
|
205
|
+
}), d = T(() => kl[e.layout]), w = T(() => e.clientSize - n(l)), b = T(() => ({
|
|
244
206
|
position: "absolute",
|
|
245
|
-
width: `${
|
|
246
|
-
height: `${
|
|
247
|
-
[
|
|
207
|
+
width: `${vt === e.layout ? w.value : e.scrollbarSize}px`,
|
|
208
|
+
height: `${vt === e.layout ? e.scrollbarSize : w.value}px`,
|
|
209
|
+
[vo[e.layout]]: "2px",
|
|
248
210
|
right: "2px",
|
|
249
211
|
bottom: "2px",
|
|
250
212
|
borderRadius: "4px"
|
|
251
213
|
})), g = T(() => {
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
214
|
+
const x = e.ratio, O = e.clientSize;
|
|
215
|
+
if (x >= 100)
|
|
254
216
|
return Number.POSITIVE_INFINITY;
|
|
255
|
-
if (
|
|
256
|
-
return
|
|
217
|
+
if (x >= 50)
|
|
218
|
+
return x * O / 100;
|
|
257
219
|
const D = O / 3;
|
|
258
|
-
return Math.floor(Math.min(Math.max(
|
|
220
|
+
return Math.floor(Math.min(Math.max(x * O, go), D));
|
|
259
221
|
}), y = T(() => {
|
|
260
222
|
if (!Number.isFinite(g.value))
|
|
261
223
|
return {
|
|
262
224
|
display: "none"
|
|
263
225
|
};
|
|
264
|
-
const
|
|
265
|
-
return
|
|
226
|
+
const x = `${g.value}px`;
|
|
227
|
+
return bo({
|
|
266
228
|
bar: d.value,
|
|
267
|
-
size:
|
|
229
|
+
size: x,
|
|
268
230
|
move: f.traveled
|
|
269
231
|
}, e.layout);
|
|
270
|
-
}), u = T(() => Math.floor(e.clientSize - g.value -
|
|
271
|
-
window.addEventListener("mousemove",
|
|
272
|
-
const
|
|
273
|
-
|
|
232
|
+
}), u = T(() => Math.floor(e.clientSize - g.value - n(l))), c = () => {
|
|
233
|
+
window.addEventListener("mousemove", H), window.addEventListener("mouseup", S);
|
|
234
|
+
const x = n(s);
|
|
235
|
+
x && (v = document.onselectstart, document.onselectstart = () => !1, x.addEventListener("touchmove", H, { passive: !0 }), x.addEventListener("touchend", S));
|
|
274
236
|
}, h = () => {
|
|
275
|
-
window.removeEventListener("mousemove",
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
}, m = (
|
|
279
|
-
|
|
237
|
+
window.removeEventListener("mousemove", H), window.removeEventListener("mouseup", S), document.onselectstart = v, v = null;
|
|
238
|
+
const x = n(s);
|
|
239
|
+
x && (x.removeEventListener("touchmove", H), x.removeEventListener("touchend", S));
|
|
240
|
+
}, m = (x) => {
|
|
241
|
+
x.stopImmediatePropagation(), !(x.ctrlKey || [1, 2].includes(x.button)) && (f.isDragging = !0, f[d.value.axis] = x.currentTarget[d.value.offset] - (x[d.value.client] - x.currentTarget.getBoundingClientRect()[d.value.direction]), t("start-move"), c());
|
|
280
242
|
}, S = () => {
|
|
281
243
|
f.isDragging = !1, f[d.value.axis] = 0, t("stop-move"), h();
|
|
282
|
-
},
|
|
244
|
+
}, H = (x) => {
|
|
283
245
|
const { isDragging: O } = f;
|
|
284
|
-
if (!O || !s.value || !
|
|
246
|
+
if (!O || !s.value || !r.value)
|
|
285
247
|
return;
|
|
286
248
|
const D = f[d.value.axis];
|
|
287
249
|
if (!D)
|
|
288
250
|
return;
|
|
289
|
-
|
|
290
|
-
const F = (
|
|
291
|
-
i =
|
|
251
|
+
sl(i);
|
|
252
|
+
const F = (r.value.getBoundingClientRect()[d.value.direction] - x[d.value.client]) * -1, R = s.value[d.value.offset] - D, A = F - R;
|
|
253
|
+
i = il(() => {
|
|
292
254
|
f.traveled = Math.max(e.startGap, Math.min(A, u.value)), t("scroll", A, u.value);
|
|
293
255
|
});
|
|
294
|
-
}, M = (
|
|
295
|
-
const O = Math.abs(
|
|
256
|
+
}, M = (x) => {
|
|
257
|
+
const O = Math.abs(x.target.getBoundingClientRect()[d.value.direction] - x[d.value.client]), D = s.value[d.value.offset] / 2, F = O - D;
|
|
296
258
|
f.traveled = Math.max(0, Math.min(F, u.value)), t("scroll", F, u.value);
|
|
297
259
|
};
|
|
298
|
-
return Me(() => e.scrollFrom, (
|
|
299
|
-
f.isDragging || (f.traveled = Math.ceil(
|
|
300
|
-
}),
|
|
260
|
+
return Me(() => e.scrollFrom, (x) => {
|
|
261
|
+
f.isDragging || (f.traveled = Math.ceil(x * u.value));
|
|
262
|
+
}), nl(() => {
|
|
301
263
|
h();
|
|
302
|
-
}), () =>
|
|
264
|
+
}), () => he("div", {
|
|
303
265
|
role: "presentation",
|
|
304
|
-
ref:
|
|
266
|
+
ref: r,
|
|
305
267
|
class: [
|
|
306
|
-
|
|
268
|
+
o.b(),
|
|
307
269
|
e.class,
|
|
308
270
|
(e.alwaysOn || f.isDragging) && "always-on"
|
|
309
271
|
],
|
|
310
272
|
style: b.value,
|
|
311
|
-
onMousedown:
|
|
273
|
+
onMousedown: Yl(M, ["stop", "prevent"]),
|
|
312
274
|
onTouchstartPrevent: m
|
|
313
|
-
},
|
|
275
|
+
}, he("div", {
|
|
314
276
|
ref: s,
|
|
315
|
-
class:
|
|
277
|
+
class: a.e("thumb"),
|
|
316
278
|
style: y.value,
|
|
317
279
|
onMousedown: m
|
|
318
280
|
}, []));
|
|
319
281
|
}
|
|
320
282
|
});
|
|
321
|
-
var
|
|
322
|
-
const
|
|
283
|
+
var Ue = /* @__PURE__ */ ((e) => (e.ASC = "asc", e.DESC = "desc", e))(Ue || {}), qe = /* @__PURE__ */ ((e) => (e.CENTER = "center", e.RIGHT = "right", e))(qe || {}), Sl = /* @__PURE__ */ ((e) => (e.LEFT = "left", e.RIGHT = "right", e))(Sl || {});
|
|
284
|
+
const Rt = {
|
|
323
285
|
asc: "desc",
|
|
324
286
|
desc: "asc"
|
|
325
287
|
/* ASC */
|
|
326
|
-
},
|
|
327
|
-
var
|
|
328
|
-
const
|
|
288
|
+
}, Ye = Symbol("placeholder"), So = (e, t, l) => {
|
|
289
|
+
var o;
|
|
290
|
+
const a = {
|
|
329
291
|
flexGrow: 0,
|
|
330
292
|
flexShrink: 0,
|
|
331
293
|
...l ? {} : {
|
|
@@ -333,38 +295,38 @@ const Et = {
|
|
|
333
295
|
flexShrink: e.flexShrink || 1
|
|
334
296
|
}
|
|
335
297
|
};
|
|
336
|
-
l || (
|
|
337
|
-
const
|
|
338
|
-
...(
|
|
339
|
-
...
|
|
298
|
+
l || (a.flexShrink = 1);
|
|
299
|
+
const r = {
|
|
300
|
+
...(o = e.style) != null ? o : {},
|
|
301
|
+
...a,
|
|
340
302
|
flexBasis: "auto",
|
|
341
303
|
width: e.width
|
|
342
304
|
};
|
|
343
|
-
return t || (e.maxWidth && (
|
|
305
|
+
return t || (e.maxWidth && (r.maxWidth = e.maxWidth), e.minWidth && (r.minWidth = e.minWidth)), r;
|
|
344
306
|
};
|
|
345
|
-
function
|
|
346
|
-
const
|
|
307
|
+
function xo(e, t, l) {
|
|
308
|
+
const o = T(() => n(t).map((c, h) => {
|
|
347
309
|
var m, S;
|
|
348
310
|
return {
|
|
349
311
|
...c,
|
|
350
312
|
key: (S = (m = c.key) != null ? m : c.dataKey) != null ? S : h
|
|
351
313
|
};
|
|
352
|
-
})),
|
|
314
|
+
})), a = T(() => n(o).filter((c) => !c.hidden)), r = T(() => n(a).filter((c) => c.fixed === "left" || c.fixed === !0)), s = T(() => n(a).filter((c) => c.fixed === "right")), i = T(() => n(a).filter((c) => !c.fixed)), v = T(() => {
|
|
353
315
|
const c = [];
|
|
354
|
-
return
|
|
316
|
+
return n(r).forEach((h) => {
|
|
355
317
|
c.push({
|
|
356
318
|
...h,
|
|
357
|
-
placeholderSign:
|
|
319
|
+
placeholderSign: Ye
|
|
358
320
|
});
|
|
359
|
-
}),
|
|
321
|
+
}), n(i).forEach((h) => {
|
|
360
322
|
c.push(h);
|
|
361
|
-
}),
|
|
323
|
+
}), n(s).forEach((h) => {
|
|
362
324
|
c.push({
|
|
363
325
|
...h,
|
|
364
|
-
placeholderSign:
|
|
326
|
+
placeholderSign: Ye
|
|
365
327
|
});
|
|
366
328
|
}), c;
|
|
367
|
-
}), f = T(() =>
|
|
329
|
+
}), f = T(() => n(r).length || n(s).length), d = T(() => n(o).reduce((c, h) => (c[h.key] = So(h, n(l), e.fixed), c), {})), w = T(() => n(a).reduce((c, h) => c + h.width, 0)), b = (c) => n(o).find((h) => h.key === c), g = (c) => n(d)[c], y = (c, h) => {
|
|
368
330
|
c.width = h;
|
|
369
331
|
};
|
|
370
332
|
function u(c) {
|
|
@@ -372,64 +334,64 @@ function Hn(e, t, l) {
|
|
|
372
334
|
const { key: m } = c.currentTarget.dataset;
|
|
373
335
|
if (!m)
|
|
374
336
|
return;
|
|
375
|
-
const { sortState: S, sortBy:
|
|
376
|
-
let M =
|
|
377
|
-
|
|
337
|
+
const { sortState: S, sortBy: H } = e;
|
|
338
|
+
let M = Ue.ASC;
|
|
339
|
+
Et(S) ? M = Rt[S[m]] : M = Rt[H.order], (h = e.onColumnSort) == null || h.call(e, { column: b(m), key: m, order: M });
|
|
378
340
|
}
|
|
379
341
|
return {
|
|
380
|
-
columns:
|
|
342
|
+
columns: o,
|
|
381
343
|
columnsStyles: d,
|
|
382
344
|
columnsTotalWidth: w,
|
|
383
|
-
fixedColumnsOnLeft:
|
|
345
|
+
fixedColumnsOnLeft: r,
|
|
384
346
|
fixedColumnsOnRight: s,
|
|
385
347
|
hasFixedColumns: f,
|
|
386
348
|
mainColumns: v,
|
|
387
349
|
normalColumns: i,
|
|
388
|
-
visibleColumns:
|
|
350
|
+
visibleColumns: a,
|
|
389
351
|
getColumn: b,
|
|
390
352
|
getColumnStyle: g,
|
|
391
353
|
updateColumnWidth: y,
|
|
392
354
|
onColumnSorted: u
|
|
393
355
|
};
|
|
394
356
|
}
|
|
395
|
-
const
|
|
357
|
+
const Ro = (e, {
|
|
396
358
|
mainTableRef: t,
|
|
397
359
|
leftTableRef: l,
|
|
398
|
-
rightTableRef:
|
|
399
|
-
onMaybeEndReached:
|
|
360
|
+
rightTableRef: o,
|
|
361
|
+
onMaybeEndReached: a
|
|
400
362
|
}) => {
|
|
401
|
-
const
|
|
363
|
+
const r = V({ scrollLeft: 0, scrollTop: 0 });
|
|
402
364
|
function s(g) {
|
|
403
365
|
var y, u, c;
|
|
404
366
|
const { scrollTop: h } = g;
|
|
405
|
-
(y = t.value) == null || y.scrollTo(g), (u = l.value) == null || u.scrollToTop(h), (c =
|
|
367
|
+
(y = t.value) == null || y.scrollTo(g), (u = l.value) == null || u.scrollToTop(h), (c = o.value) == null || c.scrollToTop(h);
|
|
406
368
|
}
|
|
407
369
|
function i(g) {
|
|
408
|
-
|
|
370
|
+
r.value = g, s(g);
|
|
409
371
|
}
|
|
410
372
|
function v(g) {
|
|
411
|
-
|
|
373
|
+
r.value.scrollTop = g, s(n(r));
|
|
412
374
|
}
|
|
413
375
|
function f(g) {
|
|
414
376
|
var y, u;
|
|
415
|
-
|
|
377
|
+
r.value.scrollLeft = g, (u = (y = t.value) == null ? void 0 : y.scrollTo) == null || u.call(y, n(r));
|
|
416
378
|
}
|
|
417
379
|
function d(g) {
|
|
418
380
|
var y;
|
|
419
381
|
i(g), (y = e.onScroll) == null || y.call(e, g);
|
|
420
382
|
}
|
|
421
383
|
function w({ scrollTop: g }) {
|
|
422
|
-
const { scrollTop: y } =
|
|
384
|
+
const { scrollTop: y } = n(r);
|
|
423
385
|
g !== y && v(g);
|
|
424
386
|
}
|
|
425
387
|
function b(g, y = "auto") {
|
|
426
388
|
var u;
|
|
427
389
|
(u = t.value) == null || u.scrollToRow(g, y);
|
|
428
390
|
}
|
|
429
|
-
return Me(() =>
|
|
430
|
-
g > y &&
|
|
391
|
+
return Me(() => n(r).scrollTop, (g, y) => {
|
|
392
|
+
g > y && a();
|
|
431
393
|
}), {
|
|
432
|
-
scrollPos:
|
|
394
|
+
scrollPos: r,
|
|
433
395
|
scrollTo: i,
|
|
434
396
|
scrollToLeft: f,
|
|
435
397
|
scrollToTop: v,
|
|
@@ -437,59 +399,59 @@ const Mn = (e, {
|
|
|
437
399
|
onScroll: d,
|
|
438
400
|
onVerticalScroll: w
|
|
439
401
|
};
|
|
440
|
-
},
|
|
402
|
+
}, To = (e, {
|
|
441
403
|
mainTableRef: t,
|
|
442
404
|
leftTableRef: l,
|
|
443
|
-
rightTableRef:
|
|
444
|
-
tableInstance:
|
|
445
|
-
ns:
|
|
405
|
+
rightTableRef: o,
|
|
406
|
+
tableInstance: a,
|
|
407
|
+
ns: r,
|
|
446
408
|
isScrolling: s
|
|
447
409
|
}) => {
|
|
448
410
|
const i = at(), { emit: v } = i, f = Le(!1), d = V(e.defaultExpandedRowKeys || []), w = V(-1), b = Le(null), g = V({}), y = V({}), u = Le({}), c = Le({}), h = Le({}), m = T(() => Y(e.estimatedRowHeight));
|
|
449
|
-
function S(
|
|
411
|
+
function S(R) {
|
|
450
412
|
var A;
|
|
451
|
-
(A = e.onRowsRendered) == null || A.call(e,
|
|
413
|
+
(A = e.onRowsRendered) == null || A.call(e, R), R.rowCacheEnd > n(w) && (w.value = R.rowCacheEnd);
|
|
452
414
|
}
|
|
453
|
-
function
|
|
415
|
+
function H({ hovered: R, rowKey: A }) {
|
|
454
416
|
if (s.value)
|
|
455
417
|
return;
|
|
456
|
-
|
|
457
|
-
|
|
418
|
+
a.vnode.el.querySelectorAll(`[rowkey="${String(A)}"]`).forEach((K) => {
|
|
419
|
+
R ? K.classList.add(r.is("hovered")) : K.classList.remove(r.is("hovered"));
|
|
458
420
|
});
|
|
459
421
|
}
|
|
460
422
|
function M({
|
|
461
|
-
expanded:
|
|
423
|
+
expanded: R,
|
|
462
424
|
rowData: A,
|
|
463
425
|
rowIndex: G,
|
|
464
426
|
rowKey: P
|
|
465
427
|
}) {
|
|
466
428
|
var K, B;
|
|
467
|
-
const k = [...
|
|
468
|
-
|
|
469
|
-
expanded:
|
|
429
|
+
const k = [...n(d)], U = k.indexOf(P);
|
|
430
|
+
R ? U === -1 && k.push(P) : U > -1 && k.splice(U, 1), d.value = k, v("update:expandedRowKeys", k), (K = e.onRowExpand) == null || K.call(e, {
|
|
431
|
+
expanded: R,
|
|
470
432
|
rowData: A,
|
|
471
433
|
rowIndex: G,
|
|
472
434
|
rowKey: P
|
|
473
435
|
}), (B = e.onExpandedRowsChange) == null || B.call(e, k);
|
|
474
436
|
}
|
|
475
|
-
const
|
|
476
|
-
var
|
|
477
|
-
f.value = !0, g.value = { ...
|
|
437
|
+
const x = to(() => {
|
|
438
|
+
var R, A, G, P;
|
|
439
|
+
f.value = !0, g.value = { ...n(g), ...n(y) }, O(n(b), !1), y.value = {}, b.value = null, (R = t.value) == null || R.forceUpdate(), (A = l.value) == null || A.forceUpdate(), (G = o.value) == null || G.forceUpdate(), (P = i.proxy) == null || P.$forceUpdate(), f.value = !1;
|
|
478
440
|
}, 0);
|
|
479
|
-
function O(
|
|
480
|
-
|
|
481
|
-
const P =
|
|
482
|
-
P && P.resetAfterRowIndex(
|
|
441
|
+
function O(R, A = !1) {
|
|
442
|
+
n(m) && [t, l, o].forEach((G) => {
|
|
443
|
+
const P = n(G);
|
|
444
|
+
P && P.resetAfterRowIndex(R, A);
|
|
483
445
|
});
|
|
484
446
|
}
|
|
485
|
-
function D(
|
|
486
|
-
const P =
|
|
487
|
-
(P === null || P > G) && (b.value = G), y.value[
|
|
447
|
+
function D(R, A, G) {
|
|
448
|
+
const P = n(b);
|
|
449
|
+
(P === null || P > G) && (b.value = G), y.value[R] = A;
|
|
488
450
|
}
|
|
489
|
-
function F({ rowKey:
|
|
490
|
-
P ? P ===
|
|
491
|
-
const K = Math.max(...[u, h, c].map((B) => B.value[
|
|
492
|
-
|
|
451
|
+
function F({ rowKey: R, height: A, rowIndex: G }, P) {
|
|
452
|
+
P ? P === Sl.RIGHT ? h.value[R] = A : u.value[R] = A : c.value[R] = A;
|
|
453
|
+
const K = Math.max(...[u, h, c].map((B) => B.value[R] || 0));
|
|
454
|
+
n(g)[R] !== K && (D(R, K, G), x());
|
|
493
455
|
}
|
|
494
456
|
return {
|
|
495
457
|
expandedRowKeys: d,
|
|
@@ -499,13 +461,13 @@ const Mn = (e, {
|
|
|
499
461
|
rowHeights: g,
|
|
500
462
|
resetAfterIndex: O,
|
|
501
463
|
onRowExpanded: M,
|
|
502
|
-
onRowHovered:
|
|
464
|
+
onRowHovered: H,
|
|
503
465
|
onRowsRendered: S,
|
|
504
466
|
onRowHeightChange: F
|
|
505
467
|
};
|
|
506
|
-
},
|
|
507
|
-
const
|
|
508
|
-
const i = {}, { data: v, rowKey: f } = e, d =
|
|
468
|
+
}, Eo = (e, { expandedRowKeys: t, lastRenderedRowIndex: l, resetAfterIndex: o }) => {
|
|
469
|
+
const a = V({}), r = T(() => {
|
|
470
|
+
const i = {}, { data: v, rowKey: f } = e, d = n(t);
|
|
509
471
|
if (!d || !d.length)
|
|
510
472
|
return v;
|
|
511
473
|
const w = [], b = /* @__PURE__ */ new Set();
|
|
@@ -513,60 +475,60 @@ const Mn = (e, {
|
|
|
513
475
|
let g = v.slice();
|
|
514
476
|
for (g.forEach((y) => i[y[f]] = 0); g.length > 0; ) {
|
|
515
477
|
const y = g.shift();
|
|
516
|
-
w.push(y), b.has(y[f]) &&
|
|
478
|
+
w.push(y), b.has(y[f]) && $e(y.children) && y.children.length > 0 && (g = [...y.children, ...g], y.children.forEach((u) => i[u[f]] = i[y[f]] + 1));
|
|
517
479
|
}
|
|
518
|
-
return
|
|
480
|
+
return a.value = i, w;
|
|
519
481
|
}), s = T(() => {
|
|
520
482
|
const { data: i, expandColumnKey: v } = e;
|
|
521
|
-
return v ?
|
|
483
|
+
return v ? n(r) : i;
|
|
522
484
|
});
|
|
523
485
|
return Me(s, (i, v) => {
|
|
524
|
-
i !== v && (l.value = -1,
|
|
486
|
+
i !== v && (l.value = -1, o(0, !0));
|
|
525
487
|
}), {
|
|
526
488
|
data: s,
|
|
527
|
-
depthMap:
|
|
489
|
+
depthMap: a
|
|
528
490
|
};
|
|
529
|
-
},
|
|
491
|
+
}, Co = (e, t) => e + t, tt = (e) => $e(e) ? e.reduce(Co, 0) : e, He = (e, t, l = {}) => Be(e) ? e(t) : e ?? l, ye = (e) => (["width", "maxWidth", "minWidth", "height"].forEach((t) => {
|
|
530
492
|
e[t] = et(e[t]);
|
|
531
|
-
}), e),
|
|
493
|
+
}), e), xl = (e) => Ie(e) ? (t) => he(e, t) : e, _o = (e, {
|
|
532
494
|
columnsTotalWidth: t,
|
|
533
495
|
rowsHeight: l,
|
|
534
|
-
fixedColumnsOnLeft:
|
|
535
|
-
fixedColumnsOnRight:
|
|
496
|
+
fixedColumnsOnLeft: o,
|
|
497
|
+
fixedColumnsOnRight: a
|
|
536
498
|
}) => {
|
|
537
|
-
const
|
|
538
|
-
const { fixed: m, width: S, vScrollbarSize:
|
|
539
|
-
return m ? Math.max(Math.round(
|
|
540
|
-
}), s = T(() =>
|
|
541
|
-
const { height: m = 0, maxHeight: S = 0, footerHeight:
|
|
499
|
+
const r = T(() => {
|
|
500
|
+
const { fixed: m, width: S, vScrollbarSize: H } = e, M = S - H;
|
|
501
|
+
return m ? Math.max(Math.round(n(t)), M) : M;
|
|
502
|
+
}), s = T(() => n(r) + e.vScrollbarSize), i = T(() => {
|
|
503
|
+
const { height: m = 0, maxHeight: S = 0, footerHeight: H, hScrollbarSize: M } = e;
|
|
542
504
|
if (S > 0) {
|
|
543
|
-
const
|
|
544
|
-
return Math.min(F, S -
|
|
505
|
+
const x = n(g), O = n(l), F = n(b) + x + O + M;
|
|
506
|
+
return Math.min(F, S - H);
|
|
545
507
|
}
|
|
546
|
-
return m -
|
|
508
|
+
return m - H;
|
|
547
509
|
}), v = T(() => {
|
|
548
|
-
const { maxHeight: m } = e, S =
|
|
510
|
+
const { maxHeight: m } = e, S = n(i);
|
|
549
511
|
if (Y(m) && m > 0)
|
|
550
512
|
return S;
|
|
551
|
-
const
|
|
552
|
-
return Math.min(S,
|
|
553
|
-
}), f = (m) => m.width, d = T(() => tt(o
|
|
513
|
+
const H = n(l) + n(b) + n(g);
|
|
514
|
+
return Math.min(S, H);
|
|
515
|
+
}), f = (m) => m.width, d = T(() => tt(n(o).map(f))), w = T(() => tt(n(a).map(f))), b = T(() => tt(e.headerHeight)), g = T(() => {
|
|
554
516
|
var m;
|
|
555
517
|
return (((m = e.fixedData) == null ? void 0 : m.length) || 0) * e.rowHeight;
|
|
556
|
-
}), y = T(() =>
|
|
557
|
-
const { style: m = {}, height: S, width:
|
|
558
|
-
return
|
|
518
|
+
}), y = T(() => n(i) - n(b) - n(g)), u = T(() => {
|
|
519
|
+
const { style: m = {}, height: S, width: H } = e;
|
|
520
|
+
return ye({
|
|
559
521
|
...m,
|
|
560
522
|
height: S,
|
|
561
|
-
width:
|
|
523
|
+
width: H
|
|
562
524
|
});
|
|
563
|
-
}), c = T(() =>
|
|
564
|
-
top: et(
|
|
525
|
+
}), c = T(() => ye({ height: e.footerHeight })), h = T(() => ({
|
|
526
|
+
top: et(n(b)),
|
|
565
527
|
bottom: et(e.footerHeight),
|
|
566
528
|
width: et(e.width)
|
|
567
529
|
}));
|
|
568
530
|
return {
|
|
569
|
-
bodyWidth:
|
|
531
|
+
bodyWidth: r,
|
|
570
532
|
fixedTableHeight: v,
|
|
571
533
|
mainTableHeight: i,
|
|
572
534
|
leftTableWidth: d,
|
|
@@ -579,17 +541,17 @@ const Mn = (e, {
|
|
|
579
541
|
headerHeight: b
|
|
580
542
|
};
|
|
581
543
|
};
|
|
582
|
-
function
|
|
583
|
-
const t = V(), l = V(),
|
|
584
|
-
columns:
|
|
585
|
-
columnsStyles:
|
|
544
|
+
function Ho(e) {
|
|
545
|
+
const t = V(), l = V(), o = V(), {
|
|
546
|
+
columns: a,
|
|
547
|
+
columnsStyles: r,
|
|
586
548
|
columnsTotalWidth: s,
|
|
587
549
|
fixedColumnsOnLeft: i,
|
|
588
550
|
fixedColumnsOnRight: v,
|
|
589
551
|
hasFixedColumns: f,
|
|
590
552
|
mainColumns: d,
|
|
591
553
|
onColumnSorted: w
|
|
592
|
-
} =
|
|
554
|
+
} = xo(e, Dt(e, "columns"), Dt(e, "fixed")), {
|
|
593
555
|
scrollTo: b,
|
|
594
556
|
scrollToLeft: g,
|
|
595
557
|
scrollToTop: y,
|
|
@@ -597,99 +559,99 @@ function zn(e) {
|
|
|
597
559
|
onScroll: c,
|
|
598
560
|
onVerticalScroll: h,
|
|
599
561
|
scrollPos: m
|
|
600
|
-
} =
|
|
562
|
+
} = Ro(e, {
|
|
601
563
|
mainTableRef: t,
|
|
602
564
|
leftTableRef: l,
|
|
603
|
-
rightTableRef:
|
|
604
|
-
onMaybeEndReached:
|
|
605
|
-
}), S =
|
|
606
|
-
expandedRowKeys:
|
|
565
|
+
rightTableRef: o,
|
|
566
|
+
onMaybeEndReached: Ve
|
|
567
|
+
}), S = _e("table-v2"), H = at(), M = Le(!1), {
|
|
568
|
+
expandedRowKeys: x,
|
|
607
569
|
lastRenderedRowIndex: O,
|
|
608
570
|
isDynamic: D,
|
|
609
571
|
isResetting: F,
|
|
610
|
-
rowHeights:
|
|
572
|
+
rowHeights: R,
|
|
611
573
|
resetAfterIndex: A,
|
|
612
574
|
onRowExpanded: G,
|
|
613
575
|
onRowHeightChange: P,
|
|
614
576
|
onRowHovered: K,
|
|
615
577
|
onRowsRendered: B
|
|
616
|
-
} =
|
|
578
|
+
} = To(e, {
|
|
617
579
|
mainTableRef: t,
|
|
618
580
|
leftTableRef: l,
|
|
619
|
-
rightTableRef:
|
|
620
|
-
tableInstance:
|
|
581
|
+
rightTableRef: o,
|
|
582
|
+
tableInstance: H,
|
|
621
583
|
ns: S,
|
|
622
584
|
isScrolling: M
|
|
623
|
-
}), { data: k, depthMap: U } =
|
|
624
|
-
expandedRowKeys:
|
|
585
|
+
}), { data: k, depthMap: U } = Eo(e, {
|
|
586
|
+
expandedRowKeys: x,
|
|
625
587
|
lastRenderedRowIndex: O,
|
|
626
588
|
resetAfterIndex: A
|
|
627
|
-
}),
|
|
628
|
-
const { estimatedRowHeight: X, rowHeight: ee } = e,
|
|
629
|
-
return Y(X) ? Object.values(
|
|
589
|
+
}), ie = T(() => {
|
|
590
|
+
const { estimatedRowHeight: X, rowHeight: ee } = e, de = n(k);
|
|
591
|
+
return Y(X) ? Object.values(n(R)).reduce((E, C) => E + C, 0) : de.length * ee;
|
|
630
592
|
}), {
|
|
631
|
-
bodyWidth:
|
|
632
|
-
fixedTableHeight:
|
|
593
|
+
bodyWidth: be,
|
|
594
|
+
fixedTableHeight: ce,
|
|
633
595
|
mainTableHeight: oe,
|
|
634
|
-
leftTableWidth:
|
|
635
|
-
rightTableWidth:
|
|
636
|
-
headerWidth:
|
|
596
|
+
leftTableWidth: Se,
|
|
597
|
+
rightTableWidth: me,
|
|
598
|
+
headerWidth: ne,
|
|
637
599
|
windowHeight: te,
|
|
638
|
-
footerHeight:
|
|
600
|
+
footerHeight: re,
|
|
639
601
|
emptyStyle: Ae,
|
|
640
|
-
rootStyle:
|
|
641
|
-
headerHeight:
|
|
642
|
-
} =
|
|
602
|
+
rootStyle: ve,
|
|
603
|
+
headerHeight: ge
|
|
604
|
+
} = _o(e, {
|
|
643
605
|
columnsTotalWidth: s,
|
|
644
606
|
fixedColumnsOnLeft: i,
|
|
645
607
|
fixedColumnsOnRight: v,
|
|
646
|
-
rowsHeight:
|
|
647
|
-
}),
|
|
648
|
-
const X =
|
|
649
|
-
return
|
|
608
|
+
rowsHeight: ie
|
|
609
|
+
}), We = V(), Fe = T(() => {
|
|
610
|
+
const X = n(k).length === 0;
|
|
611
|
+
return $e(e.fixedData) ? e.fixedData.length === 0 && X : X;
|
|
650
612
|
});
|
|
651
|
-
function
|
|
652
|
-
const { estimatedRowHeight: ee, rowHeight:
|
|
653
|
-
return ee ?
|
|
613
|
+
function Ge(X) {
|
|
614
|
+
const { estimatedRowHeight: ee, rowHeight: de, rowKey: E } = e;
|
|
615
|
+
return ee ? n(R)[n(k)[X][E]] || ee : de;
|
|
654
616
|
}
|
|
655
|
-
function
|
|
617
|
+
function Ve() {
|
|
656
618
|
const { onEndReached: X } = e;
|
|
657
619
|
if (!X)
|
|
658
620
|
return;
|
|
659
|
-
const { scrollTop: ee } =
|
|
660
|
-
|
|
621
|
+
const { scrollTop: ee } = n(m), de = n(ie), E = n(te), C = de - (ee + E) + e.hScrollbarSize;
|
|
622
|
+
n(O) >= 0 && de === ee + n(oe) - n(ge) && X(C);
|
|
661
623
|
}
|
|
662
|
-
return Me(() => e.expandedRowKeys, (X) =>
|
|
624
|
+
return Me(() => e.expandedRowKeys, (X) => x.value = X, {
|
|
663
625
|
deep: !0
|
|
664
626
|
}), {
|
|
665
|
-
columns:
|
|
666
|
-
containerRef:
|
|
627
|
+
columns: a,
|
|
628
|
+
containerRef: We,
|
|
667
629
|
mainTableRef: t,
|
|
668
630
|
leftTableRef: l,
|
|
669
|
-
rightTableRef:
|
|
631
|
+
rightTableRef: o,
|
|
670
632
|
isDynamic: D,
|
|
671
633
|
isResetting: F,
|
|
672
634
|
isScrolling: M,
|
|
673
635
|
hasFixedColumns: f,
|
|
674
|
-
columnsStyles:
|
|
636
|
+
columnsStyles: r,
|
|
675
637
|
columnsTotalWidth: s,
|
|
676
638
|
data: k,
|
|
677
|
-
expandedRowKeys:
|
|
639
|
+
expandedRowKeys: x,
|
|
678
640
|
depthMap: U,
|
|
679
641
|
fixedColumnsOnLeft: i,
|
|
680
642
|
fixedColumnsOnRight: v,
|
|
681
643
|
mainColumns: d,
|
|
682
|
-
bodyWidth:
|
|
644
|
+
bodyWidth: be,
|
|
683
645
|
emptyStyle: Ae,
|
|
684
|
-
rootStyle:
|
|
685
|
-
headerWidth:
|
|
686
|
-
footerHeight:
|
|
646
|
+
rootStyle: ve,
|
|
647
|
+
headerWidth: ne,
|
|
648
|
+
footerHeight: re,
|
|
687
649
|
mainTableHeight: oe,
|
|
688
|
-
fixedTableHeight:
|
|
689
|
-
leftTableWidth:
|
|
690
|
-
rightTableWidth:
|
|
691
|
-
showEmpty:
|
|
692
|
-
getRowHeight:
|
|
650
|
+
fixedTableHeight: ce,
|
|
651
|
+
leftTableWidth: Se,
|
|
652
|
+
rightTableWidth: me,
|
|
653
|
+
showEmpty: Fe,
|
|
654
|
+
getRowHeight: Ge,
|
|
693
655
|
onColumnSorted: w,
|
|
694
656
|
onRowHovered: K,
|
|
695
657
|
onRowExpanded: G,
|
|
@@ -703,36 +665,36 @@ function zn(e) {
|
|
|
703
665
|
onVerticalScroll: h
|
|
704
666
|
};
|
|
705
667
|
}
|
|
706
|
-
const
|
|
668
|
+
const _t = Symbol("tableV2"), Rl = String, Xe = {
|
|
707
669
|
type: I(Array),
|
|
708
670
|
required: !0
|
|
709
|
-
},
|
|
671
|
+
}, Ht = {
|
|
710
672
|
type: I(Array)
|
|
711
|
-
},
|
|
712
|
-
...
|
|
673
|
+
}, Tl = {
|
|
674
|
+
...Ht,
|
|
713
675
|
required: !0
|
|
714
|
-
},
|
|
676
|
+
}, po = String, qt = {
|
|
715
677
|
type: I(Array),
|
|
716
|
-
default: () =>
|
|
717
|
-
},
|
|
678
|
+
default: () => al([])
|
|
679
|
+
}, Re = {
|
|
718
680
|
type: Number,
|
|
719
681
|
required: !0
|
|
720
|
-
},
|
|
682
|
+
}, El = {
|
|
721
683
|
type: I([String, Number, Symbol]),
|
|
722
684
|
default: "id"
|
|
723
|
-
},
|
|
685
|
+
}, Yt = {
|
|
724
686
|
type: I(Object)
|
|
725
|
-
},
|
|
687
|
+
}, Ee = se({
|
|
726
688
|
class: String,
|
|
727
|
-
columns:
|
|
689
|
+
columns: Xe,
|
|
728
690
|
columnsStyles: {
|
|
729
691
|
type: I(Object),
|
|
730
692
|
required: !0
|
|
731
693
|
},
|
|
732
694
|
depth: Number,
|
|
733
|
-
expandColumnKey:
|
|
695
|
+
expandColumnKey: po,
|
|
734
696
|
estimatedRowHeight: {
|
|
735
|
-
...
|
|
697
|
+
...Ce.estimatedRowHeight,
|
|
736
698
|
default: void 0
|
|
737
699
|
},
|
|
738
700
|
isScrolling: Boolean,
|
|
@@ -756,16 +718,16 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
756
718
|
type: Number,
|
|
757
719
|
required: !0
|
|
758
720
|
},
|
|
759
|
-
rowKey:
|
|
721
|
+
rowKey: El,
|
|
760
722
|
style: {
|
|
761
723
|
type: I(Object)
|
|
762
724
|
}
|
|
763
725
|
}), ut = {
|
|
764
726
|
type: Number,
|
|
765
727
|
required: !0
|
|
766
|
-
},
|
|
728
|
+
}, pt = se({
|
|
767
729
|
class: String,
|
|
768
|
-
columns:
|
|
730
|
+
columns: Xe,
|
|
769
731
|
fixedHeaderData: {
|
|
770
732
|
type: I(Array)
|
|
771
733
|
},
|
|
@@ -784,40 +746,40 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
784
746
|
},
|
|
785
747
|
height: ut,
|
|
786
748
|
width: ut
|
|
787
|
-
}), lt =
|
|
788
|
-
columns:
|
|
789
|
-
data:
|
|
790
|
-
fixedData:
|
|
791
|
-
estimatedRowHeight:
|
|
792
|
-
width:
|
|
793
|
-
height:
|
|
794
|
-
headerWidth:
|
|
795
|
-
headerHeight:
|
|
796
|
-
bodyWidth:
|
|
797
|
-
rowHeight:
|
|
798
|
-
cache:
|
|
749
|
+
}), lt = se({
|
|
750
|
+
columns: Xe,
|
|
751
|
+
data: Tl,
|
|
752
|
+
fixedData: Ht,
|
|
753
|
+
estimatedRowHeight: Ee.estimatedRowHeight,
|
|
754
|
+
width: Re,
|
|
755
|
+
height: Re,
|
|
756
|
+
headerWidth: Re,
|
|
757
|
+
headerHeight: pt.headerHeight,
|
|
758
|
+
bodyWidth: Re,
|
|
759
|
+
rowHeight: Re,
|
|
760
|
+
cache: wo.cache,
|
|
799
761
|
useIsScrolling: Boolean,
|
|
800
|
-
scrollbarAlwaysOn:
|
|
801
|
-
scrollbarStartGap:
|
|
802
|
-
scrollbarEndGap:
|
|
803
|
-
class:
|
|
804
|
-
style:
|
|
805
|
-
containerStyle:
|
|
762
|
+
scrollbarAlwaysOn: Ce.scrollbarAlwaysOn,
|
|
763
|
+
scrollbarStartGap: Ce.scrollbarStartGap,
|
|
764
|
+
scrollbarEndGap: Ce.scrollbarEndGap,
|
|
765
|
+
class: Rl,
|
|
766
|
+
style: Yt,
|
|
767
|
+
containerStyle: Yt,
|
|
806
768
|
getRowHeight: {
|
|
807
769
|
type: I(Function),
|
|
808
770
|
required: !0
|
|
809
771
|
},
|
|
810
|
-
rowKey:
|
|
772
|
+
rowKey: Ee.rowKey,
|
|
811
773
|
onRowsRendered: {
|
|
812
774
|
type: I(Function)
|
|
813
775
|
},
|
|
814
776
|
onScroll: {
|
|
815
777
|
type: I(Function)
|
|
816
778
|
}
|
|
817
|
-
}),
|
|
779
|
+
}), Mo = se({
|
|
818
780
|
cache: lt.cache,
|
|
819
|
-
estimatedRowHeight:
|
|
820
|
-
rowKey:
|
|
781
|
+
estimatedRowHeight: Ee.estimatedRowHeight,
|
|
782
|
+
rowKey: El,
|
|
821
783
|
headerClass: {
|
|
822
784
|
type: I([
|
|
823
785
|
String,
|
|
@@ -836,7 +798,7 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
836
798
|
Function
|
|
837
799
|
])
|
|
838
800
|
},
|
|
839
|
-
headerHeight:
|
|
801
|
+
headerHeight: pt.headerHeight,
|
|
840
802
|
footerHeight: {
|
|
841
803
|
type: Number,
|
|
842
804
|
default: 0
|
|
@@ -857,22 +819,22 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
857
819
|
Function
|
|
858
820
|
])
|
|
859
821
|
},
|
|
860
|
-
columns:
|
|
861
|
-
data:
|
|
822
|
+
columns: Xe,
|
|
823
|
+
data: Tl,
|
|
862
824
|
dataGetter: {
|
|
863
825
|
type: I(Function)
|
|
864
826
|
},
|
|
865
|
-
fixedData:
|
|
866
|
-
expandColumnKey:
|
|
867
|
-
expandedRowKeys:
|
|
868
|
-
defaultExpandedRowKeys:
|
|
869
|
-
class:
|
|
827
|
+
fixedData: Ht,
|
|
828
|
+
expandColumnKey: Ee.expandColumnKey,
|
|
829
|
+
expandedRowKeys: qt,
|
|
830
|
+
defaultExpandedRowKeys: qt,
|
|
831
|
+
class: Rl,
|
|
870
832
|
fixed: Boolean,
|
|
871
833
|
style: {
|
|
872
834
|
type: I(Object)
|
|
873
835
|
},
|
|
874
|
-
width:
|
|
875
|
-
height:
|
|
836
|
+
width: Re,
|
|
837
|
+
height: Re,
|
|
876
838
|
maxHeight: Number,
|
|
877
839
|
useIsScrolling: Boolean,
|
|
878
840
|
indentSize: {
|
|
@@ -883,9 +845,9 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
883
845
|
type: Number,
|
|
884
846
|
default: 12
|
|
885
847
|
},
|
|
886
|
-
hScrollbarSize:
|
|
887
|
-
vScrollbarSize:
|
|
888
|
-
scrollbarAlwaysOn:
|
|
848
|
+
hScrollbarSize: Ce.hScrollbarSize,
|
|
849
|
+
vScrollbarSize: Ce.vScrollbarSize,
|
|
850
|
+
scrollbarAlwaysOn: bl.alwaysOn,
|
|
889
851
|
sortBy: {
|
|
890
852
|
type: I(Object),
|
|
891
853
|
default: () => ({})
|
|
@@ -903,39 +865,39 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
903
865
|
onEndReached: {
|
|
904
866
|
type: I(Function)
|
|
905
867
|
},
|
|
906
|
-
onRowExpand:
|
|
868
|
+
onRowExpand: Ee.onRowExpand,
|
|
907
869
|
onScroll: lt.onScroll,
|
|
908
870
|
onRowsRendered: lt.onRowsRendered,
|
|
909
|
-
rowEventHandlers:
|
|
910
|
-
}),
|
|
911
|
-
name:
|
|
912
|
-
props:
|
|
871
|
+
rowEventHandlers: Ee.rowEventHandlers
|
|
872
|
+
}), Io = "ElTableV2Header", Ao = we({
|
|
873
|
+
name: Io,
|
|
874
|
+
props: pt,
|
|
913
875
|
setup(e, {
|
|
914
876
|
slots: t,
|
|
915
877
|
expose: l
|
|
916
878
|
}) {
|
|
917
|
-
const
|
|
879
|
+
const o = _e("table-v2"), a = Ct("tableV2GridScrollLeft"), r = V(), s = T(() => ye({
|
|
918
880
|
width: e.width,
|
|
919
881
|
height: e.height
|
|
920
|
-
})), i = T(() =>
|
|
882
|
+
})), i = T(() => ye({
|
|
921
883
|
width: e.rowWidth,
|
|
922
884
|
height: e.height
|
|
923
|
-
})), v = T(() =>
|
|
924
|
-
const g =
|
|
925
|
-
|
|
885
|
+
})), v = T(() => lo(n(e.headerHeight))), f = (b) => {
|
|
886
|
+
const g = n(r);
|
|
887
|
+
Pe(() => {
|
|
926
888
|
g != null && g.scroll && g.scroll({
|
|
927
889
|
left: b
|
|
928
890
|
});
|
|
929
891
|
});
|
|
930
892
|
}, d = () => {
|
|
931
|
-
const b =
|
|
893
|
+
const b = o.e("fixed-header-row"), {
|
|
932
894
|
columns: g,
|
|
933
895
|
fixedHeaderData: y,
|
|
934
896
|
rowHeight: u
|
|
935
897
|
} = e;
|
|
936
898
|
return y == null ? void 0 : y.map((c, h) => {
|
|
937
899
|
var m;
|
|
938
|
-
const S =
|
|
900
|
+
const S = ye({
|
|
939
901
|
height: u,
|
|
940
902
|
width: "100%"
|
|
941
903
|
});
|
|
@@ -948,12 +910,12 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
948
910
|
});
|
|
949
911
|
});
|
|
950
912
|
}, w = () => {
|
|
951
|
-
const b =
|
|
913
|
+
const b = o.e("dynamic-header-row"), {
|
|
952
914
|
columns: g
|
|
953
915
|
} = e;
|
|
954
|
-
return
|
|
916
|
+
return n(v).map((y, u) => {
|
|
955
917
|
var c;
|
|
956
|
-
const h =
|
|
918
|
+
const h = ye({
|
|
957
919
|
width: "100%",
|
|
958
920
|
height: y
|
|
959
921
|
});
|
|
@@ -965,38 +927,38 @@ const Mt = Symbol("tableV2"), El = String, Je = {
|
|
|
965
927
|
});
|
|
966
928
|
});
|
|
967
929
|
};
|
|
968
|
-
return
|
|
969
|
-
|
|
930
|
+
return Zl(() => {
|
|
931
|
+
a != null && a.value && f(a.value);
|
|
970
932
|
}), l({
|
|
971
933
|
scrollToLeft: f
|
|
972
934
|
}), () => {
|
|
973
935
|
if (!(e.height <= 0))
|
|
974
|
-
return
|
|
975
|
-
ref:
|
|
936
|
+
return _("div", {
|
|
937
|
+
ref: r,
|
|
976
938
|
class: e.class,
|
|
977
|
-
style:
|
|
939
|
+
style: n(s),
|
|
978
940
|
role: "rowgroup"
|
|
979
|
-
}, [
|
|
980
|
-
style:
|
|
981
|
-
class:
|
|
941
|
+
}, [_("div", {
|
|
942
|
+
style: n(i),
|
|
943
|
+
class: o.e("header")
|
|
982
944
|
}, [w(), d()])]);
|
|
983
945
|
};
|
|
984
946
|
}
|
|
985
947
|
});
|
|
986
|
-
var
|
|
987
|
-
const
|
|
988
|
-
let
|
|
948
|
+
var Oo = Ao;
|
|
949
|
+
const No = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: o }, a) => {
|
|
950
|
+
let r = null, s = 0, i = 0;
|
|
989
951
|
const v = (d, w) => {
|
|
990
|
-
const b = d <= 0 && t.value || d >= 0 && e.value, g = w <= 0 &&
|
|
952
|
+
const b = d <= 0 && t.value || d >= 0 && e.value, g = w <= 0 && o.value || w >= 0 && l.value;
|
|
991
953
|
return b && g;
|
|
992
954
|
};
|
|
993
955
|
return {
|
|
994
956
|
hasReachedEdge: v,
|
|
995
957
|
onWheel: (d) => {
|
|
996
|
-
|
|
958
|
+
sl(r);
|
|
997
959
|
let w = d.deltaX, b = d.deltaY;
|
|
998
|
-
Math.abs(w) > Math.abs(b) ? b = 0 : w = 0, d.shiftKey && b !== 0 && (w = b, b = 0), !(v(s, i) && v(s + w, i + b)) && (s += w, i += b, d.preventDefault(),
|
|
999
|
-
|
|
960
|
+
Math.abs(w) > Math.abs(b) ? b = 0 : w = 0, d.shiftKey && b !== 0 && (w = b, b = 0), !(v(s, i) && v(s + w, i + b)) && (s += w, i += b, d.preventDefault(), r = il(() => {
|
|
961
|
+
a(s, i), s = 0, i = 0;
|
|
1000
962
|
}));
|
|
1001
963
|
}
|
|
1002
964
|
};
|
|
@@ -1004,9 +966,9 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1004
966
|
name: e,
|
|
1005
967
|
clearCache: t,
|
|
1006
968
|
getColumnPosition: l,
|
|
1007
|
-
getColumnStartIndexForOffset:
|
|
1008
|
-
getColumnStopIndexForStartIndex:
|
|
1009
|
-
getEstimatedTotalHeight:
|
|
969
|
+
getColumnStartIndexForOffset: o,
|
|
970
|
+
getColumnStopIndexForStartIndex: a,
|
|
971
|
+
getEstimatedTotalHeight: r,
|
|
1010
972
|
getEstimatedTotalWidth: s,
|
|
1011
973
|
getColumnOffset: i,
|
|
1012
974
|
getRowOffset: v,
|
|
@@ -1016,27 +978,27 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1016
978
|
initCache: b,
|
|
1017
979
|
injectToInstance: g,
|
|
1018
980
|
validateProps: y
|
|
1019
|
-
}) =>
|
|
981
|
+
}) => we({
|
|
1020
982
|
name: e ?? "ElVirtualList",
|
|
1021
|
-
props:
|
|
1022
|
-
emits: [
|
|
983
|
+
props: Ce,
|
|
984
|
+
emits: [kt, Kt],
|
|
1023
985
|
setup(u, { emit: c, expose: h, slots: m }) {
|
|
1024
|
-
const S =
|
|
986
|
+
const S = _e("vl");
|
|
1025
987
|
y(u);
|
|
1026
|
-
const
|
|
1027
|
-
g == null || g(
|
|
1028
|
-
const
|
|
988
|
+
const H = at(), M = V(b(u, H));
|
|
989
|
+
g == null || g(H, M);
|
|
990
|
+
const x = V(), O = V(), D = V(), F = V(null), R = V({
|
|
1029
991
|
isScrolling: !1,
|
|
1030
992
|
scrollLeft: Y(u.initScrollLeft) ? u.initScrollLeft : 0,
|
|
1031
993
|
scrollTop: Y(u.initScrollTop) ? u.initScrollTop : 0,
|
|
1032
994
|
updateRequested: !1,
|
|
1033
|
-
xAxisScrollDir:
|
|
1034
|
-
yAxisScrollDir:
|
|
1035
|
-
}), A =
|
|
1036
|
-
const { totalColumn: E, totalRow:
|
|
1037
|
-
if (E === 0 ||
|
|
995
|
+
xAxisScrollDir: je,
|
|
996
|
+
yAxisScrollDir: je
|
|
997
|
+
}), A = mo(), G = T(() => Number.parseInt(`${u.height}`, 10)), P = T(() => Number.parseInt(`${u.width}`, 10)), K = T(() => {
|
|
998
|
+
const { totalColumn: E, totalRow: C, columnCache: p } = u, { isScrolling: N, xAxisScrollDir: z, scrollLeft: L } = n(R);
|
|
999
|
+
if (E === 0 || C === 0)
|
|
1038
1000
|
return [0, 0, 0, 0];
|
|
1039
|
-
const $ =
|
|
1001
|
+
const $ = o(u, L, n(M)), W = a(u, $, L, n(M)), j = !N || z === ht ? Math.max(1, p) : 1, q = !N || z === je ? Math.max(1, p) : 1;
|
|
1040
1002
|
return [
|
|
1041
1003
|
Math.max(0, $ - j),
|
|
1042
1004
|
Math.max(0, Math.min(E - 1, W + q)),
|
|
@@ -1044,17 +1006,17 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1044
1006
|
W
|
|
1045
1007
|
];
|
|
1046
1008
|
}), B = T(() => {
|
|
1047
|
-
const { totalColumn: E, totalRow:
|
|
1048
|
-
if (E === 0 ||
|
|
1009
|
+
const { totalColumn: E, totalRow: C, rowCache: p } = u, { isScrolling: N, yAxisScrollDir: z, scrollTop: L } = n(R);
|
|
1010
|
+
if (E === 0 || C === 0)
|
|
1049
1011
|
return [0, 0, 0, 0];
|
|
1050
|
-
const $ = d(u, L,
|
|
1012
|
+
const $ = d(u, L, n(M)), W = w(u, $, L, n(M)), j = !N || z === ht ? Math.max(1, p) : 1, q = !N || z === je ? Math.max(1, p) : 1;
|
|
1051
1013
|
return [
|
|
1052
1014
|
Math.max(0, $ - j),
|
|
1053
|
-
Math.max(0, Math.min(
|
|
1015
|
+
Math.max(0, Math.min(C - 1, W + q)),
|
|
1054
1016
|
$,
|
|
1055
1017
|
W
|
|
1056
1018
|
];
|
|
1057
|
-
}), k = T(() =>
|
|
1019
|
+
}), k = T(() => r(u, n(M))), U = T(() => s(u, n(M))), ie = T(() => {
|
|
1058
1020
|
var E;
|
|
1059
1021
|
return [
|
|
1060
1022
|
{
|
|
@@ -1070,218 +1032,218 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1070
1032
|
},
|
|
1071
1033
|
(E = u.style) != null ? E : {}
|
|
1072
1034
|
];
|
|
1073
|
-
}),
|
|
1074
|
-
const E = `${
|
|
1035
|
+
}), be = T(() => {
|
|
1036
|
+
const E = `${n(U)}px`;
|
|
1075
1037
|
return {
|
|
1076
|
-
height: `${
|
|
1077
|
-
pointerEvents:
|
|
1038
|
+
height: `${n(k)}px`,
|
|
1039
|
+
pointerEvents: n(R).isScrolling ? "none" : void 0,
|
|
1078
1040
|
width: E
|
|
1079
1041
|
};
|
|
1080
|
-
}),
|
|
1081
|
-
const { totalColumn: E, totalRow:
|
|
1082
|
-
if (E > 0 &&
|
|
1042
|
+
}), ce = () => {
|
|
1043
|
+
const { totalColumn: E, totalRow: C } = u;
|
|
1044
|
+
if (E > 0 && C > 0) {
|
|
1083
1045
|
const [
|
|
1084
1046
|
W,
|
|
1085
1047
|
j,
|
|
1086
1048
|
q,
|
|
1087
|
-
|
|
1088
|
-
] =
|
|
1089
|
-
c(
|
|
1049
|
+
ae
|
|
1050
|
+
] = n(K), [J, Q, ke, Ot] = n(B);
|
|
1051
|
+
c(kt, {
|
|
1090
1052
|
columnCacheStart: W,
|
|
1091
1053
|
columnCacheEnd: j,
|
|
1092
1054
|
rowCacheStart: J,
|
|
1093
1055
|
rowCacheEnd: Q,
|
|
1094
1056
|
columnVisibleStart: q,
|
|
1095
|
-
columnVisibleEnd:
|
|
1096
|
-
rowVisibleStart:
|
|
1097
|
-
rowVisibleEnd:
|
|
1057
|
+
columnVisibleEnd: ae,
|
|
1058
|
+
rowVisibleStart: ke,
|
|
1059
|
+
rowVisibleEnd: Ot
|
|
1098
1060
|
});
|
|
1099
1061
|
}
|
|
1100
1062
|
const {
|
|
1101
|
-
scrollLeft:
|
|
1063
|
+
scrollLeft: p,
|
|
1102
1064
|
scrollTop: N,
|
|
1103
1065
|
updateRequested: z,
|
|
1104
1066
|
xAxisScrollDir: L,
|
|
1105
1067
|
yAxisScrollDir: $
|
|
1106
|
-
} =
|
|
1107
|
-
c(
|
|
1068
|
+
} = n(R);
|
|
1069
|
+
c(Kt, {
|
|
1108
1070
|
xAxisScrollDir: L,
|
|
1109
|
-
scrollLeft:
|
|
1071
|
+
scrollLeft: p,
|
|
1110
1072
|
yAxisScrollDir: $,
|
|
1111
1073
|
scrollTop: N,
|
|
1112
1074
|
updateRequested: z
|
|
1113
1075
|
});
|
|
1114
1076
|
}, oe = (E) => {
|
|
1115
1077
|
const {
|
|
1116
|
-
clientHeight:
|
|
1117
|
-
clientWidth:
|
|
1078
|
+
clientHeight: C,
|
|
1079
|
+
clientWidth: p,
|
|
1118
1080
|
scrollHeight: N,
|
|
1119
1081
|
scrollLeft: z,
|
|
1120
1082
|
scrollTop: L,
|
|
1121
1083
|
scrollWidth: $
|
|
1122
|
-
} = E.currentTarget, W =
|
|
1084
|
+
} = E.currentTarget, W = n(R);
|
|
1123
1085
|
if (W.scrollTop === L && W.scrollLeft === z)
|
|
1124
1086
|
return;
|
|
1125
1087
|
let j = z;
|
|
1126
|
-
if (
|
|
1127
|
-
switch (
|
|
1128
|
-
case
|
|
1088
|
+
if (jt(u.direction))
|
|
1089
|
+
switch (Bt()) {
|
|
1090
|
+
case gt:
|
|
1129
1091
|
j = -z;
|
|
1130
1092
|
break;
|
|
1131
|
-
case
|
|
1132
|
-
j = $ -
|
|
1093
|
+
case ml:
|
|
1094
|
+
j = $ - p - z;
|
|
1133
1095
|
break;
|
|
1134
1096
|
}
|
|
1135
|
-
|
|
1097
|
+
R.value = {
|
|
1136
1098
|
...W,
|
|
1137
1099
|
isScrolling: !0,
|
|
1138
1100
|
scrollLeft: j,
|
|
1139
|
-
scrollTop: Math.max(0, Math.min(L, N -
|
|
1101
|
+
scrollTop: Math.max(0, Math.min(L, N - C)),
|
|
1140
1102
|
updateRequested: !0,
|
|
1141
1103
|
xAxisScrollDir: Qe(W.scrollLeft, j),
|
|
1142
1104
|
yAxisScrollDir: Qe(W.scrollTop, L)
|
|
1143
|
-
},
|
|
1144
|
-
},
|
|
1145
|
-
const
|
|
1105
|
+
}, Pe(() => ve()), ge(), ce();
|
|
1106
|
+
}, Se = (E, C) => {
|
|
1107
|
+
const p = n(G), N = (k.value - p) / C * E;
|
|
1146
1108
|
te({
|
|
1147
|
-
scrollTop: Math.min(k.value -
|
|
1109
|
+
scrollTop: Math.min(k.value - p, N)
|
|
1148
1110
|
});
|
|
1149
|
-
},
|
|
1150
|
-
const
|
|
1111
|
+
}, me = (E, C) => {
|
|
1112
|
+
const p = n(P), N = (U.value - p) / C * E;
|
|
1151
1113
|
te({
|
|
1152
|
-
scrollLeft: Math.min(U.value -
|
|
1114
|
+
scrollLeft: Math.min(U.value - p, N)
|
|
1153
1115
|
});
|
|
1154
|
-
}, { onWheel:
|
|
1155
|
-
atXStartEdge: T(() =>
|
|
1156
|
-
atXEndEdge: T(() =>
|
|
1157
|
-
atYStartEdge: T(() =>
|
|
1158
|
-
atYEndEdge: T(() =>
|
|
1159
|
-
}, (E,
|
|
1160
|
-
var
|
|
1161
|
-
(N = (
|
|
1162
|
-
const $ =
|
|
1116
|
+
}, { onWheel: ne } = No({
|
|
1117
|
+
atXStartEdge: T(() => R.value.scrollLeft <= 0),
|
|
1118
|
+
atXEndEdge: T(() => R.value.scrollLeft >= U.value - n(P)),
|
|
1119
|
+
atYStartEdge: T(() => R.value.scrollTop <= 0),
|
|
1120
|
+
atYEndEdge: T(() => R.value.scrollTop >= k.value - n(G))
|
|
1121
|
+
}, (E, C) => {
|
|
1122
|
+
var p, N, z, L;
|
|
1123
|
+
(N = (p = O.value) == null ? void 0 : p.onMouseUp) == null || N.call(p), (L = (z = D.value) == null ? void 0 : z.onMouseUp) == null || L.call(z);
|
|
1124
|
+
const $ = n(P), W = n(G);
|
|
1163
1125
|
te({
|
|
1164
|
-
scrollLeft: Math.min(
|
|
1165
|
-
scrollTop: Math.min(
|
|
1126
|
+
scrollLeft: Math.min(R.value.scrollLeft + E, U.value - $),
|
|
1127
|
+
scrollTop: Math.min(R.value.scrollTop + C, k.value - W)
|
|
1166
1128
|
});
|
|
1167
1129
|
});
|
|
1168
|
-
|
|
1130
|
+
Kl(x, "wheel", ne, {
|
|
1169
1131
|
passive: !1
|
|
1170
1132
|
});
|
|
1171
1133
|
const te = ({
|
|
1172
|
-
scrollLeft: E =
|
|
1173
|
-
scrollTop:
|
|
1134
|
+
scrollLeft: E = R.value.scrollLeft,
|
|
1135
|
+
scrollTop: C = R.value.scrollTop
|
|
1174
1136
|
}) => {
|
|
1175
|
-
E = Math.max(E, 0),
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1178
|
-
...
|
|
1179
|
-
xAxisScrollDir: Qe(
|
|
1180
|
-
yAxisScrollDir: Qe(
|
|
1137
|
+
E = Math.max(E, 0), C = Math.max(C, 0);
|
|
1138
|
+
const p = n(R);
|
|
1139
|
+
C === p.scrollTop && E === p.scrollLeft || (R.value = {
|
|
1140
|
+
...p,
|
|
1141
|
+
xAxisScrollDir: Qe(p.scrollLeft, E),
|
|
1142
|
+
yAxisScrollDir: Qe(p.scrollTop, C),
|
|
1181
1143
|
scrollLeft: E,
|
|
1182
|
-
scrollTop:
|
|
1144
|
+
scrollTop: C,
|
|
1183
1145
|
updateRequested: !0
|
|
1184
|
-
},
|
|
1185
|
-
},
|
|
1186
|
-
const N =
|
|
1187
|
-
|
|
1188
|
-
const z =
|
|
1146
|
+
}, Pe(() => ve()), ge(), ce());
|
|
1147
|
+
}, re = (E = 0, C = 0, p = Te) => {
|
|
1148
|
+
const N = n(R);
|
|
1149
|
+
C = Math.max(0, Math.min(C, u.totalColumn - 1)), E = Math.max(0, Math.min(E, u.totalRow - 1));
|
|
1150
|
+
const z = ro(S.namespace.value), L = n(M), $ = r(u, L), W = s(u, L);
|
|
1189
1151
|
te({
|
|
1190
|
-
scrollLeft: i(u,
|
|
1191
|
-
scrollTop: v(u, E,
|
|
1152
|
+
scrollLeft: i(u, C, p, N.scrollLeft, L, W > u.width ? z : 0),
|
|
1153
|
+
scrollTop: v(u, E, p, N.scrollTop, L, $ > u.height ? z : 0)
|
|
1192
1154
|
});
|
|
1193
|
-
}, Ae = (E,
|
|
1194
|
-
const { columnWidth:
|
|
1195
|
-
if (
|
|
1155
|
+
}, Ae = (E, C) => {
|
|
1156
|
+
const { columnWidth: p, direction: N, rowHeight: z } = u, L = A.value(t && p, t && z, t && N), $ = `${E},${C}`;
|
|
1157
|
+
if (Gl(L, $))
|
|
1196
1158
|
return L[$];
|
|
1197
1159
|
{
|
|
1198
|
-
const [, W] = l(u,
|
|
1160
|
+
const [, W] = l(u, C, n(M)), j = n(M), q = jt(N), [ae, J] = f(u, E, j), [Q] = l(u, C, j);
|
|
1199
1161
|
return L[$] = {
|
|
1200
1162
|
position: "absolute",
|
|
1201
1163
|
left: q ? void 0 : `${W}px`,
|
|
1202
1164
|
right: q ? `${W}px` : void 0,
|
|
1203
1165
|
top: `${J}px`,
|
|
1204
|
-
height: `${
|
|
1166
|
+
height: `${ae}px`,
|
|
1205
1167
|
width: `${Q}px`
|
|
1206
1168
|
}, L[$];
|
|
1207
1169
|
}
|
|
1208
|
-
},
|
|
1209
|
-
|
|
1170
|
+
}, ve = () => {
|
|
1171
|
+
R.value.isScrolling = !1, Pe(() => {
|
|
1210
1172
|
A.value(-1, null, null);
|
|
1211
1173
|
});
|
|
1212
1174
|
};
|
|
1213
1175
|
st(() => {
|
|
1214
|
-
if (!
|
|
1176
|
+
if (!Fl)
|
|
1215
1177
|
return;
|
|
1216
|
-
const { initScrollLeft: E, initScrollTop:
|
|
1217
|
-
|
|
1178
|
+
const { initScrollLeft: E, initScrollTop: C } = u, p = n(x);
|
|
1179
|
+
p && (Y(E) && (p.scrollLeft = E), Y(C) && (p.scrollTop = C)), ce();
|
|
1218
1180
|
});
|
|
1219
|
-
const
|
|
1220
|
-
const { direction: E } = u, { scrollLeft:
|
|
1181
|
+
const ge = () => {
|
|
1182
|
+
const { direction: E } = u, { scrollLeft: C, scrollTop: p, updateRequested: N } = n(R), z = n(x);
|
|
1221
1183
|
if (N && z) {
|
|
1222
|
-
if (E ===
|
|
1223
|
-
switch (
|
|
1224
|
-
case
|
|
1225
|
-
z.scrollLeft = -
|
|
1184
|
+
if (E === hl)
|
|
1185
|
+
switch (Bt()) {
|
|
1186
|
+
case gt: {
|
|
1187
|
+
z.scrollLeft = -C;
|
|
1226
1188
|
break;
|
|
1227
1189
|
}
|
|
1228
|
-
case
|
|
1229
|
-
z.scrollLeft =
|
|
1190
|
+
case fl: {
|
|
1191
|
+
z.scrollLeft = C;
|
|
1230
1192
|
break;
|
|
1231
1193
|
}
|
|
1232
1194
|
default: {
|
|
1233
1195
|
const { clientWidth: L, scrollWidth: $ } = z;
|
|
1234
|
-
z.scrollLeft = $ - L -
|
|
1196
|
+
z.scrollLeft = $ - L - C;
|
|
1235
1197
|
break;
|
|
1236
1198
|
}
|
|
1237
1199
|
}
|
|
1238
1200
|
else
|
|
1239
|
-
z.scrollLeft = Math.max(0,
|
|
1240
|
-
z.scrollTop = Math.max(0,
|
|
1201
|
+
z.scrollLeft = Math.max(0, C);
|
|
1202
|
+
z.scrollTop = Math.max(0, p);
|
|
1241
1203
|
}
|
|
1242
|
-
}, { resetAfterColumnIndex:
|
|
1204
|
+
}, { resetAfterColumnIndex: We, resetAfterRowIndex: Fe, resetAfter: Ge } = H.proxy;
|
|
1243
1205
|
h({
|
|
1244
|
-
windowRef:
|
|
1206
|
+
windowRef: x,
|
|
1245
1207
|
innerRef: F,
|
|
1246
1208
|
getItemStyleCache: A,
|
|
1247
1209
|
scrollTo: te,
|
|
1248
|
-
scrollToItem:
|
|
1249
|
-
states:
|
|
1250
|
-
resetAfterColumnIndex:
|
|
1251
|
-
resetAfterRowIndex:
|
|
1252
|
-
resetAfter:
|
|
1210
|
+
scrollToItem: re,
|
|
1211
|
+
states: R,
|
|
1212
|
+
resetAfterColumnIndex: We,
|
|
1213
|
+
resetAfterRowIndex: Fe,
|
|
1214
|
+
resetAfter: Ge
|
|
1253
1215
|
});
|
|
1254
|
-
const
|
|
1216
|
+
const Ve = () => {
|
|
1255
1217
|
const {
|
|
1256
1218
|
scrollbarAlwaysOn: E,
|
|
1257
|
-
scrollbarStartGap:
|
|
1258
|
-
scrollbarEndGap:
|
|
1219
|
+
scrollbarStartGap: C,
|
|
1220
|
+
scrollbarEndGap: p,
|
|
1259
1221
|
totalColumn: N,
|
|
1260
1222
|
totalRow: z
|
|
1261
|
-
} = u, L =
|
|
1223
|
+
} = u, L = n(P), $ = n(G), W = n(U), j = n(k), { scrollLeft: q, scrollTop: ae } = n(R), J = he(Ut, {
|
|
1262
1224
|
ref: O,
|
|
1263
1225
|
alwaysOn: E,
|
|
1264
|
-
startGap:
|
|
1265
|
-
endGap:
|
|
1226
|
+
startGap: C,
|
|
1227
|
+
endGap: p,
|
|
1266
1228
|
class: S.e("horizontal"),
|
|
1267
1229
|
clientSize: L,
|
|
1268
1230
|
layout: "horizontal",
|
|
1269
|
-
onScroll:
|
|
1231
|
+
onScroll: me,
|
|
1270
1232
|
ratio: L * 100 / W,
|
|
1271
1233
|
scrollFrom: q / (W - L),
|
|
1272
1234
|
total: z,
|
|
1273
1235
|
visible: !0
|
|
1274
|
-
}), Q =
|
|
1236
|
+
}), Q = he(Ut, {
|
|
1275
1237
|
ref: D,
|
|
1276
1238
|
alwaysOn: E,
|
|
1277
|
-
startGap:
|
|
1278
|
-
endGap:
|
|
1239
|
+
startGap: C,
|
|
1240
|
+
endGap: p,
|
|
1279
1241
|
class: S.e("vertical"),
|
|
1280
1242
|
clientSize: $,
|
|
1281
1243
|
layout: "vertical",
|
|
1282
|
-
onScroll:
|
|
1244
|
+
onScroll: Se,
|
|
1283
1245
|
ratio: $ * 100 / j,
|
|
1284
|
-
scrollFrom:
|
|
1246
|
+
scrollFrom: ae / (j - $),
|
|
1285
1247
|
total: N,
|
|
1286
1248
|
visible: !0
|
|
1287
1249
|
});
|
|
@@ -1291,184 +1253,184 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1291
1253
|
};
|
|
1292
1254
|
}, X = () => {
|
|
1293
1255
|
var E;
|
|
1294
|
-
const [
|
|
1256
|
+
const [C, p] = n(K), [N, z] = n(B), { data: L, totalColumn: $, totalRow: W, useIsScrolling: j, itemKey: q } = u, ae = [];
|
|
1295
1257
|
if (W > 0 && $ > 0)
|
|
1296
1258
|
for (let J = N; J <= z; J++)
|
|
1297
|
-
for (let Q =
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1259
|
+
for (let Q = C; Q <= p; Q++) {
|
|
1260
|
+
const ke = q({ columnIndex: Q, data: L, rowIndex: J });
|
|
1261
|
+
ae.push(he(Xl, { key: ke }, (E = m.default) == null ? void 0 : E.call(m, {
|
|
1300
1262
|
columnIndex: Q,
|
|
1301
1263
|
data: L,
|
|
1302
|
-
isScrolling: j ?
|
|
1264
|
+
isScrolling: j ? n(R).isScrolling : void 0,
|
|
1303
1265
|
style: Ae(J, Q),
|
|
1304
1266
|
rowIndex: J
|
|
1305
1267
|
})));
|
|
1306
1268
|
}
|
|
1307
|
-
return
|
|
1269
|
+
return ae;
|
|
1308
1270
|
}, ee = () => {
|
|
1309
|
-
const E =
|
|
1271
|
+
const E = Pt(u.innerElement), C = X();
|
|
1310
1272
|
return [
|
|
1311
|
-
|
|
1312
|
-
style:
|
|
1273
|
+
he(E, {
|
|
1274
|
+
style: n(be),
|
|
1313
1275
|
ref: F
|
|
1314
|
-
},
|
|
1315
|
-
default: () =>
|
|
1276
|
+
}, Lt(E) ? C : {
|
|
1277
|
+
default: () => C
|
|
1316
1278
|
})
|
|
1317
1279
|
];
|
|
1318
1280
|
};
|
|
1319
1281
|
return () => {
|
|
1320
|
-
const E =
|
|
1321
|
-
return
|
|
1282
|
+
const E = Pt(u.containerElement), { horizontalScrollbar: C, verticalScrollbar: p } = Ve(), N = ee();
|
|
1283
|
+
return he("div", {
|
|
1322
1284
|
key: 0,
|
|
1323
1285
|
class: S.e("wrapper"),
|
|
1324
1286
|
role: u.role
|
|
1325
1287
|
}, [
|
|
1326
|
-
|
|
1288
|
+
he(E, {
|
|
1327
1289
|
class: u.className,
|
|
1328
|
-
style:
|
|
1290
|
+
style: n(ie),
|
|
1329
1291
|
onScroll: oe,
|
|
1330
|
-
ref:
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
|
|
1292
|
+
ref: x
|
|
1293
|
+
}, Lt(E) ? N : { default: () => N }),
|
|
1294
|
+
C,
|
|
1295
|
+
p
|
|
1334
1296
|
]);
|
|
1335
1297
|
};
|
|
1336
1298
|
}
|
|
1337
|
-
}), { max: rt, min:
|
|
1299
|
+
}), { max: rt, min: _l, floor: Hl } = Math, Zt = "ElDynamicSizeGrid", zo = {
|
|
1338
1300
|
column: "columnWidth",
|
|
1339
1301
|
row: "rowHeight"
|
|
1340
|
-
},
|
|
1302
|
+
}, Tt = {
|
|
1341
1303
|
column: "lastVisitedColumnIndex",
|
|
1342
1304
|
row: "lastVisitedRowIndex"
|
|
1343
|
-
},
|
|
1344
|
-
const [
|
|
1345
|
-
l[
|
|
1346
|
-
e[
|
|
1347
|
-
l[
|
|
1305
|
+
}, fe = (e, t, l, o) => {
|
|
1306
|
+
const [a, r, s] = [
|
|
1307
|
+
l[o],
|
|
1308
|
+
e[zo[o]],
|
|
1309
|
+
l[Tt[o]]
|
|
1348
1310
|
];
|
|
1349
1311
|
if (t > s) {
|
|
1350
1312
|
let i = 0;
|
|
1351
1313
|
if (s >= 0) {
|
|
1352
|
-
const v =
|
|
1314
|
+
const v = a[s];
|
|
1353
1315
|
i = v.offset + v.size;
|
|
1354
1316
|
}
|
|
1355
1317
|
for (let v = s + 1; v <= t; v++) {
|
|
1356
|
-
const f =
|
|
1357
|
-
|
|
1318
|
+
const f = r(v);
|
|
1319
|
+
a[v] = {
|
|
1358
1320
|
offset: i,
|
|
1359
1321
|
size: f
|
|
1360
1322
|
}, i += f;
|
|
1361
1323
|
}
|
|
1362
|
-
l[
|
|
1324
|
+
l[Tt[o]] = t;
|
|
1363
1325
|
}
|
|
1364
|
-
return
|
|
1365
|
-
},
|
|
1366
|
-
for (; l <=
|
|
1367
|
-
const s = l +
|
|
1368
|
-
if (i ===
|
|
1326
|
+
return a[t];
|
|
1327
|
+
}, pl = (e, t, l, o, a, r) => {
|
|
1328
|
+
for (; l <= o; ) {
|
|
1329
|
+
const s = l + Hl((o - l) / 2), i = fe(e, s, t, r).offset;
|
|
1330
|
+
if (i === a)
|
|
1369
1331
|
return s;
|
|
1370
|
-
i <
|
|
1332
|
+
i < a ? l = s + 1 : o = s - 1;
|
|
1371
1333
|
}
|
|
1372
1334
|
return rt(0, l - 1);
|
|
1373
|
-
},
|
|
1374
|
-
const
|
|
1335
|
+
}, Lo = (e, t, l, o, a) => {
|
|
1336
|
+
const r = a === "column" ? e.totalColumn : e.totalRow;
|
|
1375
1337
|
let s = 1;
|
|
1376
|
-
for (; l <
|
|
1338
|
+
for (; l < r && fe(e, l, t, a).offset < o; )
|
|
1377
1339
|
l += s, s *= 2;
|
|
1378
|
-
return
|
|
1379
|
-
},
|
|
1380
|
-
const [
|
|
1381
|
-
t[
|
|
1382
|
-
t[
|
|
1340
|
+
return pl(e, t, Hl(l / 2), _l(l, r - 1), o, a);
|
|
1341
|
+
}, Xt = (e, t, l, o) => {
|
|
1342
|
+
const [a, r] = [
|
|
1343
|
+
t[o],
|
|
1344
|
+
t[Tt[o]]
|
|
1383
1345
|
];
|
|
1384
|
-
return (
|
|
1385
|
-
},
|
|
1386
|
-
let
|
|
1346
|
+
return (r > 0 ? a[r].offset : 0) >= l ? pl(e, t, 0, r, l, o) : Lo(e, t, rt(0, r), l, o);
|
|
1347
|
+
}, Ml = ({ totalRow: e }, { estimatedRowHeight: t, lastVisitedRowIndex: l, row: o }) => {
|
|
1348
|
+
let a = 0;
|
|
1387
1349
|
if (l >= e && (l = e - 1), l >= 0) {
|
|
1388
|
-
const i =
|
|
1389
|
-
|
|
1350
|
+
const i = o[l];
|
|
1351
|
+
a = i.offset + i.size;
|
|
1390
1352
|
}
|
|
1391
1353
|
const s = (e - l - 1) * t;
|
|
1392
|
-
return
|
|
1393
|
-
},
|
|
1394
|
-
let
|
|
1395
|
-
if (
|
|
1396
|
-
const i = t[
|
|
1397
|
-
|
|
1354
|
+
return a + s;
|
|
1355
|
+
}, Il = ({ totalColumn: e }, { column: t, estimatedColumnWidth: l, lastVisitedColumnIndex: o }) => {
|
|
1356
|
+
let a = 0;
|
|
1357
|
+
if (o > e && (o = e - 1), o >= 0) {
|
|
1358
|
+
const i = t[o];
|
|
1359
|
+
a = i.offset + i.size;
|
|
1398
1360
|
}
|
|
1399
|
-
const s = (e -
|
|
1400
|
-
return
|
|
1401
|
-
},
|
|
1402
|
-
column:
|
|
1403
|
-
row:
|
|
1404
|
-
},
|
|
1361
|
+
const s = (e - o - 1) * l;
|
|
1362
|
+
return a + s;
|
|
1363
|
+
}, Do = {
|
|
1364
|
+
column: Il,
|
|
1365
|
+
row: Ml
|
|
1366
|
+
}, Jt = (e, t, l, o, a, r, s) => {
|
|
1405
1367
|
const [i, v] = [
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
], f =
|
|
1409
|
-
switch (l ===
|
|
1410
|
-
case
|
|
1368
|
+
r === "row" ? e.height : e.width,
|
|
1369
|
+
Do[r]
|
|
1370
|
+
], f = fe(e, t, a, r), d = v(e, a), w = rt(0, _l(d - i, f.offset)), b = rt(0, f.offset - i + s + f.size);
|
|
1371
|
+
switch (l === dl && (o >= b - i && o <= w + i ? l = Te : l = De), l) {
|
|
1372
|
+
case ft:
|
|
1411
1373
|
return w;
|
|
1412
|
-
case
|
|
1374
|
+
case mt:
|
|
1413
1375
|
return b;
|
|
1414
|
-
case
|
|
1376
|
+
case De:
|
|
1415
1377
|
return Math.round(b + (w - b) / 2);
|
|
1416
|
-
case
|
|
1378
|
+
case Te:
|
|
1417
1379
|
default:
|
|
1418
|
-
return
|
|
1380
|
+
return o >= b && o <= w ? o : b > w || o < b ? b : w;
|
|
1419
1381
|
}
|
|
1420
|
-
},
|
|
1382
|
+
}, Po = Cl({
|
|
1421
1383
|
name: "ElDynamicSizeGrid",
|
|
1422
1384
|
getColumnPosition: (e, t, l) => {
|
|
1423
|
-
const
|
|
1424
|
-
return [
|
|
1385
|
+
const o = fe(e, t, l, "column");
|
|
1386
|
+
return [o.size, o.offset];
|
|
1425
1387
|
},
|
|
1426
1388
|
getRowPosition: (e, t, l) => {
|
|
1427
|
-
const
|
|
1428
|
-
return [
|
|
1389
|
+
const o = fe(e, t, l, "row");
|
|
1390
|
+
return [o.size, o.offset];
|
|
1429
1391
|
},
|
|
1430
|
-
getColumnOffset: (e, t, l,
|
|
1431
|
-
getRowOffset: (e, t, l,
|
|
1432
|
-
getColumnStartIndexForOffset: (e, t, l) =>
|
|
1433
|
-
getColumnStopIndexForStartIndex: (e, t, l,
|
|
1434
|
-
const
|
|
1435
|
-
let s =
|
|
1436
|
-
for (; i < e.totalColumn - 1 && s <
|
|
1437
|
-
i++, s +=
|
|
1392
|
+
getColumnOffset: (e, t, l, o, a, r) => Jt(e, t, l, o, a, "column", r),
|
|
1393
|
+
getRowOffset: (e, t, l, o, a, r) => Jt(e, t, l, o, a, "row", r),
|
|
1394
|
+
getColumnStartIndexForOffset: (e, t, l) => Xt(e, l, t, "column"),
|
|
1395
|
+
getColumnStopIndexForStartIndex: (e, t, l, o) => {
|
|
1396
|
+
const a = fe(e, t, o, "column"), r = l + e.width;
|
|
1397
|
+
let s = a.offset + a.size, i = t;
|
|
1398
|
+
for (; i < e.totalColumn - 1 && s < r; )
|
|
1399
|
+
i++, s += fe(e, t, o, "column").size;
|
|
1438
1400
|
return i;
|
|
1439
1401
|
},
|
|
1440
|
-
getEstimatedTotalHeight:
|
|
1441
|
-
getEstimatedTotalWidth:
|
|
1442
|
-
getRowStartIndexForOffset: (e, t, l) =>
|
|
1443
|
-
getRowStopIndexForStartIndex: (e, t, l,
|
|
1444
|
-
const { totalRow:
|
|
1402
|
+
getEstimatedTotalHeight: Ml,
|
|
1403
|
+
getEstimatedTotalWidth: Il,
|
|
1404
|
+
getRowStartIndexForOffset: (e, t, l) => Xt(e, l, t, "row"),
|
|
1405
|
+
getRowStopIndexForStartIndex: (e, t, l, o) => {
|
|
1406
|
+
const { totalRow: a, height: r } = e, s = fe(e, t, o, "row"), i = l + r;
|
|
1445
1407
|
let v = s.size + s.offset, f = t;
|
|
1446
|
-
for (; f <
|
|
1447
|
-
f++, v +=
|
|
1408
|
+
for (; f < a - 1 && v < i; )
|
|
1409
|
+
f++, v += fe(e, f, o, "row").size;
|
|
1448
1410
|
return f;
|
|
1449
1411
|
},
|
|
1450
1412
|
injectToInstance: (e, t) => {
|
|
1451
|
-
const l = ({ columnIndex:
|
|
1413
|
+
const l = ({ columnIndex: r, rowIndex: s }, i) => {
|
|
1452
1414
|
var v, f;
|
|
1453
|
-
i =
|
|
1454
|
-
},
|
|
1415
|
+
i = Vl(i) ? !0 : i, Y(r) && (t.value.lastVisitedColumnIndex = Math.min(t.value.lastVisitedColumnIndex, r - 1)), Y(s) && (t.value.lastVisitedRowIndex = Math.min(t.value.lastVisitedRowIndex, s - 1)), (v = e.exposed) == null || v.getItemStyleCache.value(-1, null, null), i && ((f = e.proxy) == null || f.$forceUpdate());
|
|
1416
|
+
}, o = (r, s) => {
|
|
1455
1417
|
l({
|
|
1456
|
-
columnIndex:
|
|
1418
|
+
columnIndex: r
|
|
1457
1419
|
}, s);
|
|
1458
|
-
},
|
|
1420
|
+
}, a = (r, s) => {
|
|
1459
1421
|
l({
|
|
1460
|
-
rowIndex:
|
|
1422
|
+
rowIndex: r
|
|
1461
1423
|
}, s);
|
|
1462
1424
|
};
|
|
1463
1425
|
Object.assign(e.proxy, {
|
|
1464
|
-
resetAfterColumnIndex:
|
|
1465
|
-
resetAfterRowIndex:
|
|
1426
|
+
resetAfterColumnIndex: o,
|
|
1427
|
+
resetAfterRowIndex: a,
|
|
1466
1428
|
resetAfter: l
|
|
1467
1429
|
});
|
|
1468
1430
|
},
|
|
1469
1431
|
initCache: ({
|
|
1470
|
-
estimatedColumnWidth: e =
|
|
1471
|
-
estimatedRowHeight: t =
|
|
1432
|
+
estimatedColumnWidth: e = Vt,
|
|
1433
|
+
estimatedRowHeight: t = Vt
|
|
1472
1434
|
}) => ({
|
|
1473
1435
|
column: {},
|
|
1474
1436
|
estimatedColumnWidth: e,
|
|
@@ -1479,15 +1441,15 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1479
1441
|
}),
|
|
1480
1442
|
clearCache: !1,
|
|
1481
1443
|
validateProps: ({ columnWidth: e, rowHeight: t }) => {
|
|
1482
|
-
process.env.NODE_ENV !== "production" && (
|
|
1444
|
+
process.env.NODE_ENV !== "production" && (Be(e) || ot(Zt, `
|
|
1483
1445
|
"columnWidth" must be passed as function,
|
|
1484
1446
|
instead ${typeof e} was given.
|
|
1485
|
-
`),
|
|
1447
|
+
`), Be(t) || ot(Zt, `
|
|
1486
1448
|
"rowHeight" must be passed as function,
|
|
1487
1449
|
instead ${typeof t} was given.
|
|
1488
1450
|
`));
|
|
1489
1451
|
}
|
|
1490
|
-
}),
|
|
1452
|
+
}), Qt = "ElFixedSizeGrid", $o = Cl({
|
|
1491
1453
|
name: "ElFixedSizeGrid",
|
|
1492
1454
|
getColumnPosition: ({ columnWidth: e }, t) => [
|
|
1493
1455
|
e,
|
|
@@ -1499,64 +1461,64 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1499
1461
|
],
|
|
1500
1462
|
getEstimatedTotalHeight: ({ totalRow: e, rowHeight: t }) => t * e,
|
|
1501
1463
|
getEstimatedTotalWidth: ({ totalColumn: e, columnWidth: t }) => t * e,
|
|
1502
|
-
getColumnOffset: ({ totalColumn: e, columnWidth: t, width: l },
|
|
1464
|
+
getColumnOffset: ({ totalColumn: e, columnWidth: t, width: l }, o, a, r, s, i) => {
|
|
1503
1465
|
l = Number(l);
|
|
1504
|
-
const v = Math.max(0, e * t - l), f = Math.min(v,
|
|
1505
|
-
switch (
|
|
1506
|
-
case
|
|
1466
|
+
const v = Math.max(0, e * t - l), f = Math.min(v, o * t), d = Math.max(0, o * t - l + i + t);
|
|
1467
|
+
switch (a === "smart" && (r >= d - l && r <= f + l ? a = Te : a = De), a) {
|
|
1468
|
+
case ft:
|
|
1507
1469
|
return f;
|
|
1508
|
-
case
|
|
1470
|
+
case mt:
|
|
1509
1471
|
return d;
|
|
1510
|
-
case
|
|
1472
|
+
case De: {
|
|
1511
1473
|
const w = Math.round(d + (f - d) / 2);
|
|
1512
1474
|
return w < Math.ceil(l / 2) ? 0 : w > v + Math.floor(l / 2) ? v : w;
|
|
1513
1475
|
}
|
|
1514
|
-
case
|
|
1476
|
+
case Te:
|
|
1515
1477
|
default:
|
|
1516
|
-
return
|
|
1478
|
+
return r >= d && r <= f ? r : d > f || r < d ? d : f;
|
|
1517
1479
|
}
|
|
1518
1480
|
},
|
|
1519
|
-
getRowOffset: ({ rowHeight: e, height: t, totalRow: l },
|
|
1481
|
+
getRowOffset: ({ rowHeight: e, height: t, totalRow: l }, o, a, r, s, i) => {
|
|
1520
1482
|
t = Number(t);
|
|
1521
|
-
const v = Math.max(0, l * e - t), f = Math.min(v,
|
|
1522
|
-
switch (
|
|
1523
|
-
case
|
|
1483
|
+
const v = Math.max(0, l * e - t), f = Math.min(v, o * e), d = Math.max(0, o * e - t + i + e);
|
|
1484
|
+
switch (a === dl && (r >= d - t && r <= f + t ? a = Te : a = De), a) {
|
|
1485
|
+
case ft:
|
|
1524
1486
|
return f;
|
|
1525
|
-
case
|
|
1487
|
+
case mt:
|
|
1526
1488
|
return d;
|
|
1527
|
-
case
|
|
1489
|
+
case De: {
|
|
1528
1490
|
const w = Math.round(d + (f - d) / 2);
|
|
1529
1491
|
return w < Math.ceil(t / 2) ? 0 : w > v + Math.floor(t / 2) ? v : w;
|
|
1530
1492
|
}
|
|
1531
|
-
case
|
|
1493
|
+
case Te:
|
|
1532
1494
|
default:
|
|
1533
|
-
return
|
|
1495
|
+
return r >= d && r <= f ? r : d > f || r < d ? d : f;
|
|
1534
1496
|
}
|
|
1535
1497
|
},
|
|
1536
1498
|
getColumnStartIndexForOffset: ({ columnWidth: e, totalColumn: t }, l) => Math.max(0, Math.min(t - 1, Math.floor(l / e))),
|
|
1537
|
-
getColumnStopIndexForStartIndex: ({ columnWidth: e, totalColumn: t, width: l },
|
|
1538
|
-
const
|
|
1539
|
-
return Math.max(0, Math.min(t - 1,
|
|
1499
|
+
getColumnStopIndexForStartIndex: ({ columnWidth: e, totalColumn: t, width: l }, o, a) => {
|
|
1500
|
+
const r = o * e, s = Math.ceil((l + a - r) / e);
|
|
1501
|
+
return Math.max(0, Math.min(t - 1, o + s - 1));
|
|
1540
1502
|
},
|
|
1541
1503
|
getRowStartIndexForOffset: ({ rowHeight: e, totalRow: t }, l) => Math.max(0, Math.min(t - 1, Math.floor(l / e))),
|
|
1542
|
-
getRowStopIndexForStartIndex: ({ rowHeight: e, totalRow: t, height: l },
|
|
1543
|
-
const
|
|
1544
|
-
return Math.max(0, Math.min(t - 1,
|
|
1504
|
+
getRowStopIndexForStartIndex: ({ rowHeight: e, totalRow: t, height: l }, o, a) => {
|
|
1505
|
+
const r = o * e, s = Math.ceil((l + a - r) / e);
|
|
1506
|
+
return Math.max(0, Math.min(t - 1, o + s - 1));
|
|
1545
1507
|
},
|
|
1546
1508
|
initCache: () => {
|
|
1547
1509
|
},
|
|
1548
1510
|
clearCache: !0,
|
|
1549
1511
|
validateProps: ({ columnWidth: e, rowHeight: t }) => {
|
|
1550
|
-
process.env.NODE_ENV !== "production" && (Y(e) ||
|
|
1512
|
+
process.env.NODE_ENV !== "production" && (Y(e) || ot(Qt, `
|
|
1551
1513
|
"columnWidth" must be passed as number,
|
|
1552
1514
|
instead ${typeof e} was given.
|
|
1553
|
-
`), Y(t) ||
|
|
1515
|
+
`), Y(t) || ot(Qt, `
|
|
1554
1516
|
"columnWidth" must be passed as number,
|
|
1555
1517
|
instead ${typeof t} was given.
|
|
1556
1518
|
`));
|
|
1557
1519
|
}
|
|
1558
|
-
}),
|
|
1559
|
-
const t = V(), l = V(),
|
|
1520
|
+
}), Wo = "ElTableV2Grid", Fo = (e) => {
|
|
1521
|
+
const t = V(), l = V(), o = V(0), a = T(() => {
|
|
1560
1522
|
const {
|
|
1561
1523
|
data: c,
|
|
1562
1524
|
rowHeight: h,
|
|
@@ -1564,7 +1526,7 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1564
1526
|
} = e;
|
|
1565
1527
|
if (!m)
|
|
1566
1528
|
return c.length * h;
|
|
1567
|
-
}),
|
|
1529
|
+
}), r = T(() => {
|
|
1568
1530
|
const {
|
|
1569
1531
|
fixedData: c,
|
|
1570
1532
|
rowHeight: h
|
|
@@ -1574,8 +1536,8 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1574
1536
|
const {
|
|
1575
1537
|
height: c
|
|
1576
1538
|
} = e;
|
|
1577
|
-
return Math.max(0, c -
|
|
1578
|
-
}), v = T(() =>
|
|
1539
|
+
return Math.max(0, c - n(s) - n(r));
|
|
1540
|
+
}), v = T(() => n(s) + n(r) > 0), f = ({
|
|
1579
1541
|
data: c,
|
|
1580
1542
|
rowIndex: h
|
|
1581
1543
|
}) => c[h][e.rowKey];
|
|
@@ -1585,8 +1547,8 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1585
1547
|
rowVisibleStart: m,
|
|
1586
1548
|
rowVisibleEnd: S
|
|
1587
1549
|
}) {
|
|
1588
|
-
var
|
|
1589
|
-
(
|
|
1550
|
+
var H;
|
|
1551
|
+
(H = e.onRowsRendered) == null || H.call(e, {
|
|
1590
1552
|
rowCacheStart: c,
|
|
1591
1553
|
rowCacheEnd: h,
|
|
1592
1554
|
rowVisibleStart: m,
|
|
@@ -1598,25 +1560,25 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1598
1560
|
(m = l.value) == null || m.resetAfterRowIndex(c, h);
|
|
1599
1561
|
}
|
|
1600
1562
|
function b(c, h) {
|
|
1601
|
-
const m =
|
|
1602
|
-
|
|
1563
|
+
const m = n(t), S = n(l);
|
|
1564
|
+
Et(c) ? (m == null || m.scrollToLeft(c.scrollLeft), o.value = c.scrollLeft, S == null || S.scrollTo(c)) : (m == null || m.scrollToLeft(c), o.value = c, S == null || S.scrollTo({
|
|
1603
1565
|
scrollLeft: c,
|
|
1604
1566
|
scrollTop: h
|
|
1605
1567
|
}));
|
|
1606
1568
|
}
|
|
1607
1569
|
function g(c) {
|
|
1608
1570
|
var h;
|
|
1609
|
-
(h =
|
|
1571
|
+
(h = n(l)) == null || h.scrollTo({
|
|
1610
1572
|
scrollTop: c
|
|
1611
1573
|
});
|
|
1612
1574
|
}
|
|
1613
1575
|
function y(c, h) {
|
|
1614
1576
|
var m;
|
|
1615
|
-
(m =
|
|
1577
|
+
(m = n(l)) == null || m.scrollToItem(c, 1, h);
|
|
1616
1578
|
}
|
|
1617
1579
|
function u() {
|
|
1618
1580
|
var c, h;
|
|
1619
|
-
(c =
|
|
1581
|
+
(c = n(l)) == null || c.$forceUpdate(), (h = n(t)) == null || h.$forceUpdate();
|
|
1620
1582
|
}
|
|
1621
1583
|
return Me(() => e.bodyWidth, () => {
|
|
1622
1584
|
var c;
|
|
@@ -1626,32 +1588,32 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1626
1588
|
}), {
|
|
1627
1589
|
bodyRef: l,
|
|
1628
1590
|
forceUpdate: u,
|
|
1629
|
-
fixedRowHeight:
|
|
1591
|
+
fixedRowHeight: r,
|
|
1630
1592
|
gridHeight: i,
|
|
1631
1593
|
hasHeader: v,
|
|
1632
1594
|
headerHeight: s,
|
|
1633
1595
|
headerRef: t,
|
|
1634
|
-
totalHeight:
|
|
1596
|
+
totalHeight: a,
|
|
1635
1597
|
itemKey: f,
|
|
1636
1598
|
onItemRendered: d,
|
|
1637
1599
|
resetAfterRowIndex: w,
|
|
1638
1600
|
scrollTo: b,
|
|
1639
1601
|
scrollToTop: g,
|
|
1640
1602
|
scrollToRow: y,
|
|
1641
|
-
scrollLeft:
|
|
1603
|
+
scrollLeft: o
|
|
1642
1604
|
};
|
|
1643
|
-
},
|
|
1644
|
-
name:
|
|
1605
|
+
}, Go = we({
|
|
1606
|
+
name: Wo,
|
|
1645
1607
|
props: lt,
|
|
1646
1608
|
setup(e, {
|
|
1647
1609
|
slots: t,
|
|
1648
1610
|
expose: l
|
|
1649
1611
|
}) {
|
|
1650
1612
|
const {
|
|
1651
|
-
ns:
|
|
1652
|
-
} =
|
|
1653
|
-
bodyRef:
|
|
1654
|
-
fixedRowHeight:
|
|
1613
|
+
ns: o
|
|
1614
|
+
} = Ct(_t), {
|
|
1615
|
+
bodyRef: a,
|
|
1616
|
+
fixedRowHeight: r,
|
|
1655
1617
|
gridHeight: s,
|
|
1656
1618
|
hasHeader: i,
|
|
1657
1619
|
headerRef: v,
|
|
@@ -1665,8 +1627,8 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1665
1627
|
scrollToTop: c,
|
|
1666
1628
|
scrollToRow: h,
|
|
1667
1629
|
scrollLeft: m
|
|
1668
|
-
} =
|
|
1669
|
-
|
|
1630
|
+
} = Fo(e);
|
|
1631
|
+
rl("tableV2GridScrollLeft", m), l({
|
|
1670
1632
|
forceUpdate: w,
|
|
1671
1633
|
totalHeight: d,
|
|
1672
1634
|
scrollTo: u,
|
|
@@ -1677,13 +1639,13 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1677
1639
|
const S = () => e.bodyWidth;
|
|
1678
1640
|
return () => {
|
|
1679
1641
|
const {
|
|
1680
|
-
cache:
|
|
1642
|
+
cache: H,
|
|
1681
1643
|
columns: M,
|
|
1682
|
-
data:
|
|
1644
|
+
data: x,
|
|
1683
1645
|
fixedData: O,
|
|
1684
1646
|
useIsScrolling: D,
|
|
1685
1647
|
scrollbarAlwaysOn: F,
|
|
1686
|
-
scrollbarEndGap:
|
|
1648
|
+
scrollbarEndGap: R,
|
|
1687
1649
|
scrollbarStartGap: A,
|
|
1688
1650
|
style: G,
|
|
1689
1651
|
rowHeight: P,
|
|
@@ -1691,56 +1653,56 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1691
1653
|
estimatedRowHeight: B,
|
|
1692
1654
|
headerWidth: k,
|
|
1693
1655
|
height: U,
|
|
1694
|
-
width:
|
|
1695
|
-
getRowHeight:
|
|
1696
|
-
onScroll:
|
|
1697
|
-
} = e, oe = Y(B),
|
|
1698
|
-
return
|
|
1656
|
+
width: ie,
|
|
1657
|
+
getRowHeight: be,
|
|
1658
|
+
onScroll: ce
|
|
1659
|
+
} = e, oe = Y(B), Se = oe ? Po : $o, me = n(f);
|
|
1660
|
+
return _("div", {
|
|
1699
1661
|
role: "table",
|
|
1700
|
-
class: [
|
|
1662
|
+
class: [o.e("table"), e.class],
|
|
1701
1663
|
style: G
|
|
1702
|
-
}, [
|
|
1703
|
-
ref:
|
|
1704
|
-
data:
|
|
1664
|
+
}, [_(Se, {
|
|
1665
|
+
ref: a,
|
|
1666
|
+
data: x,
|
|
1705
1667
|
useIsScrolling: D,
|
|
1706
1668
|
itemKey: b,
|
|
1707
1669
|
columnCache: 0,
|
|
1708
1670
|
columnWidth: oe ? S : K,
|
|
1709
1671
|
totalColumn: 1,
|
|
1710
|
-
totalRow:
|
|
1711
|
-
rowCache:
|
|
1712
|
-
rowHeight: oe ?
|
|
1713
|
-
width:
|
|
1714
|
-
height:
|
|
1715
|
-
class:
|
|
1672
|
+
totalRow: x.length,
|
|
1673
|
+
rowCache: H,
|
|
1674
|
+
rowHeight: oe ? be : P,
|
|
1675
|
+
width: ie,
|
|
1676
|
+
height: n(s),
|
|
1677
|
+
class: o.e("body"),
|
|
1716
1678
|
role: "rowgroup",
|
|
1717
1679
|
scrollbarStartGap: A,
|
|
1718
|
-
scrollbarEndGap:
|
|
1680
|
+
scrollbarEndGap: R,
|
|
1719
1681
|
scrollbarAlwaysOn: F,
|
|
1720
|
-
onScroll:
|
|
1682
|
+
onScroll: ce,
|
|
1721
1683
|
onItemRendered: g,
|
|
1722
1684
|
perfMode: !1
|
|
1723
1685
|
}, {
|
|
1724
|
-
default: (
|
|
1686
|
+
default: (ne) => {
|
|
1725
1687
|
var te;
|
|
1726
|
-
const
|
|
1688
|
+
const re = x[ne.rowIndex];
|
|
1727
1689
|
return (te = t.row) == null ? void 0 : te.call(t, {
|
|
1728
|
-
...
|
|
1690
|
+
...ne,
|
|
1729
1691
|
columns: M,
|
|
1730
|
-
rowData:
|
|
1692
|
+
rowData: re
|
|
1731
1693
|
});
|
|
1732
1694
|
}
|
|
1733
|
-
}),
|
|
1695
|
+
}), n(i) && _(Oo, {
|
|
1734
1696
|
ref: v,
|
|
1735
|
-
class:
|
|
1697
|
+
class: o.e("header-wrapper"),
|
|
1736
1698
|
columns: M,
|
|
1737
|
-
headerData:
|
|
1699
|
+
headerData: x,
|
|
1738
1700
|
headerHeight: e.headerHeight,
|
|
1739
1701
|
fixedHeaderData: O,
|
|
1740
1702
|
rowWidth: k,
|
|
1741
1703
|
rowHeight: P,
|
|
1742
|
-
width:
|
|
1743
|
-
height: Math.min(
|
|
1704
|
+
width: ie,
|
|
1705
|
+
height: Math.min(me + n(r), U)
|
|
1744
1706
|
}, {
|
|
1745
1707
|
dynamic: t.header,
|
|
1746
1708
|
fixed: t.row
|
|
@@ -1748,67 +1710,67 @@ const Fn = ({ atXEndEdge: e, atXStartEdge: t, atYEndEdge: l, atYStartEdge: n },
|
|
|
1748
1710
|
};
|
|
1749
1711
|
}
|
|
1750
1712
|
});
|
|
1751
|
-
var
|
|
1752
|
-
function
|
|
1713
|
+
var Mt = Go;
|
|
1714
|
+
function Vo(e) {
|
|
1753
1715
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1754
1716
|
}
|
|
1755
|
-
const
|
|
1717
|
+
const ko = (e, {
|
|
1756
1718
|
slots: t
|
|
1757
1719
|
}) => {
|
|
1758
1720
|
const {
|
|
1759
1721
|
mainTableRef: l,
|
|
1760
|
-
...
|
|
1722
|
+
...o
|
|
1761
1723
|
} = e;
|
|
1762
|
-
return
|
|
1724
|
+
return _(Mt, Z({
|
|
1763
1725
|
ref: l
|
|
1764
|
-
},
|
|
1726
|
+
}, o), Vo(t) ? t : {
|
|
1765
1727
|
default: () => [t]
|
|
1766
1728
|
});
|
|
1767
1729
|
};
|
|
1768
|
-
var
|
|
1769
|
-
function
|
|
1730
|
+
var Ko = ko;
|
|
1731
|
+
function jo(e) {
|
|
1770
1732
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1771
1733
|
}
|
|
1772
|
-
const
|
|
1734
|
+
const Bo = (e, {
|
|
1773
1735
|
slots: t
|
|
1774
1736
|
}) => {
|
|
1775
1737
|
if (!e.columns.length)
|
|
1776
1738
|
return;
|
|
1777
1739
|
const {
|
|
1778
1740
|
leftTableRef: l,
|
|
1779
|
-
...
|
|
1741
|
+
...o
|
|
1780
1742
|
} = e;
|
|
1781
|
-
return
|
|
1743
|
+
return _(Mt, Z({
|
|
1782
1744
|
ref: l
|
|
1783
|
-
},
|
|
1745
|
+
}, o), jo(t) ? t : {
|
|
1784
1746
|
default: () => [t]
|
|
1785
1747
|
});
|
|
1786
1748
|
};
|
|
1787
|
-
var
|
|
1788
|
-
function
|
|
1749
|
+
var Uo = Bo;
|
|
1750
|
+
function qo(e) {
|
|
1789
1751
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1790
1752
|
}
|
|
1791
|
-
const
|
|
1753
|
+
const Yo = (e, {
|
|
1792
1754
|
slots: t
|
|
1793
1755
|
}) => {
|
|
1794
1756
|
if (!e.columns.length)
|
|
1795
1757
|
return;
|
|
1796
1758
|
const {
|
|
1797
1759
|
rightTableRef: l,
|
|
1798
|
-
...
|
|
1760
|
+
...o
|
|
1799
1761
|
} = e;
|
|
1800
|
-
return
|
|
1762
|
+
return _(Mt, Z({
|
|
1801
1763
|
ref: l
|
|
1802
|
-
},
|
|
1764
|
+
}, o), qo(t) ? t : {
|
|
1803
1765
|
default: () => [t]
|
|
1804
1766
|
});
|
|
1805
1767
|
};
|
|
1806
|
-
var
|
|
1807
|
-
const
|
|
1768
|
+
var Zo = Yo;
|
|
1769
|
+
const Xo = (e) => {
|
|
1808
1770
|
const {
|
|
1809
1771
|
isScrolling: t
|
|
1810
|
-
} =
|
|
1811
|
-
const f = o
|
|
1772
|
+
} = Ct(_t), l = V(!1), o = V(), a = T(() => Y(e.estimatedRowHeight) && e.rowIndex >= 0), r = (v = !1) => {
|
|
1773
|
+
const f = n(o);
|
|
1812
1774
|
if (!f)
|
|
1813
1775
|
return;
|
|
1814
1776
|
const {
|
|
@@ -1820,9 +1782,9 @@ const oo = (e) => {
|
|
|
1820
1782
|
} = e, {
|
|
1821
1783
|
height: u
|
|
1822
1784
|
} = f.getBoundingClientRect();
|
|
1823
|
-
l.value = !0,
|
|
1785
|
+
l.value = !0, Pe(() => {
|
|
1824
1786
|
if (v || u !== Number.parseInt(y.height)) {
|
|
1825
|
-
const c = d[0], h = (c == null ? void 0 : c.placeholderSign) ===
|
|
1787
|
+
const c = d[0], h = (c == null ? void 0 : c.placeholderSign) === Ye;
|
|
1826
1788
|
w == null || w({
|
|
1827
1789
|
rowKey: b,
|
|
1828
1790
|
height: u,
|
|
@@ -1838,7 +1800,7 @@ const oo = (e) => {
|
|
|
1838
1800
|
onRowHover: w
|
|
1839
1801
|
} = e, b = e.rowEventHandlers || {}, g = {};
|
|
1840
1802
|
return Object.entries(b).forEach(([y, u]) => {
|
|
1841
|
-
|
|
1803
|
+
Be(u) && (g[y] = (c) => {
|
|
1842
1804
|
u({
|
|
1843
1805
|
event: c,
|
|
1844
1806
|
rowData: v,
|
|
@@ -1882,31 +1844,31 @@ const oo = (e) => {
|
|
|
1882
1844
|
});
|
|
1883
1845
|
};
|
|
1884
1846
|
return st(() => {
|
|
1885
|
-
|
|
1847
|
+
n(a) && r(!0);
|
|
1886
1848
|
}), {
|
|
1887
1849
|
isScrolling: t,
|
|
1888
|
-
measurable:
|
|
1850
|
+
measurable: a,
|
|
1889
1851
|
measured: l,
|
|
1890
|
-
rowRef:
|
|
1852
|
+
rowRef: o,
|
|
1891
1853
|
eventHandlers: s,
|
|
1892
1854
|
onExpand: i
|
|
1893
1855
|
};
|
|
1894
|
-
},
|
|
1895
|
-
name:
|
|
1896
|
-
props:
|
|
1856
|
+
}, Jo = "ElTableV2TableRow", Qo = we({
|
|
1857
|
+
name: Jo,
|
|
1858
|
+
props: Ee,
|
|
1897
1859
|
setup(e, {
|
|
1898
1860
|
expose: t,
|
|
1899
1861
|
slots: l,
|
|
1900
|
-
attrs:
|
|
1862
|
+
attrs: o
|
|
1901
1863
|
}) {
|
|
1902
1864
|
const {
|
|
1903
|
-
eventHandlers:
|
|
1904
|
-
isScrolling:
|
|
1865
|
+
eventHandlers: a,
|
|
1866
|
+
isScrolling: r,
|
|
1905
1867
|
measurable: s,
|
|
1906
1868
|
measured: i,
|
|
1907
1869
|
rowRef: v,
|
|
1908
1870
|
onExpand: f
|
|
1909
|
-
} =
|
|
1871
|
+
} = Xo(e);
|
|
1910
1872
|
return t({
|
|
1911
1873
|
onExpand: f
|
|
1912
1874
|
}), () => {
|
|
@@ -1920,7 +1882,7 @@ const oo = (e) => {
|
|
|
1920
1882
|
style: c
|
|
1921
1883
|
} = e;
|
|
1922
1884
|
let h = d.map((m, S) => {
|
|
1923
|
-
const
|
|
1885
|
+
const H = $e(y.children) && y.children.length > 0 && m.key === b;
|
|
1924
1886
|
return l.cell({
|
|
1925
1887
|
column: m,
|
|
1926
1888
|
columns: d,
|
|
@@ -1929,8 +1891,8 @@ const oo = (e) => {
|
|
|
1929
1891
|
style: w[m.key],
|
|
1930
1892
|
rowData: y,
|
|
1931
1893
|
rowIndex: u,
|
|
1932
|
-
isScrolling:
|
|
1933
|
-
expandIconProps:
|
|
1894
|
+
isScrolling: n(r),
|
|
1895
|
+
expandIconProps: H ? {
|
|
1934
1896
|
rowData: y,
|
|
1935
1897
|
rowIndex: u,
|
|
1936
1898
|
onExpand: f
|
|
@@ -1938,46 +1900,46 @@ const oo = (e) => {
|
|
|
1938
1900
|
});
|
|
1939
1901
|
});
|
|
1940
1902
|
if (l.row && (h = l.row({
|
|
1941
|
-
cells: h.map((m) =>
|
|
1903
|
+
cells: h.map((m) => $e(m) && m.length === 1 ? m[0] : m),
|
|
1942
1904
|
style: c,
|
|
1943
1905
|
columns: d,
|
|
1944
1906
|
depth: g,
|
|
1945
1907
|
rowData: y,
|
|
1946
1908
|
rowIndex: u,
|
|
1947
|
-
isScrolling:
|
|
1948
|
-
})),
|
|
1909
|
+
isScrolling: n(r)
|
|
1910
|
+
})), n(s)) {
|
|
1949
1911
|
const {
|
|
1950
1912
|
height: m,
|
|
1951
1913
|
...S
|
|
1952
|
-
} = c || {},
|
|
1953
|
-
return
|
|
1914
|
+
} = c || {}, H = n(i);
|
|
1915
|
+
return _("div", Z({
|
|
1954
1916
|
ref: v,
|
|
1955
1917
|
class: e.class,
|
|
1956
|
-
style:
|
|
1918
|
+
style: H ? c : S,
|
|
1957
1919
|
role: "row"
|
|
1958
|
-
},
|
|
1920
|
+
}, o, n(a)), [h]);
|
|
1959
1921
|
}
|
|
1960
|
-
return
|
|
1922
|
+
return _("div", Z(o, {
|
|
1961
1923
|
ref: v,
|
|
1962
1924
|
class: e.class,
|
|
1963
1925
|
style: c,
|
|
1964
1926
|
role: "row"
|
|
1965
|
-
},
|
|
1927
|
+
}, n(a)), [h]);
|
|
1966
1928
|
};
|
|
1967
1929
|
}
|
|
1968
1930
|
});
|
|
1969
|
-
var
|
|
1970
|
-
function
|
|
1931
|
+
var en = Qo;
|
|
1932
|
+
function tn(e) {
|
|
1971
1933
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
1972
1934
|
}
|
|
1973
|
-
const
|
|
1935
|
+
const ln = (e, {
|
|
1974
1936
|
slots: t
|
|
1975
1937
|
}) => {
|
|
1976
1938
|
const {
|
|
1977
1939
|
columns: l,
|
|
1978
|
-
columnsStyles:
|
|
1979
|
-
depthMap:
|
|
1980
|
-
expandColumnKey:
|
|
1940
|
+
columnsStyles: o,
|
|
1941
|
+
depthMap: a,
|
|
1942
|
+
expandColumnKey: r,
|
|
1981
1943
|
expandedRowKeys: s,
|
|
1982
1944
|
estimatedRowHeight: i,
|
|
1983
1945
|
hasFixedColumns: v,
|
|
@@ -1992,40 +1954,40 @@ const co = (e, {
|
|
|
1992
1954
|
ns: h,
|
|
1993
1955
|
onRowHovered: m,
|
|
1994
1956
|
onRowExpanded: S
|
|
1995
|
-
} = e,
|
|
1957
|
+
} = e, H = He(y, {
|
|
1996
1958
|
columns: l,
|
|
1997
1959
|
rowData: f,
|
|
1998
1960
|
rowIndex: d
|
|
1999
|
-
}, ""), M =
|
|
1961
|
+
}, ""), M = He(g, {
|
|
2000
1962
|
columns: l,
|
|
2001
1963
|
rowData: f,
|
|
2002
1964
|
rowIndex: d
|
|
2003
|
-
}),
|
|
1965
|
+
}), x = f[u], O = a[x] || 0, D = !!r, F = d < 0, R = [h.e("row"), H, {
|
|
2004
1966
|
[h.e(`row-depth-${O}`)]: D && d >= 0,
|
|
2005
|
-
[h.is("expanded")]: D && s.includes(
|
|
1967
|
+
[h.is("expanded")]: D && s.includes(x),
|
|
2006
1968
|
[h.is("fixed")]: !O && F,
|
|
2007
1969
|
[h.is("customized")]: !!t.row
|
|
2008
1970
|
}], A = v ? m : void 0, G = {
|
|
2009
1971
|
...M,
|
|
2010
1972
|
columns: l,
|
|
2011
|
-
columnsStyles:
|
|
2012
|
-
class:
|
|
1973
|
+
columnsStyles: o,
|
|
1974
|
+
class: R,
|
|
2013
1975
|
depth: O,
|
|
2014
|
-
expandColumnKey:
|
|
1976
|
+
expandColumnKey: r,
|
|
2015
1977
|
estimatedRowHeight: F ? void 0 : i,
|
|
2016
1978
|
isScrolling: b,
|
|
2017
1979
|
rowIndex: d,
|
|
2018
1980
|
rowData: f,
|
|
2019
|
-
rowKey:
|
|
1981
|
+
rowKey: x,
|
|
2020
1982
|
rowEventHandlers: c,
|
|
2021
1983
|
style: w
|
|
2022
1984
|
};
|
|
2023
|
-
return
|
|
1985
|
+
return _(en, Z(G, {
|
|
2024
1986
|
onRowExpand: S,
|
|
2025
1987
|
onMouseenter: (B) => {
|
|
2026
1988
|
A == null || A({
|
|
2027
1989
|
hovered: !0,
|
|
2028
|
-
rowKey:
|
|
1990
|
+
rowKey: x,
|
|
2029
1991
|
event: B,
|
|
2030
1992
|
rowData: f,
|
|
2031
1993
|
rowIndex: d
|
|
@@ -2034,61 +1996,61 @@ const co = (e, {
|
|
|
2034
1996
|
onMouseleave: (B) => {
|
|
2035
1997
|
A == null || A({
|
|
2036
1998
|
hovered: !1,
|
|
2037
|
-
rowKey:
|
|
1999
|
+
rowKey: x,
|
|
2038
2000
|
event: B,
|
|
2039
2001
|
rowData: f,
|
|
2040
2002
|
rowIndex: d
|
|
2041
2003
|
});
|
|
2042
2004
|
},
|
|
2043
|
-
rowkey:
|
|
2044
|
-
}),
|
|
2005
|
+
rowkey: x
|
|
2006
|
+
}), tn(t) ? t : {
|
|
2045
2007
|
default: () => [t]
|
|
2046
2008
|
});
|
|
2047
2009
|
};
|
|
2048
|
-
var
|
|
2049
|
-
const
|
|
2010
|
+
var on = ln;
|
|
2011
|
+
const It = (e, {
|
|
2050
2012
|
slots: t
|
|
2051
2013
|
}) => {
|
|
2052
2014
|
var l;
|
|
2053
2015
|
const {
|
|
2054
|
-
cellData:
|
|
2055
|
-
style:
|
|
2056
|
-
} = e,
|
|
2057
|
-
return
|
|
2016
|
+
cellData: o,
|
|
2017
|
+
style: a
|
|
2018
|
+
} = e, r = ((l = o == null ? void 0 : o.toString) == null ? void 0 : l.call(o)) || "", s = Ze(t, "default", e, () => [r]);
|
|
2019
|
+
return _("div", {
|
|
2058
2020
|
class: e.class,
|
|
2059
|
-
title:
|
|
2060
|
-
style:
|
|
2021
|
+
title: r,
|
|
2022
|
+
style: a
|
|
2061
2023
|
}, [s]);
|
|
2062
2024
|
};
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
var
|
|
2066
|
-
const
|
|
2025
|
+
It.displayName = "ElTableV2Cell";
|
|
2026
|
+
It.inheritAttrs = !1;
|
|
2027
|
+
var nn = It;
|
|
2028
|
+
const rn = (e) => {
|
|
2067
2029
|
const {
|
|
2068
2030
|
expanded: t,
|
|
2069
2031
|
expandable: l,
|
|
2070
|
-
onExpand:
|
|
2071
|
-
style:
|
|
2072
|
-
size:
|
|
2032
|
+
onExpand: o,
|
|
2033
|
+
style: a,
|
|
2034
|
+
size: r
|
|
2073
2035
|
} = e, s = {
|
|
2074
|
-
onClick: l ? () =>
|
|
2036
|
+
onClick: l ? () => o(!t) : void 0,
|
|
2075
2037
|
class: e.class
|
|
2076
2038
|
};
|
|
2077
|
-
return
|
|
2078
|
-
size:
|
|
2079
|
-
style:
|
|
2039
|
+
return _(cl, Z(s, {
|
|
2040
|
+
size: r,
|
|
2041
|
+
style: a
|
|
2080
2042
|
}), {
|
|
2081
|
-
default: () => [
|
|
2043
|
+
default: () => [_(ao, null, null)]
|
|
2082
2044
|
});
|
|
2083
2045
|
};
|
|
2084
|
-
var
|
|
2085
|
-
const
|
|
2046
|
+
var an = rn;
|
|
2047
|
+
const Al = ({
|
|
2086
2048
|
columns: e,
|
|
2087
2049
|
column: t,
|
|
2088
2050
|
columnIndex: l,
|
|
2089
|
-
depth:
|
|
2090
|
-
expandIconProps:
|
|
2091
|
-
isScrolling:
|
|
2051
|
+
depth: o,
|
|
2052
|
+
expandIconProps: a,
|
|
2053
|
+
isScrolling: r,
|
|
2092
2054
|
rowData: s,
|
|
2093
2055
|
rowIndex: i,
|
|
2094
2056
|
style: v,
|
|
@@ -2102,23 +2064,23 @@ const Nl = ({
|
|
|
2102
2064
|
}, {
|
|
2103
2065
|
slots: c
|
|
2104
2066
|
}) => {
|
|
2105
|
-
const h =
|
|
2106
|
-
if (t.placeholderSign ===
|
|
2107
|
-
return
|
|
2067
|
+
const h = ye(v);
|
|
2068
|
+
if (t.placeholderSign === Ye)
|
|
2069
|
+
return _("div", {
|
|
2108
2070
|
class: d.em("row-cell", "placeholder"),
|
|
2109
2071
|
style: h
|
|
2110
2072
|
}, null);
|
|
2111
2073
|
const {
|
|
2112
2074
|
cellRenderer: m,
|
|
2113
2075
|
dataKey: S,
|
|
2114
|
-
dataGetter:
|
|
2115
|
-
} = t, M =
|
|
2076
|
+
dataGetter: H
|
|
2077
|
+
} = t, M = Be(H) ? H({
|
|
2116
2078
|
columns: e,
|
|
2117
2079
|
column: t,
|
|
2118
2080
|
columnIndex: l,
|
|
2119
2081
|
rowData: s,
|
|
2120
2082
|
rowIndex: i
|
|
2121
|
-
}) :
|
|
2083
|
+
}) : no(s, S ?? ""), x = He(w, {
|
|
2122
2084
|
cellData: M,
|
|
2123
2085
|
columns: e,
|
|
2124
2086
|
column: t,
|
|
@@ -2131,81 +2093,81 @@ const Nl = ({
|
|
|
2131
2093
|
column: t,
|
|
2132
2094
|
columnIndex: l,
|
|
2133
2095
|
cellData: M,
|
|
2134
|
-
isScrolling:
|
|
2096
|
+
isScrolling: r,
|
|
2135
2097
|
rowData: s,
|
|
2136
2098
|
rowIndex: i
|
|
2137
|
-
}, D =
|
|
2099
|
+
}, D = xl(m), F = D ? D(O) : Ze(c, "default", O, () => [_(nn, O, null)]), R = [d.e("row-cell"), t.class, t.align === qe.CENTER && d.is("align-center"), t.align === qe.RIGHT && d.is("align-right")], A = i >= 0 && b && t.key === b, G = i >= 0 && f.includes(s[u]);
|
|
2138
2100
|
let P;
|
|
2139
|
-
const K = `margin-inline-start: ${
|
|
2140
|
-
return A && (
|
|
2101
|
+
const K = `margin-inline-start: ${o * g}px;`;
|
|
2102
|
+
return A && (Et(a) ? P = _(an, Z(a, {
|
|
2141
2103
|
class: [d.e("expand-icon"), d.is("expanded", G)],
|
|
2142
2104
|
size: y,
|
|
2143
2105
|
expanded: G,
|
|
2144
2106
|
style: K,
|
|
2145
2107
|
expandable: !0
|
|
2146
|
-
}), null) : P =
|
|
2108
|
+
}), null) : P = _("div", {
|
|
2147
2109
|
style: [K, `width: ${y}px; height: ${y}px;`].join(" ")
|
|
2148
|
-
}, null)),
|
|
2149
|
-
class:
|
|
2110
|
+
}, null)), _("div", Z({
|
|
2111
|
+
class: R,
|
|
2150
2112
|
style: h
|
|
2151
|
-
},
|
|
2113
|
+
}, x, {
|
|
2152
2114
|
role: "cell"
|
|
2153
2115
|
}), [P, F]);
|
|
2154
2116
|
};
|
|
2155
|
-
|
|
2156
|
-
var
|
|
2157
|
-
const
|
|
2117
|
+
Al.inheritAttrs = !1;
|
|
2118
|
+
var el = Al;
|
|
2119
|
+
const sn = se({
|
|
2158
2120
|
class: String,
|
|
2159
|
-
columns:
|
|
2121
|
+
columns: Xe,
|
|
2160
2122
|
columnsStyles: {
|
|
2161
2123
|
type: I(Object),
|
|
2162
2124
|
required: !0
|
|
2163
2125
|
},
|
|
2164
2126
|
headerIndex: Number,
|
|
2165
2127
|
style: { type: I(Object) }
|
|
2166
|
-
}),
|
|
2128
|
+
}), cn = we({
|
|
2167
2129
|
name: "ElTableV2HeaderRow",
|
|
2168
|
-
props:
|
|
2130
|
+
props: sn,
|
|
2169
2131
|
setup(e, {
|
|
2170
2132
|
slots: t
|
|
2171
2133
|
}) {
|
|
2172
2134
|
return () => {
|
|
2173
2135
|
const {
|
|
2174
2136
|
columns: l,
|
|
2175
|
-
columnsStyles:
|
|
2176
|
-
headerIndex:
|
|
2177
|
-
style:
|
|
2137
|
+
columnsStyles: o,
|
|
2138
|
+
headerIndex: a,
|
|
2139
|
+
style: r
|
|
2178
2140
|
} = e;
|
|
2179
2141
|
let s = l.map((i, v) => t.cell({
|
|
2180
2142
|
columns: l,
|
|
2181
2143
|
column: i,
|
|
2182
2144
|
columnIndex: v,
|
|
2183
|
-
headerIndex:
|
|
2184
|
-
style:
|
|
2145
|
+
headerIndex: a,
|
|
2146
|
+
style: o[i.key]
|
|
2185
2147
|
}));
|
|
2186
2148
|
return t.header && (s = t.header({
|
|
2187
|
-
cells: s.map((i) =>
|
|
2149
|
+
cells: s.map((i) => $e(i) && i.length === 1 ? i[0] : i),
|
|
2188
2150
|
columns: l,
|
|
2189
|
-
headerIndex:
|
|
2190
|
-
})),
|
|
2151
|
+
headerIndex: a
|
|
2152
|
+
})), _("div", {
|
|
2191
2153
|
class: e.class,
|
|
2192
|
-
style:
|
|
2154
|
+
style: r,
|
|
2193
2155
|
role: "row"
|
|
2194
2156
|
}, [s]);
|
|
2195
2157
|
};
|
|
2196
2158
|
}
|
|
2197
2159
|
});
|
|
2198
|
-
var
|
|
2199
|
-
function
|
|
2160
|
+
var dn = cn;
|
|
2161
|
+
function un(e) {
|
|
2200
2162
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
2201
2163
|
}
|
|
2202
|
-
const
|
|
2164
|
+
const hn = ({
|
|
2203
2165
|
columns: e,
|
|
2204
2166
|
columnsStyles: t,
|
|
2205
2167
|
headerIndex: l,
|
|
2206
|
-
style:
|
|
2207
|
-
headerClass:
|
|
2208
|
-
headerProps:
|
|
2168
|
+
style: o,
|
|
2169
|
+
headerClass: a,
|
|
2170
|
+
headerProps: r,
|
|
2209
2171
|
ns: s
|
|
2210
2172
|
}, {
|
|
2211
2173
|
slots: i
|
|
@@ -2213,57 +2175,57 @@ const bo = ({
|
|
|
2213
2175
|
const v = {
|
|
2214
2176
|
columns: e,
|
|
2215
2177
|
headerIndex: l
|
|
2216
|
-
}, f = [s.e("header-row"),
|
|
2178
|
+
}, f = [s.e("header-row"), He(a, v, ""), {
|
|
2217
2179
|
[s.is("customized")]: !!i.header
|
|
2218
2180
|
}], d = {
|
|
2219
|
-
...
|
|
2181
|
+
...He(r, v),
|
|
2220
2182
|
columnsStyles: t,
|
|
2221
2183
|
class: f,
|
|
2222
2184
|
columns: e,
|
|
2223
2185
|
headerIndex: l,
|
|
2224
|
-
style:
|
|
2186
|
+
style: o
|
|
2225
2187
|
};
|
|
2226
|
-
return
|
|
2188
|
+
return _(dn, d, un(i) ? i : {
|
|
2227
2189
|
default: () => [i]
|
|
2228
2190
|
});
|
|
2229
2191
|
};
|
|
2230
|
-
var
|
|
2231
|
-
const
|
|
2192
|
+
var fn = hn;
|
|
2193
|
+
const At = (e, {
|
|
2232
2194
|
slots: t
|
|
2233
|
-
}) =>
|
|
2234
|
-
var l,
|
|
2235
|
-
return [
|
|
2195
|
+
}) => Ze(t, "default", e, () => {
|
|
2196
|
+
var l, o;
|
|
2197
|
+
return [_("div", {
|
|
2236
2198
|
class: e.class,
|
|
2237
2199
|
title: (l = e.column) == null ? void 0 : l.title
|
|
2238
|
-
}, [(
|
|
2200
|
+
}, [(o = e.column) == null ? void 0 : o.title])];
|
|
2239
2201
|
});
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
var
|
|
2243
|
-
const
|
|
2202
|
+
At.displayName = "ElTableV2HeaderCell";
|
|
2203
|
+
At.inheritAttrs = !1;
|
|
2204
|
+
var mn = At;
|
|
2205
|
+
const vn = (e) => {
|
|
2244
2206
|
const {
|
|
2245
2207
|
sortOrder: t
|
|
2246
2208
|
} = e;
|
|
2247
|
-
return
|
|
2209
|
+
return _(cl, {
|
|
2248
2210
|
size: 14,
|
|
2249
2211
|
class: e.class
|
|
2250
2212
|
}, {
|
|
2251
|
-
default: () => [t ===
|
|
2213
|
+
default: () => [t === Ue.ASC ? _(so, null, null) : _(io, null, null)]
|
|
2252
2214
|
});
|
|
2253
2215
|
};
|
|
2254
|
-
var
|
|
2255
|
-
const
|
|
2216
|
+
var gn = vn;
|
|
2217
|
+
const yn = (e, {
|
|
2256
2218
|
slots: t
|
|
2257
2219
|
}) => {
|
|
2258
2220
|
const {
|
|
2259
2221
|
column: l,
|
|
2260
|
-
ns:
|
|
2261
|
-
style:
|
|
2262
|
-
onColumnSorted:
|
|
2263
|
-
} = e, s =
|
|
2264
|
-
if (l.placeholderSign ===
|
|
2265
|
-
return
|
|
2266
|
-
class:
|
|
2222
|
+
ns: o,
|
|
2223
|
+
style: a,
|
|
2224
|
+
onColumnSorted: r
|
|
2225
|
+
} = e, s = ye(a);
|
|
2226
|
+
if (l.placeholderSign === Ye)
|
|
2227
|
+
return _("div", {
|
|
2228
|
+
class: o.em("header-row-cell", "placeholder"),
|
|
2267
2229
|
style: s
|
|
2268
2230
|
}, null);
|
|
2269
2231
|
const {
|
|
@@ -2272,79 +2234,79 @@ const Eo = (e, {
|
|
|
2272
2234
|
sortable: f
|
|
2273
2235
|
} = l, d = {
|
|
2274
2236
|
...e,
|
|
2275
|
-
class:
|
|
2276
|
-
}, w =
|
|
2237
|
+
class: o.e("header-cell-text")
|
|
2238
|
+
}, w = xl(i), b = w ? w(d) : Ze(t, "default", d, () => [_(mn, d, null)]), {
|
|
2277
2239
|
sortBy: g,
|
|
2278
2240
|
sortState: y,
|
|
2279
2241
|
headerCellProps: u
|
|
2280
2242
|
} = e;
|
|
2281
2243
|
let c, h;
|
|
2282
2244
|
if (y) {
|
|
2283
|
-
const
|
|
2284
|
-
c = !!
|
|
2245
|
+
const H = y[l.key];
|
|
2246
|
+
c = !!Rt[H], h = c ? H : Ue.ASC;
|
|
2285
2247
|
} else
|
|
2286
|
-
c = l.key === g.key, h = c ? g.order :
|
|
2287
|
-
const m = [
|
|
2288
|
-
...
|
|
2289
|
-
onClick: l.sortable ?
|
|
2248
|
+
c = l.key === g.key, h = c ? g.order : Ue.ASC;
|
|
2249
|
+
const m = [o.e("header-cell"), He(v, e, ""), l.align === qe.CENTER && o.is("align-center"), l.align === qe.RIGHT && o.is("align-right"), f && o.is("sortable")], S = {
|
|
2250
|
+
...He(u, e),
|
|
2251
|
+
onClick: l.sortable ? r : void 0,
|
|
2290
2252
|
class: m,
|
|
2291
2253
|
style: s,
|
|
2292
2254
|
"data-key": l.key
|
|
2293
2255
|
};
|
|
2294
|
-
return
|
|
2256
|
+
return _("div", Z(S, {
|
|
2295
2257
|
role: "columnheader"
|
|
2296
|
-
}), [b, f &&
|
|
2297
|
-
class: [
|
|
2258
|
+
}), [b, f && _(gn, {
|
|
2259
|
+
class: [o.e("sort-icon"), c && o.is("sorting")],
|
|
2298
2260
|
sortOrder: h
|
|
2299
2261
|
}, null)]);
|
|
2300
2262
|
};
|
|
2301
|
-
var
|
|
2302
|
-
const
|
|
2263
|
+
var tl = yn;
|
|
2264
|
+
const Ol = (e, {
|
|
2303
2265
|
slots: t
|
|
2304
2266
|
}) => {
|
|
2305
2267
|
var l;
|
|
2306
|
-
return
|
|
2268
|
+
return _("div", {
|
|
2307
2269
|
class: e.class,
|
|
2308
2270
|
style: e.style
|
|
2309
2271
|
}, [(l = t.default) == null ? void 0 : l.call(t)]);
|
|
2310
2272
|
};
|
|
2311
|
-
|
|
2312
|
-
var
|
|
2313
|
-
const
|
|
2273
|
+
Ol.displayName = "ElTableV2Footer";
|
|
2274
|
+
var wn = Ol;
|
|
2275
|
+
const Nl = (e, {
|
|
2314
2276
|
slots: t
|
|
2315
2277
|
}) => {
|
|
2316
|
-
const l =
|
|
2317
|
-
return
|
|
2278
|
+
const l = Ze(t, "default", {}, () => [_(ol, null, null)]);
|
|
2279
|
+
return _("div", {
|
|
2318
2280
|
class: e.class,
|
|
2319
2281
|
style: e.style
|
|
2320
2282
|
}, [l]);
|
|
2321
2283
|
};
|
|
2322
|
-
|
|
2323
|
-
var
|
|
2324
|
-
const
|
|
2284
|
+
Nl.displayName = "ElTableV2Empty";
|
|
2285
|
+
var bn = Nl;
|
|
2286
|
+
const zl = (e, {
|
|
2325
2287
|
slots: t
|
|
2326
2288
|
}) => {
|
|
2327
2289
|
var l;
|
|
2328
|
-
return
|
|
2290
|
+
return _("div", {
|
|
2329
2291
|
class: e.class,
|
|
2330
2292
|
style: e.style
|
|
2331
2293
|
}, [(l = t.default) == null ? void 0 : l.call(t)]);
|
|
2332
2294
|
};
|
|
2333
|
-
|
|
2334
|
-
var
|
|
2335
|
-
function
|
|
2295
|
+
zl.displayName = "ElTableV2Overlay";
|
|
2296
|
+
var Sn = zl;
|
|
2297
|
+
function Ke(e) {
|
|
2336
2298
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ie(e);
|
|
2337
2299
|
}
|
|
2338
|
-
const
|
|
2339
|
-
name:
|
|
2340
|
-
props:
|
|
2300
|
+
const xn = "ElTableV2", Rn = we({
|
|
2301
|
+
name: xn,
|
|
2302
|
+
props: Mo,
|
|
2341
2303
|
setup(e, {
|
|
2342
2304
|
slots: t,
|
|
2343
2305
|
expose: l
|
|
2344
2306
|
}) {
|
|
2345
|
-
const
|
|
2346
|
-
columnsStyles:
|
|
2347
|
-
fixedColumnsOnLeft:
|
|
2307
|
+
const o = _e("table-v2"), {
|
|
2308
|
+
columnsStyles: a,
|
|
2309
|
+
fixedColumnsOnLeft: r,
|
|
2348
2310
|
fixedColumnsOnRight: s,
|
|
2349
2311
|
mainColumns: i,
|
|
2350
2312
|
mainTableHeight: v,
|
|
@@ -2359,13 +2321,13 @@ const Ho = "ElTableV2", Mo = ie({
|
|
|
2359
2321
|
leftTableRef: h,
|
|
2360
2322
|
rightTableRef: m,
|
|
2361
2323
|
isDynamic: S,
|
|
2362
|
-
isResetting:
|
|
2324
|
+
isResetting: H,
|
|
2363
2325
|
isScrolling: M,
|
|
2364
|
-
bodyWidth:
|
|
2326
|
+
bodyWidth: x,
|
|
2365
2327
|
emptyStyle: O,
|
|
2366
2328
|
rootStyle: D,
|
|
2367
2329
|
headerWidth: F,
|
|
2368
|
-
footerHeight:
|
|
2330
|
+
footerHeight: R,
|
|
2369
2331
|
showEmpty: A,
|
|
2370
2332
|
scrollTo: G,
|
|
2371
2333
|
scrollToLeft: P,
|
|
@@ -2373,59 +2335,59 @@ const Ho = "ElTableV2", Mo = ie({
|
|
|
2373
2335
|
scrollToRow: B,
|
|
2374
2336
|
getRowHeight: k,
|
|
2375
2337
|
onColumnSorted: U,
|
|
2376
|
-
onRowHeightChange:
|
|
2377
|
-
onRowHovered:
|
|
2378
|
-
onRowExpanded:
|
|
2338
|
+
onRowHeightChange: ie,
|
|
2339
|
+
onRowHovered: be,
|
|
2340
|
+
onRowExpanded: ce,
|
|
2379
2341
|
onRowsRendered: oe,
|
|
2380
|
-
onScroll:
|
|
2381
|
-
onVerticalScroll:
|
|
2382
|
-
} =
|
|
2342
|
+
onScroll: Se,
|
|
2343
|
+
onVerticalScroll: me
|
|
2344
|
+
} = Ho(e);
|
|
2383
2345
|
return l({
|
|
2384
2346
|
scrollTo: G,
|
|
2385
2347
|
scrollToLeft: P,
|
|
2386
2348
|
scrollToTop: K,
|
|
2387
2349
|
scrollToRow: B
|
|
2388
|
-
}),
|
|
2389
|
-
ns:
|
|
2390
|
-
isResetting:
|
|
2350
|
+
}), rl(_t, {
|
|
2351
|
+
ns: o,
|
|
2352
|
+
isResetting: H,
|
|
2391
2353
|
isScrolling: M
|
|
2392
2354
|
}), () => {
|
|
2393
2355
|
const {
|
|
2394
|
-
cache:
|
|
2356
|
+
cache: ne,
|
|
2395
2357
|
cellProps: te,
|
|
2396
|
-
estimatedRowHeight:
|
|
2358
|
+
estimatedRowHeight: re,
|
|
2397
2359
|
expandColumnKey: Ae,
|
|
2398
|
-
fixedData:
|
|
2399
|
-
headerHeight:
|
|
2400
|
-
headerClass:
|
|
2401
|
-
headerProps:
|
|
2402
|
-
headerCellProps:
|
|
2403
|
-
sortBy:
|
|
2360
|
+
fixedData: ve,
|
|
2361
|
+
headerHeight: ge,
|
|
2362
|
+
headerClass: We,
|
|
2363
|
+
headerProps: Fe,
|
|
2364
|
+
headerCellProps: Ge,
|
|
2365
|
+
sortBy: Ve,
|
|
2404
2366
|
sortState: X,
|
|
2405
2367
|
rowHeight: ee,
|
|
2406
|
-
rowClass:
|
|
2368
|
+
rowClass: de,
|
|
2407
2369
|
rowEventHandlers: E,
|
|
2408
|
-
rowKey:
|
|
2409
|
-
rowProps:
|
|
2370
|
+
rowKey: C,
|
|
2371
|
+
rowProps: p,
|
|
2410
2372
|
scrollbarAlwaysOn: N,
|
|
2411
2373
|
indentSize: z,
|
|
2412
2374
|
iconSize: L,
|
|
2413
2375
|
useIsScrolling: $,
|
|
2414
2376
|
vScrollbarSize: W,
|
|
2415
2377
|
width: j
|
|
2416
|
-
} = e, q =
|
|
2417
|
-
cache:
|
|
2418
|
-
class:
|
|
2419
|
-
columns:
|
|
2378
|
+
} = e, q = n(b), ae = {
|
|
2379
|
+
cache: ne,
|
|
2380
|
+
class: o.e("main"),
|
|
2381
|
+
columns: n(i),
|
|
2420
2382
|
data: q,
|
|
2421
|
-
fixedData:
|
|
2422
|
-
estimatedRowHeight:
|
|
2423
|
-
bodyWidth:
|
|
2424
|
-
headerHeight:
|
|
2425
|
-
headerWidth:
|
|
2426
|
-
height:
|
|
2383
|
+
fixedData: ve,
|
|
2384
|
+
estimatedRowHeight: re,
|
|
2385
|
+
bodyWidth: n(x) + W,
|
|
2386
|
+
headerHeight: ge,
|
|
2387
|
+
headerWidth: n(F),
|
|
2388
|
+
height: n(v),
|
|
2427
2389
|
mainTableRef: c,
|
|
2428
|
-
rowKey:
|
|
2390
|
+
rowKey: C,
|
|
2429
2391
|
rowHeight: ee,
|
|
2430
2392
|
scrollbarAlwaysOn: N,
|
|
2431
2393
|
scrollbarStartGap: 2,
|
|
@@ -2434,204 +2396,204 @@ const Ho = "ElTableV2", Mo = ie({
|
|
|
2434
2396
|
width: j,
|
|
2435
2397
|
getRowHeight: k,
|
|
2436
2398
|
onRowsRendered: oe,
|
|
2437
|
-
onScroll:
|
|
2438
|
-
}, J =
|
|
2439
|
-
cache:
|
|
2440
|
-
class:
|
|
2441
|
-
columns:
|
|
2399
|
+
onScroll: Se
|
|
2400
|
+
}, J = n(d), Q = n(f), ke = {
|
|
2401
|
+
cache: ne,
|
|
2402
|
+
class: o.e("left"),
|
|
2403
|
+
columns: n(r),
|
|
2442
2404
|
data: q,
|
|
2443
|
-
fixedData:
|
|
2444
|
-
estimatedRowHeight:
|
|
2405
|
+
fixedData: ve,
|
|
2406
|
+
estimatedRowHeight: re,
|
|
2445
2407
|
leftTableRef: h,
|
|
2446
2408
|
rowHeight: ee,
|
|
2447
2409
|
bodyWidth: J,
|
|
2448
2410
|
headerWidth: J,
|
|
2449
|
-
headerHeight:
|
|
2411
|
+
headerHeight: ge,
|
|
2450
2412
|
height: Q,
|
|
2451
|
-
rowKey:
|
|
2413
|
+
rowKey: C,
|
|
2452
2414
|
scrollbarAlwaysOn: N,
|
|
2453
2415
|
scrollbarStartGap: 2,
|
|
2454
2416
|
scrollbarEndGap: W,
|
|
2455
2417
|
useIsScrolling: $,
|
|
2456
2418
|
width: J,
|
|
2457
2419
|
getRowHeight: k,
|
|
2458
|
-
onScroll:
|
|
2459
|
-
}, it =
|
|
2460
|
-
cache:
|
|
2461
|
-
class:
|
|
2462
|
-
columns:
|
|
2420
|
+
onScroll: me
|
|
2421
|
+
}, it = n(w) + W, Ll = {
|
|
2422
|
+
cache: ne,
|
|
2423
|
+
class: o.e("right"),
|
|
2424
|
+
columns: n(s),
|
|
2463
2425
|
data: q,
|
|
2464
|
-
fixedData:
|
|
2465
|
-
estimatedRowHeight:
|
|
2426
|
+
fixedData: ve,
|
|
2427
|
+
estimatedRowHeight: re,
|
|
2466
2428
|
rightTableRef: m,
|
|
2467
2429
|
rowHeight: ee,
|
|
2468
2430
|
bodyWidth: it,
|
|
2469
2431
|
headerWidth: it,
|
|
2470
|
-
headerHeight:
|
|
2432
|
+
headerHeight: ge,
|
|
2471
2433
|
height: Q,
|
|
2472
|
-
rowKey:
|
|
2434
|
+
rowKey: C,
|
|
2473
2435
|
scrollbarAlwaysOn: N,
|
|
2474
2436
|
scrollbarStartGap: 2,
|
|
2475
2437
|
scrollbarEndGap: W,
|
|
2476
2438
|
width: it,
|
|
2477
|
-
style: `--${o
|
|
2439
|
+
style: `--${n(o.namespace)}-table-scrollbar-size: ${W}px`,
|
|
2478
2440
|
useIsScrolling: $,
|
|
2479
2441
|
getRowHeight: k,
|
|
2480
|
-
onScroll:
|
|
2481
|
-
}, Oe =
|
|
2482
|
-
ns:
|
|
2483
|
-
depthMap:
|
|
2442
|
+
onScroll: me
|
|
2443
|
+
}, Oe = n(a), Dl = {
|
|
2444
|
+
ns: o,
|
|
2445
|
+
depthMap: n(g),
|
|
2484
2446
|
columnsStyles: Oe,
|
|
2485
2447
|
expandColumnKey: Ae,
|
|
2486
|
-
expandedRowKeys:
|
|
2487
|
-
estimatedRowHeight:
|
|
2488
|
-
hasFixedColumns:
|
|
2489
|
-
rowProps:
|
|
2490
|
-
rowClass:
|
|
2491
|
-
rowKey:
|
|
2448
|
+
expandedRowKeys: n(y),
|
|
2449
|
+
estimatedRowHeight: re,
|
|
2450
|
+
hasFixedColumns: n(u),
|
|
2451
|
+
rowProps: p,
|
|
2452
|
+
rowClass: de,
|
|
2453
|
+
rowKey: C,
|
|
2492
2454
|
rowEventHandlers: E,
|
|
2493
|
-
onRowHovered:
|
|
2494
|
-
onRowExpanded:
|
|
2495
|
-
onRowHeightChange:
|
|
2496
|
-
},
|
|
2455
|
+
onRowHovered: be,
|
|
2456
|
+
onRowExpanded: ce,
|
|
2457
|
+
onRowHeightChange: ie
|
|
2458
|
+
}, Nt = {
|
|
2497
2459
|
cellProps: te,
|
|
2498
2460
|
expandColumnKey: Ae,
|
|
2499
2461
|
indentSize: z,
|
|
2500
2462
|
iconSize: L,
|
|
2501
|
-
rowKey:
|
|
2502
|
-
expandedRowKeys:
|
|
2503
|
-
ns:
|
|
2504
|
-
},
|
|
2505
|
-
ns:
|
|
2506
|
-
headerClass:
|
|
2507
|
-
headerProps:
|
|
2463
|
+
rowKey: C,
|
|
2464
|
+
expandedRowKeys: n(y),
|
|
2465
|
+
ns: o
|
|
2466
|
+
}, Pl = {
|
|
2467
|
+
ns: o,
|
|
2468
|
+
headerClass: We,
|
|
2469
|
+
headerProps: Fe,
|
|
2508
2470
|
columnsStyles: Oe
|
|
2509
|
-
},
|
|
2510
|
-
ns:
|
|
2511
|
-
sortBy:
|
|
2471
|
+
}, zt = {
|
|
2472
|
+
ns: o,
|
|
2473
|
+
sortBy: Ve,
|
|
2512
2474
|
sortState: X,
|
|
2513
|
-
headerCellProps:
|
|
2475
|
+
headerCellProps: Ge,
|
|
2514
2476
|
onColumnSorted: U
|
|
2515
|
-
},
|
|
2516
|
-
row: (ct) =>
|
|
2477
|
+
}, ue = {
|
|
2478
|
+
row: (ct) => _(on, Z(ct, Dl), {
|
|
2517
2479
|
row: t.row,
|
|
2518
2480
|
cell: (le) => {
|
|
2519
2481
|
let xe;
|
|
2520
|
-
return t.cell ?
|
|
2482
|
+
return t.cell ? _(el, Z(le, Nt, {
|
|
2521
2483
|
style: Oe[le.column.key]
|
|
2522
|
-
}),
|
|
2484
|
+
}), Ke(xe = t.cell(le)) ? xe : {
|
|
2523
2485
|
default: () => [xe]
|
|
2524
|
-
}) :
|
|
2486
|
+
}) : _(el, Z(le, Nt, {
|
|
2525
2487
|
style: Oe[le.column.key]
|
|
2526
2488
|
}), null);
|
|
2527
2489
|
}
|
|
2528
2490
|
}),
|
|
2529
|
-
header: (ct) =>
|
|
2491
|
+
header: (ct) => _(fn, Z(ct, Pl), {
|
|
2530
2492
|
header: t.header,
|
|
2531
2493
|
cell: (le) => {
|
|
2532
2494
|
let xe;
|
|
2533
|
-
return t["header-cell"] ?
|
|
2495
|
+
return t["header-cell"] ? _(tl, Z(le, zt, {
|
|
2534
2496
|
style: Oe[le.column.key]
|
|
2535
|
-
}),
|
|
2497
|
+
}), Ke(xe = t["header-cell"](le)) ? xe : {
|
|
2536
2498
|
default: () => [xe]
|
|
2537
|
-
}) :
|
|
2499
|
+
}) : _(tl, Z(le, zt, {
|
|
2538
2500
|
style: Oe[le.column.key]
|
|
2539
2501
|
}), null);
|
|
2540
2502
|
}
|
|
2541
2503
|
})
|
|
2542
|
-
},
|
|
2543
|
-
[
|
|
2544
|
-
}],
|
|
2545
|
-
class:
|
|
2546
|
-
style:
|
|
2504
|
+
}, $l = [e.class, o.b(), o.e("root"), {
|
|
2505
|
+
[o.is("dynamic")]: n(S)
|
|
2506
|
+
}], Wl = {
|
|
2507
|
+
class: o.e("footer"),
|
|
2508
|
+
style: n(R)
|
|
2547
2509
|
};
|
|
2548
|
-
return
|
|
2549
|
-
class:
|
|
2550
|
-
style:
|
|
2551
|
-
}, [
|
|
2552
|
-
default: () => [
|
|
2553
|
-
}),
|
|
2554
|
-
default: () => [
|
|
2555
|
-
}),
|
|
2556
|
-
default: () => [
|
|
2557
|
-
}), t.footer &&
|
|
2510
|
+
return _("div", {
|
|
2511
|
+
class: $l,
|
|
2512
|
+
style: n(D)
|
|
2513
|
+
}, [_(Ko, ae, Ke(ue) ? ue : {
|
|
2514
|
+
default: () => [ue]
|
|
2515
|
+
}), _(Uo, ke, Ke(ue) ? ue : {
|
|
2516
|
+
default: () => [ue]
|
|
2517
|
+
}), _(Zo, Ll, Ke(ue) ? ue : {
|
|
2518
|
+
default: () => [ue]
|
|
2519
|
+
}), t.footer && _(wn, Wl, {
|
|
2558
2520
|
default: t.footer
|
|
2559
|
-
}),
|
|
2560
|
-
class:
|
|
2561
|
-
style:
|
|
2521
|
+
}), n(A) && _(bn, {
|
|
2522
|
+
class: o.e("empty"),
|
|
2523
|
+
style: n(O)
|
|
2562
2524
|
}, {
|
|
2563
2525
|
default: t.empty
|
|
2564
|
-
}), t.overlay &&
|
|
2565
|
-
class:
|
|
2526
|
+
}), t.overlay && _(Sn, {
|
|
2527
|
+
class: o.e("overlay")
|
|
2566
2528
|
}, {
|
|
2567
2529
|
default: t.overlay
|
|
2568
2530
|
})]);
|
|
2569
2531
|
};
|
|
2570
2532
|
}
|
|
2571
2533
|
});
|
|
2572
|
-
var
|
|
2573
|
-
const
|
|
2534
|
+
var Tn = Rn;
|
|
2535
|
+
const En = se({
|
|
2574
2536
|
disableWidth: Boolean,
|
|
2575
2537
|
disableHeight: Boolean,
|
|
2576
2538
|
onResize: {
|
|
2577
2539
|
type: I(Function)
|
|
2578
2540
|
}
|
|
2579
|
-
}),
|
|
2580
|
-
const t = V(), l = V(0),
|
|
2581
|
-
let
|
|
2541
|
+
}), Cn = (e) => {
|
|
2542
|
+
const t = V(), l = V(0), o = V(0);
|
|
2543
|
+
let a;
|
|
2582
2544
|
return st(() => {
|
|
2583
|
-
|
|
2584
|
-
const { width: s, height: i } =
|
|
2585
|
-
l.value = s - b - g,
|
|
2545
|
+
a = jl(t, ([r]) => {
|
|
2546
|
+
const { width: s, height: i } = r.contentRect, { paddingLeft: v, paddingRight: f, paddingTop: d, paddingBottom: w } = getComputedStyle(r.target), b = Number.parseInt(v) || 0, g = Number.parseInt(f) || 0, y = Number.parseInt(d) || 0, u = Number.parseInt(w) || 0;
|
|
2547
|
+
l.value = s - b - g, o.value = i - y - u;
|
|
2586
2548
|
}).stop;
|
|
2587
|
-
}),
|
|
2588
|
-
|
|
2589
|
-
}), Me([l,
|
|
2549
|
+
}), nl(() => {
|
|
2550
|
+
a == null || a();
|
|
2551
|
+
}), Me([l, o], ([r, s]) => {
|
|
2590
2552
|
var i;
|
|
2591
2553
|
(i = e.onResize) == null || i.call(e, {
|
|
2592
|
-
width:
|
|
2554
|
+
width: r,
|
|
2593
2555
|
height: s
|
|
2594
2556
|
});
|
|
2595
2557
|
}), {
|
|
2596
2558
|
sizer: t,
|
|
2597
2559
|
width: l,
|
|
2598
|
-
height:
|
|
2560
|
+
height: o
|
|
2599
2561
|
};
|
|
2600
|
-
},
|
|
2562
|
+
}, _n = we({
|
|
2601
2563
|
name: "ElAutoResizer",
|
|
2602
|
-
props:
|
|
2564
|
+
props: En,
|
|
2603
2565
|
setup(e, {
|
|
2604
2566
|
slots: t
|
|
2605
2567
|
}) {
|
|
2606
|
-
const l =
|
|
2607
|
-
height:
|
|
2608
|
-
width:
|
|
2609
|
-
sizer:
|
|
2610
|
-
} =
|
|
2568
|
+
const l = _e("auto-resizer"), {
|
|
2569
|
+
height: o,
|
|
2570
|
+
width: a,
|
|
2571
|
+
sizer: r
|
|
2572
|
+
} = Cn(e), s = {
|
|
2611
2573
|
width: "100%",
|
|
2612
2574
|
height: "100%"
|
|
2613
2575
|
};
|
|
2614
2576
|
return () => {
|
|
2615
2577
|
var i;
|
|
2616
|
-
return
|
|
2617
|
-
ref:
|
|
2578
|
+
return _("div", {
|
|
2579
|
+
ref: r,
|
|
2618
2580
|
class: l.b(),
|
|
2619
2581
|
style: s
|
|
2620
2582
|
}, [(i = t.default) == null ? void 0 : i.call(t, {
|
|
2621
|
-
height:
|
|
2622
|
-
width:
|
|
2583
|
+
height: o.value,
|
|
2584
|
+
width: a.value
|
|
2623
2585
|
})]);
|
|
2624
2586
|
};
|
|
2625
2587
|
}
|
|
2626
2588
|
});
|
|
2627
|
-
var
|
|
2628
|
-
const
|
|
2629
|
-
const
|
|
2589
|
+
var Hn = _n;
|
|
2590
|
+
const pn = ll(Tn), Mn = ll(Hn);
|
|
2591
|
+
const In = {
|
|
2630
2592
|
key: 0,
|
|
2631
2593
|
class: "footer-box"
|
|
2632
|
-
},
|
|
2594
|
+
}, An = {
|
|
2633
2595
|
__name: "index",
|
|
2634
|
-
props: /* @__PURE__ */
|
|
2596
|
+
props: /* @__PURE__ */ $t({
|
|
2635
2597
|
tableData: {
|
|
2636
2598
|
type: Array,
|
|
2637
2599
|
default: []
|
|
@@ -2654,11 +2616,11 @@ const Po = {
|
|
|
2654
2616
|
},
|
|
2655
2617
|
tableActiveDataModifiers: {}
|
|
2656
2618
|
}),
|
|
2657
|
-
emits: /* @__PURE__ */
|
|
2619
|
+
emits: /* @__PURE__ */ $t(["touchBottom"], ["update:tableActiveData"]),
|
|
2658
2620
|
setup(e, {
|
|
2659
2621
|
emit: t
|
|
2660
2622
|
}) {
|
|
2661
|
-
const l = t,
|
|
2623
|
+
const l = t, o = e, a = T(() => ({
|
|
2662
2624
|
// 表格头高度 支持: Number/Array<Number>
|
|
2663
2625
|
headerHeight: 50,
|
|
2664
2626
|
// 行高度
|
|
@@ -2670,52 +2632,52 @@ const Po = {
|
|
|
2670
2632
|
// 选中行唯一Key
|
|
2671
2633
|
pageUpDownEnabled: !0,
|
|
2672
2634
|
// 是否开启键盘pageUp, pageDown切换选中功能
|
|
2673
|
-
...
|
|
2674
|
-
})),
|
|
2635
|
+
...o.config
|
|
2636
|
+
})), r = V(null), s = V(0);
|
|
2675
2637
|
let i = 0, v = !1, f = null;
|
|
2676
|
-
const d =
|
|
2638
|
+
const d = Jl(e, "tableActiveData"), w = T(() => d.value.map((h) => h[a.value.tableActiveKey])), b = ({
|
|
2677
2639
|
rowData: h,
|
|
2678
2640
|
rowIndex: m
|
|
2679
2641
|
}) => {
|
|
2680
2642
|
const {
|
|
2681
2643
|
tableActiveNum: S,
|
|
2682
|
-
tableActiveKey:
|
|
2683
|
-
} =
|
|
2684
|
-
if (w.value.includes(h[
|
|
2644
|
+
tableActiveKey: H
|
|
2645
|
+
} = a.value;
|
|
2646
|
+
if (w.value.includes(h[H]))
|
|
2685
2647
|
return;
|
|
2686
|
-
const M = Math.floor(m / S) * S,
|
|
2687
|
-
d.value =
|
|
2648
|
+
const M = Math.floor(m / S) * S, x = M + S;
|
|
2649
|
+
d.value = o.tableData.slice(M, x);
|
|
2688
2650
|
}, g = ({
|
|
2689
2651
|
code: h
|
|
2690
2652
|
}) => {
|
|
2691
2653
|
const {
|
|
2692
2654
|
tableData: m
|
|
2693
|
-
} =
|
|
2655
|
+
} = o, {
|
|
2694
2656
|
tableActiveNum: S,
|
|
2695
|
-
tableActiveKey:
|
|
2657
|
+
tableActiveKey: H,
|
|
2696
2658
|
pageUpDownEnabled: M
|
|
2697
|
-
} =
|
|
2659
|
+
} = a.value;
|
|
2698
2660
|
if (!m.length || !M)
|
|
2699
2661
|
return;
|
|
2700
|
-
const
|
|
2662
|
+
const x = m.findIndex((R) => R[H] === w.value.at(0)), O = m.findIndex((R) => R[H] === w.value.at(-1));
|
|
2701
2663
|
let D = null, F = null;
|
|
2702
2664
|
switch (h) {
|
|
2703
2665
|
case "PageUp":
|
|
2704
|
-
if (
|
|
2666
|
+
if (x === 0)
|
|
2705
2667
|
return;
|
|
2706
|
-
D =
|
|
2668
|
+
D = x - S > 0 ? x - S : 0, F = D + S - 1, d.value = m.slice(D, F + 1), u(D, "PageUp");
|
|
2707
2669
|
break;
|
|
2708
2670
|
case "PageDown":
|
|
2709
2671
|
if (O === m.length - 1)
|
|
2710
2672
|
return;
|
|
2711
|
-
D =
|
|
2673
|
+
D = x + S, F = D + S - 1, d.value = m.slice(D, F + 1), u(F, "PageDown");
|
|
2712
2674
|
break;
|
|
2713
2675
|
}
|
|
2714
2676
|
}, y = (h) => {
|
|
2715
2677
|
v || (i === h.scrollLeft && h.yAxisScrollDir === "backward" && (s.value = 0), i = h.scrollLeft);
|
|
2716
2678
|
}, u = (h, m) => {
|
|
2717
|
-
h !== null && (clearTimeout(f), v = !0, m === "PageUp" ? s.value = 0 : h >=
|
|
2718
|
-
|
|
2679
|
+
h !== null && (clearTimeout(f), v = !0, m === "PageUp" ? s.value = 0 : h >= o.tableData.length - 1 && (s.value = 30, l("touchBottom")), Pe(() => {
|
|
2680
|
+
r.value.scrollToRow(h), r.value.scrollToLeft(i), f = setTimeout(() => {
|
|
2719
2681
|
v = !1;
|
|
2720
2682
|
}, 500);
|
|
2721
2683
|
}));
|
|
@@ -2727,32 +2689,32 @@ const Po = {
|
|
|
2727
2689
|
let m = "";
|
|
2728
2690
|
const {
|
|
2729
2691
|
tableActiveKey: S
|
|
2730
|
-
} =
|
|
2692
|
+
} = a.value;
|
|
2731
2693
|
return h[S] === w.value[0] && (m += " virtual-table-active-start"), w.value.includes(h[S]) && (m += " virtual-table-active-row"), h[S] === w.value[w.value.length - 1] && (m += " virtual-table-active-end"), m;
|
|
2732
2694
|
};
|
|
2733
2695
|
return st(() => {
|
|
2734
2696
|
window.addEventListener("keydown", g);
|
|
2735
|
-
}), Me(() =>
|
|
2697
|
+
}), Me(() => o.tableLoading, (h) => {
|
|
2736
2698
|
h || (s.value = 0);
|
|
2737
|
-
}),
|
|
2699
|
+
}), Ql(() => {
|
|
2738
2700
|
window.removeEventListener("keydown", g);
|
|
2739
2701
|
}), (h, m) => {
|
|
2740
|
-
const S =
|
|
2741
|
-
return
|
|
2702
|
+
const S = ol, H = Ul, M = Bl, x = pn, O = Mn;
|
|
2703
|
+
return Je(), dt(O, null, {
|
|
2742
2704
|
default: Ne(({
|
|
2743
2705
|
height: D,
|
|
2744
2706
|
width: F
|
|
2745
|
-
}) => [
|
|
2707
|
+
}) => [_(x, {
|
|
2746
2708
|
ref_key: "tableRef",
|
|
2747
|
-
ref:
|
|
2709
|
+
ref: r,
|
|
2748
2710
|
id: "virtualTable",
|
|
2749
2711
|
fixed: "",
|
|
2750
2712
|
data: e.tableData,
|
|
2751
2713
|
columns: e.tableColumn,
|
|
2752
2714
|
width: F,
|
|
2753
2715
|
height: D,
|
|
2754
|
-
"header-height":
|
|
2755
|
-
"row-height":
|
|
2716
|
+
"header-height": a.value.headerHeight,
|
|
2717
|
+
"row-height": a.value.rowHeight,
|
|
2756
2718
|
"row-class": c,
|
|
2757
2719
|
"row-event-handlers": {
|
|
2758
2720
|
onClick: b
|
|
@@ -2760,32 +2722,32 @@ const Po = {
|
|
|
2760
2722
|
"footer-height": s.value,
|
|
2761
2723
|
"scrollbar-always-on": "",
|
|
2762
2724
|
onScroll: y,
|
|
2763
|
-
onEndReached: m[0] || (m[0] = (
|
|
2725
|
+
onEndReached: m[0] || (m[0] = (R) => u(e.tableData.length - 1, "PageDown"))
|
|
2764
2726
|
}, {
|
|
2765
|
-
empty: Ne(() => [
|
|
2727
|
+
empty: Ne(() => [_(S, {
|
|
2766
2728
|
description: "暂无数据",
|
|
2767
2729
|
style: {
|
|
2768
2730
|
height: "100%"
|
|
2769
2731
|
}
|
|
2770
2732
|
})]),
|
|
2771
|
-
footer: Ne(() => [s.value ? (
|
|
2733
|
+
footer: Ne(() => [s.value ? (Je(), eo("div", In, [e.tableLoading === "more" ? (Je(), dt(M, {
|
|
2772
2734
|
key: 0
|
|
2773
2735
|
}, {
|
|
2774
|
-
default: Ne(() => [
|
|
2736
|
+
default: Ne(() => [_(H, {
|
|
2775
2737
|
type: "primary",
|
|
2776
2738
|
text: "",
|
|
2777
2739
|
loading: ""
|
|
2778
2740
|
}, {
|
|
2779
|
-
default: Ne(() => [
|
|
2741
|
+
default: Ne(() => [Wt("正在加载更多数据")]),
|
|
2780
2742
|
_: 1
|
|
2781
2743
|
})]),
|
|
2782
2744
|
_: 1
|
|
2783
|
-
})) : e.tableLoading === "all" ? (
|
|
2745
|
+
})) : e.tableLoading === "all" ? (Je(), dt(M, {
|
|
2784
2746
|
key: 1
|
|
2785
2747
|
}, {
|
|
2786
|
-
default: Ne(() => [
|
|
2748
|
+
default: Ne(() => [Wt(" 已无更多数据 ")]),
|
|
2787
2749
|
_: 1
|
|
2788
|
-
})) :
|
|
2750
|
+
})) : Ft("", !0)])) : Ft("", !0)]),
|
|
2789
2751
|
_: 2
|
|
2790
2752
|
}, 1032, ["data", "columns", "width", "height", "header-height", "row-height", "row-event-handlers", "footer-height"])]),
|
|
2791
2753
|
_: 1
|
|
@@ -2793,11 +2755,11 @@ const Po = {
|
|
|
2793
2755
|
};
|
|
2794
2756
|
}
|
|
2795
2757
|
};
|
|
2796
|
-
const
|
|
2758
|
+
const On = /* @__PURE__ */ co(An, [["__scopeId", "data-v-7e702a8a"]]), Xn = {
|
|
2797
2759
|
install(e) {
|
|
2798
|
-
e.component("st-virtualTable",
|
|
2760
|
+
e.component("st-virtualTable", On);
|
|
2799
2761
|
}
|
|
2800
2762
|
};
|
|
2801
2763
|
export {
|
|
2802
|
-
|
|
2764
|
+
Xn as default
|
|
2803
2765
|
};
|