Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5051ebd

Browse files
committed
refactor: create consts only if needed
1 parent 1207090 commit 5051ebd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎packages/ve-table/src/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,12 +2054,11 @@ export default {
20542054

20552055
// set scrolling
20562056
setScrolling(tableContainerRef) {
2057-
const { scrollWidth, clientWidth, scrollLeft, scrollTop } =
2058-
tableContainerRef;
2059-
20602057
if (this.hasFixedColumn) {
2061-
const { previewTableContainerScrollLeft: previewScrollLeft } =
2062-
this;
2058+
const { scrollWidth, clientWidth, scrollLeft } =
2059+
tableContainerRef;
2060+
const { previewTableContainerScrollLeft: previewScrollLeft } =
2061+
this;
20632062

20642063
// 仅横向滚动需要处理
20652064
if (
@@ -2077,6 +2076,7 @@ export default {
20772076
}
20782077

20792078
if (this.fixedHeader) {
2079+
const { scrollTop } = tableContainerRef;
20802080
this.isVerticalScrolling = scrollTop > 0;
20812081
}
20822082
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /