fix: 修复校验错误提示逻辑

This commit is contained in:
chenjinsong
2023-03-10 13:32:46 +08:00
parent 1311e53b65
commit 2b66aecf44

View File

@@ -305,7 +305,7 @@ export default {
this.blockOperation.save = true
// 校验form + upload + preview
this.$refs.form.validate(valid => {
if (valid) {
this.$refs.form.validateField('tagName')
if (!this.uploaded) {
this.uploadErrorTip = this.$t('validate.required')
} else {
@@ -319,7 +319,7 @@ export default {
} else {
this.previewErrorTip = ''
}
if (valid) {
// 校验通过后组织数据、请求接口
if (valid && !this.uploadErrorTip && !this.previewErrorTip) {
const postData = {