【添加】JUpload组件提供下载功能
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
:returnUrl="returnUrl"
|
||||
:listType="complistType"
|
||||
@preview="handlePreview"
|
||||
@download="handleDownload"
|
||||
:showUploadList="{
|
||||
showDownloadIcon: isDownload
|
||||
}"
|
||||
v-bind="$attrs"
|
||||
v-on="childListeners"
|
||||
:class="{'uploadty-disabled':disabled}">
|
||||
@@ -114,6 +118,10 @@
|
||||
beforeUpload: {
|
||||
type: Function
|
||||
},
|
||||
isDownload: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value:{
|
||||
@@ -283,6 +291,12 @@
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
handleDownload(file) {
|
||||
if (file && file.url) {
|
||||
var fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
|
||||
window.open(fileFullUrl)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){},
|
||||
model: {
|
||||
|
||||
Reference in New Issue
Block a user