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