Commit 3239ed9819d669d6c5739996a56e4801e2145bf1

Authored by renhang
1 parent 4ed43a17

backTop

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
src/components/back-top/back-top.vue
... ... @@ -67,7 +67,8 @@
67 67 this.backTop = window.pageYOffset >= this.height;
68 68 },
69 69 back () {
70   - scrollTop(window, document.body.scrollTop, 0, this.duration);
  70 + let scrollTop = document.documentElement.scrollTop||document.body.scrollTop;
  71 + scrollTop(window, scrollTop, 0, this.duration);
71 72 this.$emit('on-click');
72 73 }
73 74 }
... ...