fix: 'ABackTop visible issue under KeepAlive' (#3803)

pull/3812/head
Ken 2021-03-17 10:08:32 +08:00 committed by GitHub
parent 3985a2b6ee
commit 749e196689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,11 @@ const BackTop = defineComponent({
});
},
activated() {
nextTick(() => {
this.handleScroll();
});
},
beforeUnmount() {
if (this.scrollEvent) {
this.scrollEvent.remove();