Skip to content

Commit 5011e06

Browse files
fix: restore scroll in keep-alive (#724)
1 parent 61319d7 commit 5011e06

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/RecycleScroller.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,15 @@ export default {
203203
})
204204
},
205205
206+
activated() {
207+
const lastPosition = this.$_lastUpdateScrollPosition;
208+
if (typeof lastPosition === 'number') {
209+
this.$nextTick(() => {
210+
this.scrollToPosition(lastPosition);
211+
});
212+
}
213+
},
214+
206215
beforeDestroy () {
207216
this.removeListeners()
208217
},

0 commit comments

Comments
 (0)