fix dose't work properly for the first time
This commit is contained in:
parent
5b143a2b3f
commit
07ad4da491
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue