获取点击元素的绝对位置

const rect = e.target.getBoundingClientRect()
this.setState({
shareTop: rect.top,
shareLeft: rect.left + 80
})
posted @ 2018-10-23 16:11  L1204  阅读(272)  评论(0)    收藏  举报