附件预览开关

init
gongdi 3 years ago
parent 89347dd8a0
commit 88a434707a

@ -51,6 +51,7 @@
* title:显示名称 非必填
* canDownload: Boolean 附件是否可以下载 默认true
* canUpload:Boolean 是否可以上传附件 默认true 用于仅显示查看附件
* canView:Boolean 是否可以预览 默认true
* */
import {Button,Icon,Progress,Alert} from 'ant-design-vue'
import Uploader from '../../../global-llibs/upload/upload'
@ -96,6 +97,10 @@
canDelete:{
type:Boolean,
default:true
},
canView:{
type:Boolean,
default:true
}
},
data: function () {
@ -372,6 +377,9 @@
this.$emit("uploadComplete",this.fileList)
},
previewData: function (item) {
if(!this.canView){
return
}
if (this.hasUploadList && this.hasUploadList.length > 0){
let index = this.hasUploadList.findIndex((file)=>{return item.id === file.id})
if (index !== -1){

Loading…
Cancel
Save