Published on 13 2月 2019Vue获取domWritten by guo Categories 前端 搬代码的日常 使用ref $this.refs.xxx配合<el ref=”xxx”></el>可以获得vue components 直接操作 window.document.getElementById(“main”).scrollHeight 小结 不过用ref不能读取scrollHeight等element属性,不如直接从window对象来搞 相关推荐