fix: bigData 更改数据源表格数据空白

This commit is contained in:
izbz wh 2020-10-09 13:34:44 +08:00
parent 0a36b7aa7f
commit 5cbd047e6e
5 changed files with 999 additions and 825 deletions

4
dist/demo.css vendored
View File

@ -162,6 +162,10 @@
position: relative;
line-height: 1.33;
overflow: hidden; }
.u-table.copy .u-table-thead th {
-webkit-user-select: unset;
-ms-user-select: unset;
user-select: unset; }
.u-table-body {
position: relative; }
.u-table-body .u-table-row-expand-columns-in-body .expand-icon-con {

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

1807
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -73,9 +73,12 @@ export default function bigData(Table) {
_this.cachedRowParentIndex = [];
_this.computeCachedRowParentIndex(newData);
// fix切换数据源startIndex、endIndex错误
_this.currentIndex = 0;
_this.startIndex = _this.currentIndex; //数据开始位置
_this.endIndex = _this.currentIndex + _this.loadCount;
if(_this.scrollTop <= 0) { // 增加scrollTop 判断ncc场景下滚动条不在最上层 会出现空白因为重置了currentIndex没有重置滚动条
_this.currentIndex = 0;
_this.startIndex = _this.currentIndex; //数据开始位置
_this.endIndex = _this.currentIndex + _this.loadCount;
}
}
_this.treeData = [];
_this.flatTreeData = [];