html
<button @click="toPinglun">点击跳转到评论区</button>
<div ref="pinglun">评论</div>
js
toPinglun(){
this.$refs["pinglun"].scrollIntoView(true);
}
html
<button @click="toPinglun">点击跳转到评论区</button>
<div ref="pinglun">评论</div>
js
toPinglun(){
this.$refs["pinglun"].scrollIntoView(true);
}