bug 67631
This commit is contained in:
@@ -1739,5 +1739,5 @@ module.exports = {
|
|||||||
verifyConformanceConfirmation:'Verify conformance confirmation',
|
verifyConformanceConfirmation:'Verify conformance confirmation',
|
||||||
designConformanceVerification:'Design conformance verification',
|
designConformanceVerification:'Design conformance verification',
|
||||||
nomorethan:'No more than 10',
|
nomorethan:'No more than 10',
|
||||||
uploadedfilelarger:'The uploaded file is larger than 50 MB',
|
uploadedfilelarger:'The uploaded file is larger than',
|
||||||
}
|
}
|
||||||
@@ -1841,5 +1841,5 @@ module.exports = {
|
|||||||
verifyConformanceConfirmation:'验证符合性确认',
|
verifyConformanceConfirmation:'验证符合性确认',
|
||||||
designConformanceVerification:'设计符合性确认',
|
designConformanceVerification:'设计符合性确认',
|
||||||
nomorethan:'不能超过10个',
|
nomorethan:'不能超过10个',
|
||||||
uploadedfilelarger:'文件大于50M',
|
uploadedfilelarger:'文件大于',
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
const isLt2KB = file.size / 1024 /1024 < this.size
|
const isLt2KB = file.size / 1024 /1024 < this.size
|
||||||
let name = file.name
|
let name = file.name
|
||||||
if (!isLt2KB) {
|
if (!isLt2KB) {
|
||||||
this.$message.error(name + this.$t('uploadedfilelarger'))
|
this.$message.error(name + this.$t('uploadedfilelarger') + this.size + 'M')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'file',
|
name: 'file',
|
||||||
props: ['disableds', 'disabled','acceptcode', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
|
props: ['disableds', 'disabled','acceptcode', 'thisFileUploadUrl','size', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -98,6 +98,15 @@
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 根据大小拦截
|
||||||
|
if(this.size){
|
||||||
|
const isLt2KB = file.size / 1024 /1024 < this.size
|
||||||
|
let name = file.name
|
||||||
|
if (!isLt2KB) {
|
||||||
|
this.$message.error(name + this.$t('uploadedfilelarger') + this.size + 'M')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.isMultiple) {
|
if (this.isMultiple) {
|
||||||
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
|
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
|
||||||
this.$message.warning(this.$t('onlyOnefileUploaded'))
|
this.$message.warning(this.$t('onlyOnefileUploaded'))
|
||||||
|
|||||||
Reference in New Issue
Block a user