Skip to content

Commit 2b9b82a

Browse files
committed
isScrolling -> showVirtualScrollingPlaceholder
1 parent a828459 commit 2b9b82a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
default: false,
7777
},
7878
// is scrolling
79-
isScrolling: {
79+
showVirtualScrollingPlaceholder: {
8080
type: Boolean,
8181
default: false,
8282
},
@@ -882,7 +882,7 @@ export default {
882882
internalRadioSelectedRowKey,
883883
isVirtualScroll,
884884
cellStyleOption,
885-
isScrolling,
885+
showVirtualScrollingPlaceholder,
886886
} = this;
887887

888888
const { virtualScrollRepeatRenderedRowKeys } =
@@ -946,7 +946,7 @@ export default {
946946
},
947947
};
948948

949-
if (isScrolling) {
949+
if (showVirtualScrollingPlaceholder) {
950950
const trPropsScrolling = {
951951
key: this.getTrKey({ rowData, rowIndex }),
952952
props: {

packages/ve-table/src/index.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export default {
235235
// default placeholder per scrolling row count
236236
defaultPlaceholderPerScrollingRowCount: 8,
237237
// is scrolling
238-
isScrolling: false,
238+
showVirtualScrollingPlaceholder: false,
239239
// disable pointer events timeout id
240240
disablePointerEventsTimeoutId: null,
241241
// is scrolling left
@@ -1047,7 +1047,7 @@ export default {
10471047
//此时的偏移量
10481048
this.setVirtualScrollStartOffset();
10491049

1050-
if (!this.isScrolling) {
1050+
if (!this.showVirtualScrollingPlaceholder) {
10511051
const bodyElement = this.$refs[this.tableBodyRef];
10521052

10531053
if (bodyElement) {
@@ -1096,7 +1096,7 @@ export default {
10961096
// debounce scroll callback
10971097
debounceScrollEndedCallback() {
10981098
this.disablePointerEventsTimeoutId = null;
1099-
this.isScrolling = false;
1099+
this.showVirtualScrollingPlaceholder = false;
11001100
},
11011101
// init virtual scroll
11021102
initVirtualScroll() {
@@ -1726,7 +1726,7 @@ export default {
17261726
isVirtualScroll,
17271727
sortOption,
17281728
cellStyleOption,
1729-
isScrolling,
1729+
showVirtualScrollingPlaceholder,
17301730
} = this;
17311731

17321732
// header props
@@ -1772,7 +1772,7 @@ export default {
17721772
highlightRowKey: this.highlightRowKey,
17731773
editingCells: this.editingCells,
17741774
editingFocusCell: this.editingFocusCell,
1775-
isScrolling,
1775+
showVirtualScrollingPlaceholder,
17761776
},
17771777
on: {
17781778
[EMIT_EVENTS.BODY_TD_WIDTH_CHANGE]: tdWidthChange,
@@ -1822,9 +1822,9 @@ export default {
18221822
if (
18231823
differ > this.defaultPlaceholderPerScrollingRowCount
18241824
) {
1825-
this.isScrolling = true;
1825+
this.showVirtualScrollingPlaceholder = true;
18261826
} else {
1827-
this.isScrolling = false;
1827+
this.showVirtualScrollingPlaceholder = false;
18281828
}
18291829

18301830
this.debounceScrollEnded();

0 commit comments

Comments
 (0)