Skip to content

Commit a6c8b22

Browse files
fix: virtualPhantomHeight
change virtualPhantomHeight when data is empty
1 parent 5d72ce8 commit a6c8b22

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/ve-table/src/index.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,11 @@ export default {
885885
},
886886
// 更新 virtual phantom 列表总高度
887887
setVirtualPhantomHeight() {
888+
// 解决数据为空时,虚拟滚动区域高度问题
889+
if (this.virtualScrollPositions.length === 0) {
890+
this.$refs[this.virtualPhantomRef].style.height = "100%";
891+
return;
892+
}
888893
let totalHeight = 0;
889894

890895
totalHeight =

0 commit comments

Comments
 (0)