this.$nextTick(() => { let isError = document.getElementsByClassName('is-error') isError[0].scrollIntoView({ // 滚动到指定节点 // 值有start,center,end,nearest,当前显示在视图区域中间 block: 'center', // 值有auto、instant,smooth,缓动动画(当前是慢速的) behavior: 'smooth', }) });
标签:vue,center,smooth,element,报错,isError,值有 From: https://www.cnblogs.com/naitang/p/16730765.html