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