fix: 补充知识库上传失败后的提示
This commit is contained in:
@@ -257,9 +257,15 @@ export default {
|
|||||||
fileChange (files, fileList) {
|
fileChange (files, fileList) {
|
||||||
this.fileList = fileList.slice(-1)
|
this.fileList = fileList.slice(-1)
|
||||||
},
|
},
|
||||||
uploadError () {
|
uploadError (error) {
|
||||||
|
let errorMsg
|
||||||
|
if (error.message) {
|
||||||
|
errorMsg = JSON.parse(error.message).message
|
||||||
|
} else {
|
||||||
|
errorMsg = 'error'
|
||||||
|
}
|
||||||
this.uploadLoading = false
|
this.uploadLoading = false
|
||||||
this.$message.error(this.$t('tip.uploadFailed', { msg: 'error' }))
|
this.$message.error(this.$t('tip.uploadFailed', { msg: errorMsg }))
|
||||||
},
|
},
|
||||||
uploadSuccess (response) {
|
uploadSuccess (response) {
|
||||||
this.uploadLoading = false
|
this.uploadLoading = false
|
||||||
|
|||||||
@@ -512,9 +512,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.fileList = fileList.slice(-1)
|
this.fileList = fileList.slice(-1)
|
||||||
},
|
},
|
||||||
uploadError () {
|
uploadError (error) {
|
||||||
|
let errorMsg
|
||||||
|
if (error.message) {
|
||||||
|
errorMsg = JSON.parse(error.message).message
|
||||||
|
} else {
|
||||||
|
errorMsg = 'error'
|
||||||
|
}
|
||||||
this.uploadLoading = false
|
this.uploadLoading = false
|
||||||
this.$message.error(this.$t('tip.uploadFailed', { msg: 'error' }))
|
this.$message.error(this.$t('tip.uploadFailed', { msg: errorMsg }))
|
||||||
},
|
},
|
||||||
handleSpeticalTypeData (originalImportedData) {
|
handleSpeticalTypeData (originalImportedData) {
|
||||||
originalImportedData.forEach(item => {
|
originalImportedData.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user