Commit 6205dd3fc11ab107f8e6e333adf3cf3ab08a1d50
Merge branch '2.0' of https://github.com/iview/iview into 2.0
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/components/affix/affix.vue
@@ -80,6 +80,9 @@ | @@ -80,6 +80,9 @@ | ||
80 | // window.addEventListener('resize', this.handleScroll, false); | 80 | // window.addEventListener('resize', this.handleScroll, false); |
81 | on(window, 'scroll', this.handleScroll); | 81 | on(window, 'scroll', this.handleScroll); |
82 | on(window, 'resize', this.handleScroll); | 82 | on(window, 'resize', this.handleScroll); |
83 | + this.$nextTick(() => { | ||
84 | + this.handleScroll(); | ||
85 | + }); | ||
83 | }, | 86 | }, |
84 | beforeDestroy () { | 87 | beforeDestroy () { |
85 | // window.removeEventListener('scroll', this.handleScroll, false); | 88 | // window.removeEventListener('scroll', this.handleScroll, false); |