elementui 长表单验证滚动到首个错误位置
this.$refs['form'].validate(valid => { if(valid){ // 验证通过 } else { // 验证失败 this.$nextTick(() => { let isError = document.getElementsByClassName('is-error') isError[0].scrollIntoView({ block: 'center', behavior: 'smooth' }) }) } })