fix spell: handleReize -> handleResize
This commit is contained in:
parent
bf97764daf
commit
04af0d3497
|
@ -40,14 +40,14 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.height = this.$el.getBoundingClientRect().height
|
this.height = this.$el.getBoundingClientRect().height
|
||||||
window.addEventListener('scroll', this.handleScroll)
|
window.addEventListener('scroll', this.handleScroll)
|
||||||
window.addEventListener('resize', this.handleReize)
|
window.addEventListener('resize', this.handleResize)
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.handleScroll()
|
this.handleScroll()
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
window.removeEventListener('scroll', this.handleScroll)
|
window.removeEventListener('scroll', this.handleScroll)
|
||||||
window.removeEventListener('resize', this.handleReize)
|
window.removeEventListener('resize', this.handleResize)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sticky() {
|
sticky() {
|
||||||
|
@ -81,7 +81,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.handleReset()
|
this.handleReset()
|
||||||
},
|
},
|
||||||
handleReize() {
|
handleResize() {
|
||||||
if (this.isSticky) {
|
if (this.isSticky) {
|
||||||
this.width = this.$el.getBoundingClientRect().width + 'px'
|
this.width = this.$el.getBoundingClientRect().width + 'px'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue