【添加】JUpload组件提供下载功能
This commit is contained in:
@@ -13,6 +13,10 @@
|
|||||||
:returnUrl="returnUrl"
|
:returnUrl="returnUrl"
|
||||||
:listType="complistType"
|
:listType="complistType"
|
||||||
@preview="handlePreview"
|
@preview="handlePreview"
|
||||||
|
@download="handleDownload"
|
||||||
|
:showUploadList="{
|
||||||
|
showDownloadIcon: isDownload
|
||||||
|
}"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
v-on="childListeners"
|
v-on="childListeners"
|
||||||
:class="{'uploadty-disabled':disabled}">
|
:class="{'uploadty-disabled':disabled}">
|
||||||
@@ -114,6 +118,10 @@
|
|||||||
beforeUpload: {
|
beforeUpload: {
|
||||||
type: Function
|
type: Function
|
||||||
},
|
},
|
||||||
|
isDownload: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
value:{
|
value:{
|
||||||
@@ -283,6 +291,12 @@
|
|||||||
window.open(url)
|
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(){},
|
mounted(){},
|
||||||
model: {
|
model: {
|
||||||
|
|||||||
Reference in New Issue
Block a user