Merge pull request #5441 from msidolphin/2.0

fix #5440
This commit is contained in:
Aresn 2019-03-18 10:00:13 +08:00 committed by GitHub
commit d7eea53dc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,9 @@
// window.addEventListener('resize', this.handleScroll, false); // window.addEventListener('resize', this.handleScroll, false);
on(window, 'scroll', this.handleScroll); on(window, 'scroll', this.handleScroll);
on(window, 'resize', this.handleScroll); on(window, 'resize', this.handleScroll);
this.$nextTick(() => {
this.handleScroll();
});
}, },
beforeDestroy () { beforeDestroy () {
// window.removeEventListener('scroll', this.handleScroll, false); // window.removeEventListener('scroll', this.handleScroll, false);