update $message.error全局改成$message.warning

This commit is contained in:
赵霄
2023-10-25 17:32:18 +08:00
parent 0bee8465c2
commit 8d5c6b9380
45 changed files with 119 additions and 87 deletions
@@ -102,19 +102,19 @@ export default {
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
this.$message.warning(val.response.message)
info.fileList.splice(index, 1)
}
})
if (this.fileTypeSatus) {
if (file.size > 1000000000) {
this.$message.error(this.errorMessage)
this.$message.warning(this.errorMessage)
} else {
if (status === 'error') {
this.uploadFileFlag--
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name} ` + this.$t('fileUploadFailed'))
this.$message.warning(`${info.file.name} ` + this.$t('fileUploadFailed'))
} else if (status === 'removed') {
this.uploadFileFlag--
this.myFileList = info.fileList
@@ -141,7 +141,7 @@ export default {
console.log('listLength11111', info.fileList.length)
if (info.fileList.length > 20) {
this.$message.destroy()
this.$message.error(this.$t('uploadMaximumATime'))
this.$message.warning(this.$t('uploadMaximumATime'))
info.fileList.splice(20)
this.myFileList = info.fileList
this.myFileList.forEach((res) => {
+3 -3
View File
@@ -69,18 +69,18 @@ export default {
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
this.$message.warning(val.response.message)
info.fileList.splice(index, 1)
}
})
if (this.fileTypeSatus) {
if (file.size > 100000000) {
this.$message.error(this.errorMessage)
this.$message.warning(this.errorMessage)
} else {
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('fileUploadFailed'))
this.$message.warning(`${info.file.name}` + this.$t('fileUploadFailed'))
} else if (status === 'removed') {
this.myFileList = info.fileList
this.fileList = []