fix: 修复知识库增加重复校验后无法保存的问题
This commit is contained in:
@@ -304,11 +304,8 @@ export default {
|
||||
if (this.blockOperation.save) { return }
|
||||
this.blockOperation.save = true
|
||||
// 校验form + upload + preview
|
||||
let formValid
|
||||
this.$refs.form.validate(valid => {
|
||||
formValid = valid
|
||||
})
|
||||
|
||||
if (valid) {
|
||||
if (!this.uploaded) {
|
||||
this.uploadErrorTip = this.$t('validate.required')
|
||||
} else {
|
||||
@@ -324,7 +321,7 @@ export default {
|
||||
}
|
||||
|
||||
// 校验通过后组织数据、请求接口
|
||||
if (formValid && !this.uploadErrorTip && !this.previewErrorTip) {
|
||||
if (valid && !this.uploadErrorTip && !this.previewErrorTip) {
|
||||
const postData = {
|
||||
tagName: this.editObject.tagName,
|
||||
tagType: this.editObject.tagType,
|
||||
@@ -363,6 +360,10 @@ export default {
|
||||
} else {
|
||||
this.blockOperation.save = false
|
||||
}
|
||||
} else {
|
||||
this.blockOperation.save = false
|
||||
}
|
||||
})
|
||||
},
|
||||
hasErrorImportedData () {
|
||||
return this.importedData.filter(d => d.status !== 1).length > 0
|
||||
|
||||
Reference in New Issue
Block a user