Commit d7eea53dc7cc9d4a254c4ea9de41628fffc945d2
Committed by
GitHub
Merge pull request #5441 from msidolphin/2.0
fix #5440
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/components/affix/affix.vue
| ... | ... | @@ -80,6 +80,9 @@ |
| 80 | 80 | // window.addEventListener('resize', this.handleScroll, false); |
| 81 | 81 | on(window, 'scroll', this.handleScroll); |
| 82 | 82 | on(window, 'resize', this.handleScroll); |
| 83 | + this.$nextTick(() => { | |
| 84 | + this.handleScroll(); | |
| 85 | + }); | |
| 83 | 86 | }, |
| 84 | 87 | beforeDestroy () { |
| 85 | 88 | // window.removeEventListener('scroll', this.handleScroll, false); | ... | ... |