backTop
This commit is contained in:
parent
4ed43a1798
commit
3239ed9819
1 changed files with 2 additions and 1 deletions
|
@ -67,7 +67,8 @@
|
|||
this.backTop = window.pageYOffset >= this.height;
|
||||
},
|
||||
back () {
|
||||
scrollTop(window, document.body.scrollTop, 0, this.duration);
|
||||
let scrollTop = document.documentElement.scrollTop||document.body.scrollTop;
|
||||
scrollTop(window, scrollTop, 0, this.duration);
|
||||
this.$emit('on-click');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue