-
原生
制渲染dom的代码可以使用以下一些dom的属性:offsetTop
,offsetLeft
,offsetWidth
,offsetHeight
scrollTop
,scrollLeft
,scrollWidth
,scrollHeight
clientTop
,clientLeft
,clientWidth
,clientHeight
js访问到以上dom属性的时候,它都会先渲染dom文档,再获得相关的属性。所以,就起到了强制渲染的作用 -
VUE
this.$forceUpdate()