vue获取dom对象到页面顶部的距离

this.$refs.piediv.getBoundingClientRect().top; //piediv为dom对象的ref
原文地址:https://www.cnblogs.com/saule/p/13667762.html