老师关于这个scroll组件
来源:10-21 阿里云域名注册、解析与备案流程

十六夜月华
2019-11-18
老师的代码里面在重新刷新高度之后会重新绑定scroll事件。这个是起到什么作用呢。
写回答
1回答
-
你好,我看了下课程源码,刷新高度后没有绑定 scroll 事件,事实上也不需要哈:
methods: { refresh() { if (this.$refs.scrollWrapper) { this.$refs.scrollWrapper.style.height = window.innerHeight - realPx(this.top) - realPx(this.bottom) + 'px' } } }
00
相似问题