附件优化

This commit is contained in:
季圣华
2021-09-05 22:08:52 +08:00
parent adab6469e8
commit 6ae8b9a746
2 changed files with 5 additions and 2 deletions

View File

@@ -312,7 +312,9 @@
console.log(file)
},
handlePreview(file){
if(this.fileType === FILE_TYPE_IMG){
let postfix = file.name.substring(file.name.indexOf('.'))
if(postfix === '.gif' || postfix === '.jpg' || postfix === '.jpeg' || postfix === '.png' ||
postfix === '.GIF' || postfix === '.JPG' || postfix === '.JPEG' || postfix === '.PNG') {
this.previewImage = file.url || file.thumbUrl;
this.previewVisible = true;
}else{