点击按钮定位到页面的某个位置 <button type="primary" @click="backTop"></button> backTop() { //box表示需要定位到的div const scrollTop = document.getElementById("box"); scrollTop.scrollIntoView(); },