html

<button @click="toPinglun">点击跳转到评论区</button>
<div ref="pinglun">评论</div>

js

toPinglun(){
	this.$refs["pinglun"].scrollIntoView(true);
}
Logo

前往低代码交流专区

更多推荐