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

this.$refs.piediv.getBoundingClientRect().top; //piediv为dom对象的ref
posted @ 2020-09-14 17:01  一棵写代码的柳树  阅读(7759)  评论(0编辑  收藏  举报