fix: 修复校验错误提示逻辑
This commit is contained in:
@@ -305,7 +305,7 @@ export default {
|
|||||||
this.blockOperation.save = true
|
this.blockOperation.save = true
|
||||||
// 校验form + upload + preview
|
// 校验form + upload + preview
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
this.$refs.form.validateField('tagName')
|
||||||
if (!this.uploaded) {
|
if (!this.uploaded) {
|
||||||
this.uploadErrorTip = this.$t('validate.required')
|
this.uploadErrorTip = this.$t('validate.required')
|
||||||
} else {
|
} else {
|
||||||
@@ -319,7 +319,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.previewErrorTip = ''
|
this.previewErrorTip = ''
|
||||||
}
|
}
|
||||||
|
if (valid) {
|
||||||
// 校验通过后组织数据、请求接口
|
// 校验通过后组织数据、请求接口
|
||||||
if (valid && !this.uploadErrorTip && !this.previewErrorTip) {
|
if (valid && !this.uploadErrorTip && !this.previewErrorTip) {
|
||||||
const postData = {
|
const postData = {
|
||||||
|
|||||||
Reference in New Issue
Block a user