修改上传文件的双语

This commit is contained in:
qq787203167
2022-04-12 17:52:18 +08:00
parent f1c182c390
commit 19bc0ec105
3 changed files with 728 additions and 733 deletions
+4
View File
@@ -647,4 +647,8 @@ module.exports = {
pleaseUploadSplitFile:'please upload split file',
release:'release',
confirmRelease:'confirm Release ?',
UploadMost:'You can only upload 20 at most',
FileUploadFailed:'File upload failed',
FileUploadedSuccessfully:'File uploaded successfully',
DeletedSuccessfully:'Deleted successfully',
}
File diff suppressed because it is too large Load Diff
+4 -17
View File
@@ -90,9 +90,6 @@
// }
// }
this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
this.errorMessage = file.name + '文件大小超出100MB限制, 请压缩或降低文件质量!'
},
remove() {
this.fileTypeSatus = true
@@ -103,7 +100,6 @@
},
handleChange(info) {
let { file } = info
console.log(file)
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
@@ -111,15 +107,10 @@
info.fileList.splice(index, 1)
}
})
if (this.fileTypeSatus) {
if (file.size > 100000000) {
this.$message.error(this.errorMessage)
return
} else {
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name} 文件上传失败。`)
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
@@ -133,7 +124,7 @@
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name} 删除成功。`)
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
@@ -150,7 +141,7 @@
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error('最多只能上传二十个')
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
@@ -160,12 +151,11 @@
this.fileList.push(res)
}
})
console.log(this.myfileList)
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name} 文件上传成功。`)
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
@@ -173,9 +163,6 @@
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
}
} else {
this.$message.warning('不支持上传该类型的文件!')
}
},
resetFileList() {
this.myfileList = []