正常属性校验方式 const moveToErr = () => {const errorDom = document.getElementsByClassName('el-form-item__error');console.log(errorDom)if (errorDom.length) {errorDom[0].scrollIntoView({block: 'center',behavior: 'smooth'})} };const saveItem = async (formEl?: FormInstance | undefined) => {const newFormEl = formEl?.[0] ? formEl[0] : formEl;if (newFormEl) {const valid = await newFormEl.validate((valid, fields) => !!valid);if (!valid) {moveToErr();return false;}} } 针对个别属性进行校验(validateField) const submitVideoUpload = async (formEl?: FormInstance | undefined) => {const newFormEl = formEl?.[0] ? formEl[0] : formEl;console.log(newFormEl, 'newFormEl')if (newFormEl) {const valid = await newFormEl.validateField('video', (valid, fields) => !!valid);if (!valid) {moveToErr();return false;}} }