vxe-table 3.12.0-beta.7 → 3.12.0-beta.8
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/style.css +1 -1
- package/es/table/src/methods.js +46 -29
- package/es/table/src/util.js +10 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +58 -45
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +46 -38
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +10 -5
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/src/methods.ts +54 -35
- package/packages/table/src/util.ts +12 -5
- /package/es/{iconfont.1735277338963.ttf → iconfont.1735299026800.ttf} +0 -0
- /package/es/{iconfont.1735277338963.woff → iconfont.1735299026800.woff} +0 -0
- /package/es/{iconfont.1735277338963.woff2 → iconfont.1735299026800.woff2} +0 -0
- /package/lib/{iconfont.1735277338963.ttf → iconfont.1735299026800.ttf} +0 -0
- /package/lib/{iconfont.1735277338963.woff → iconfont.1735299026800.woff} +0 -0
- /package/lib/{iconfont.1735277338963.woff2 → iconfont.1735299026800.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -86,14 +86,12 @@ function handleReserveRow(_vm, reserveRowMap) {
|
|
|
86
86
|
});
|
|
87
87
|
return reserveList;
|
|
88
88
|
}
|
|
89
|
-
function handleVirtualXVisible(
|
|
89
|
+
function handleVirtualXVisible($xeTable) {
|
|
90
|
+
const internalData = $xeTable;
|
|
90
91
|
const {
|
|
91
|
-
$refs,
|
|
92
92
|
visibleColumn
|
|
93
|
-
} =
|
|
94
|
-
const
|
|
95
|
-
tableBody
|
|
96
|
-
} = $refs;
|
|
93
|
+
} = internalData;
|
|
94
|
+
const tableBody = $xeTable.$refs.tableBody;
|
|
97
95
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
98
96
|
if (tableBodyElem) {
|
|
99
97
|
const {
|
|
@@ -135,8 +133,8 @@ const computeRowHeight = $xeTable => {
|
|
|
135
133
|
const tableBody = $xeTable.$refs.tableBody;
|
|
136
134
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
137
135
|
const vSize = $xeTable.computeSize;
|
|
138
|
-
const rowHeightMaps = $xeTable.
|
|
139
|
-
let rowHeight =
|
|
136
|
+
const rowHeightMaps = $xeTable.computeRowHeightMaps;
|
|
137
|
+
let rowHeight = 24;
|
|
140
138
|
if (showOverflow) {
|
|
141
139
|
if (tableBodyElem) {
|
|
142
140
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
@@ -156,13 +154,13 @@ const computeRowHeight = $xeTable => {
|
|
|
156
154
|
return rowHeight;
|
|
157
155
|
};
|
|
158
156
|
function handleVirtualYVisible($xeTable) {
|
|
157
|
+
const internalData = $xeTable;
|
|
159
158
|
const {
|
|
160
|
-
$refs,
|
|
161
159
|
scrollYStore,
|
|
162
160
|
afterFullData,
|
|
163
161
|
fullAllDataRowIdData
|
|
164
|
-
} =
|
|
165
|
-
const tableBody = $refs.tableBody;
|
|
162
|
+
} = internalData;
|
|
163
|
+
const tableBody = $xeTable.$refs.tableBody;
|
|
166
164
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
167
165
|
const {
|
|
168
166
|
rowHeight
|
|
@@ -179,11 +177,11 @@ function handleVirtualYVisible($xeTable) {
|
|
|
179
177
|
for (let rIndex = 0, rLen = afterFullData.length; rIndex < rLen; rIndex++) {
|
|
180
178
|
const row = afterFullData[rIndex];
|
|
181
179
|
const rowid = (0, _util.getRowid)($xeTable, row);
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
180
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
181
|
+
if (!rowRest) {
|
|
184
182
|
break;
|
|
185
183
|
}
|
|
186
|
-
offsetTop +=
|
|
184
|
+
offsetTop += rowRest.height || rowHeight;
|
|
187
185
|
if (toVisibleIndex === -1 && scrollTop < offsetTop) {
|
|
188
186
|
toVisibleIndex = rIndex;
|
|
189
187
|
}
|
|
@@ -870,7 +868,6 @@ const Methods = {
|
|
|
870
868
|
editStore.removeList = [];
|
|
871
869
|
editStore.removeMaps = {};
|
|
872
870
|
const sYLoad = this.updateScrollYStatus(fullData);
|
|
873
|
-
this.scrollYLoad = sYLoad;
|
|
874
871
|
this.isDragRowMove = false;
|
|
875
872
|
// 全量数据
|
|
876
873
|
this.tableFullData = fullData;
|
|
@@ -8091,15 +8088,18 @@ const Methods = {
|
|
|
8091
8088
|
const $xeTable = this;
|
|
8092
8089
|
const internalData = $xeTable;
|
|
8093
8090
|
const {
|
|
8091
|
+
intoRunScroll,
|
|
8094
8092
|
inFooterScroll,
|
|
8095
8093
|
inBodyScroll,
|
|
8096
8094
|
lastScrollTop
|
|
8097
8095
|
} = internalData;
|
|
8098
|
-
if (
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8096
|
+
if (!intoRunScroll) {
|
|
8097
|
+
if (inFooterScroll) {
|
|
8098
|
+
return;
|
|
8099
|
+
}
|
|
8100
|
+
if (inBodyScroll) {
|
|
8101
|
+
return;
|
|
8102
|
+
}
|
|
8103
8103
|
}
|
|
8104
8104
|
const tableHeader = $xeTable.$refs.tableHeader;
|
|
8105
8105
|
const tableBody = $xeTable.$refs.tableBody;
|
|
@@ -8133,15 +8133,18 @@ const Methods = {
|
|
|
8133
8133
|
const $xeTable = this;
|
|
8134
8134
|
const internalData = $xeTable;
|
|
8135
8135
|
const {
|
|
8136
|
+
intoRunScroll,
|
|
8136
8137
|
inFooterScroll,
|
|
8137
8138
|
inBodyScroll,
|
|
8138
8139
|
lastScrollLeft
|
|
8139
8140
|
} = internalData;
|
|
8140
|
-
if (
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8141
|
+
if (!intoRunScroll) {
|
|
8142
|
+
if (inFooterScroll) {
|
|
8143
|
+
return;
|
|
8144
|
+
}
|
|
8145
|
+
if (inBodyScroll) {
|
|
8146
|
+
return;
|
|
8147
|
+
}
|
|
8145
8148
|
}
|
|
8146
8149
|
const tableBody = $xeTable.$refs.tableBody;
|
|
8147
8150
|
const leftBody = $xeTable.$refs.leftBody;
|
|
@@ -8293,7 +8296,6 @@ const Methods = {
|
|
|
8293
8296
|
const {
|
|
8294
8297
|
showOverflow
|
|
8295
8298
|
} = props;
|
|
8296
|
-
// this.tableColumn = []
|
|
8297
8299
|
return $xeTable.$nextTick().then(() => {
|
|
8298
8300
|
$xeTable.handleTableColumn();
|
|
8299
8301
|
calcCellHeight($xeTable);
|
|
@@ -8359,7 +8361,6 @@ const Methods = {
|
|
|
8359
8361
|
},
|
|
8360
8362
|
updateScrollYData() {
|
|
8361
8363
|
const $xeTable = this;
|
|
8362
|
-
// this.tableData = []
|
|
8363
8364
|
return $xeTable.$nextTick().then(() => {
|
|
8364
8365
|
$xeTable.handleTableData();
|
|
8365
8366
|
calcCellHeight($xeTable);
|
|
@@ -8437,6 +8438,7 @@ const Methods = {
|
|
|
8437
8438
|
*/
|
|
8438
8439
|
scrollTo(scrollLeft, scrollTop) {
|
|
8439
8440
|
const $xeTable = this;
|
|
8441
|
+
const internalData = $xeTable;
|
|
8440
8442
|
const {
|
|
8441
8443
|
$refs
|
|
8442
8444
|
} = this;
|
|
@@ -8452,6 +8454,7 @@ const Methods = {
|
|
|
8452
8454
|
const rightBodyElem = rightBody ? rightBody.$el : null;
|
|
8453
8455
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
8454
8456
|
const tableFooterElem = tableFooter ? tableFooter.$el : null;
|
|
8457
|
+
internalData.intoRunScroll = true;
|
|
8455
8458
|
if (_xeUtils.default.isNumber(scrollLeft)) {
|
|
8456
8459
|
const xHandleEl = $xeTable.$refs.refScrollXHandleElem;
|
|
8457
8460
|
if (xHandleEl) {
|
|
@@ -8473,7 +8476,14 @@ const Methods = {
|
|
|
8473
8476
|
}
|
|
8474
8477
|
}
|
|
8475
8478
|
if (this.scrollXLoad || this.scrollYLoad) {
|
|
8476
|
-
return new Promise(resolve =>
|
|
8479
|
+
return new Promise(resolve => {
|
|
8480
|
+
setTimeout(() => {
|
|
8481
|
+
$xeTable.$nextTick(() => {
|
|
8482
|
+
internalData.intoRunScroll = false;
|
|
8483
|
+
resolve();
|
|
8484
|
+
});
|
|
8485
|
+
});
|
|
8486
|
+
});
|
|
8477
8487
|
}
|
|
8478
8488
|
return this.$nextTick();
|
|
8479
8489
|
},
|
|
@@ -8538,20 +8548,18 @@ const Methods = {
|
|
|
8538
8548
|
*/
|
|
8539
8549
|
clearScroll() {
|
|
8540
8550
|
const $xeTable = this;
|
|
8551
|
+
const internalData = $xeTable;
|
|
8541
8552
|
const {
|
|
8542
|
-
$refs,
|
|
8543
8553
|
scrollXStore,
|
|
8544
8554
|
scrollYStore
|
|
8545
|
-
} =
|
|
8546
|
-
const
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
tableFooter
|
|
8552
|
-
} = $refs;
|
|
8553
|
-
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
8555
|
+
} = internalData;
|
|
8556
|
+
const tableBody = $xeTable.$refs.tableBody;
|
|
8557
|
+
const tableHeader = $xeTable.$refs.tableHeader;
|
|
8558
|
+
const tableFooter = $xeTable.$refs.tableFooter;
|
|
8559
|
+
const leftBody = $xeTable.$refs.leftBody;
|
|
8560
|
+
const rightBody = $xeTable.$refs.rightBody;
|
|
8554
8561
|
const leftBodyElem = leftBody ? leftBody.$el : null;
|
|
8562
|
+
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
8555
8563
|
const rightBodyElem = rightBody ? rightBody.$el : null;
|
|
8556
8564
|
const tableHeaderElem = tableHeader ? tableHeader.$el : null;
|
|
8557
8565
|
const tableFooterElem = tableFooter ? tableFooter.$el : null;
|