Skip to content

Commit 5df705f

Browse files
committed
修复表格显示隐藏切换,右列固定效果消失的问题 #404
1 parent f5b7800 commit 5df705f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/ve-table/src/index.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,10 +1016,13 @@ export default {
10161016
const { scrollWidth, clientWidth, scrollLeft } =
10171017
tableContainerRef;
10181018

1019+
const { previewTableContainerScrollLeft: previewScrollLeft } =
1020+
this.$options.customOption;
1021+
10191022
// 仅横向滚动需要处理
10201023
if (
1021-
this.$options.customOption
1022-
.previewTableContainerScrollLeft !== scrollLeft
1024+
previewScrollLeft === 0 ||
1025+
previewScrollLeft !== scrollLeft
10231026
) {
10241027
this.$options.customOption.previewTableContainerScrollLeft =
10251028
scrollLeft;
@@ -1248,6 +1251,8 @@ export default {
12481251
"on-dom-resize-change": ({ height }) => {
12491252
this.tableOffestHeight = height;
12501253
this.initVirtualScroll();
1254+
// fixed #404
1255+
this.initScrolling();
12511256
},
12521257
},
12531258
};

0 commit comments

Comments
 (0)