Commit 987ca8cf21cf2e2f0bda7b2d8713a2c6cfdffa21

Authored by Aresn
Committed by GitHub
2 parents ffac7ffb 4b19f87e

Merge pull request #1013 from itrenhang/2.0

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 + var sTop = document.documentElement.scrollTop||document.body.scrollTop;
  71 + scrollTop(window, sTop, 0, this.duration);
71 72 this.$emit('on-click');
72 73 }
73 74 }
... ...