【添加】JUpload组件提供下载功能

This commit is contained in:
zer0Black
2022-04-23 17:10:15 +08:00
parent 79e738d704
commit 65964f0572
+14
View File
@@ -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: {