使用ref
$this.refs.xxx配合<el ref="xxx"></el>可以获得vue components
直接操作
window.document.getElementById("main").scrollHeight
小结
不过用ref不能读取scrollHeight等element属性,不如直接从window对象来搞
$this.refs.xxx配合<el ref="xxx"></el>可以获得vue components
window.document.getElementById("main").scrollHeight
不过用ref不能读取scrollHeight等element属性,不如直接从window对象来搞