修改:文档中图片地址改为完整的地址

This commit is contained in:
jmal 2021-02-04 11:09:58 +08:00
parent f923229836
commit c0ac9ccfe6
3 changed files with 3 additions and 3 deletions

View File

@ -459,7 +459,7 @@
if(file.contentType.indexOf('video') > -1){ if(file.contentType.indexOf('video') > -1){
return 'video' return 'video'
} }
if(file.contentType.indexOf('image') > -1){ if(file.contentType.contentType.startsWith('image')){
return 'image' return 'image'
} }
if(file.contentType.indexOf('audio') > -1){ if(file.contentType.indexOf('audio') > -1){

View File

@ -156,7 +156,7 @@ export default {
this.fileList = fileList this.fileList = fileList
}, },
format(filepath){ format(filepath){
this.currentValue = window.location.origin + fileConfig.mardownPreviewUrl(filepath) this.currentValue = fileConfig.mardownPreviewUrl(filepath)
this.change(this.currentValue) this.change(this.currentValue)
}, },
// url转blob // url转blob

View File

@ -7,7 +7,7 @@ export default {
return `${this.baseUrl}/file/${username}${file.path}${file.name}` return `${this.baseUrl}/file/${username}${file.path}${file.name}`
}, },
mardownPreviewUrl: function (path){ mardownPreviewUrl: function (path){
return `${this.baseUrl}${path}` return window.location.origin + `${this.baseUrl}${path}`
}, },
publicPreviewUrl: function(fileIds) { publicPreviewUrl: function(fileIds) {
return `${this.baseUrl}/public/preview/${fileIds}` return `${this.baseUrl}/public/preview/${fileIds}`