附件优化
This commit is contained in:
@@ -312,7 +312,9 @@
|
|||||||
console.log(file)
|
console.log(file)
|
||||||
},
|
},
|
||||||
handlePreview(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.previewImage = file.url || file.thumbUrl;
|
||||||
this.previewVisible = true;
|
this.previewVisible = true;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -1104,7 +1104,8 @@
|
|||||||
this.fileList = []
|
this.fileList = []
|
||||||
for(let i=0; i<fileArr.length; i++) {
|
for(let i=0; i<fileArr.length; i++) {
|
||||||
let fileInfo = {}
|
let fileInfo = {}
|
||||||
fileInfo.name= fileArr[i].replace("bill/","")
|
let shortName = fileArr[i].replace("bill/","")
|
||||||
|
fileInfo.name= shortName.substring(shortName.indexOf('/')+1)
|
||||||
fileInfo.url= window._CONFIG['domianURL'] + '/systemConfig/static/' + fileArr[i]
|
fileInfo.url= window._CONFIG['domianURL'] + '/systemConfig/static/' + fileArr[i]
|
||||||
this.fileList.push(fileInfo)
|
this.fileList.push(fileInfo)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user