修改禅道已知bug
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
export default {
|
||||
name: 'file',
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads'],
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -68,7 +68,7 @@
|
||||
if (this.isMultiple) {
|
||||
this.multiple = false
|
||||
}
|
||||
this.accept = this.restrictUploads ? '.docx,.doc' : '*.*'
|
||||
this.accept = this.restrictUploads ? this.Uploadable : '*.*'
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods: {
|
||||
@@ -99,10 +99,10 @@
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||||
if (this.Uploadable.includes(fileSuffix)) {
|
||||
|
||||
} else {
|
||||
this.$message.warning(this.$t('onlyFilesUploaded'))
|
||||
this.$message.warning(this.$t('uploadOnly') + this.Uploadable + this.$t('file'))
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user