修改禅道已知bug

This commit is contained in:
qq787203167
2022-08-04 17:50:00 +08:00
parent e43ff1cb3f
commit fccf1cbf6a
9 changed files with 50 additions and 40 deletions
+4 -4
View File
@@ -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
}
}