政策课题模块
This commit is contained in:
@@ -201,6 +201,11 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
type: Array
|
||||
},
|
||||
// 单位 M
|
||||
size: {
|
||||
type: Number,
|
||||
default: 200
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -322,8 +327,8 @@ export default {
|
||||
return false
|
||||
}
|
||||
// 判断文件上传大小
|
||||
if (file.size / 1024 / 1024 > 200) {// eslint-disable-line
|
||||
this.$message.error('文件' + file.name + '大小不超过200M')
|
||||
if (file.size / 1024 / 1024 > this.size) {// eslint-disable-line
|
||||
this.$message.error('文件' + file.name + `大小不超过${ this.size }M`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user