[需求变更] 图片预览
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
@preview="handlePreview"
|
||||
:class="!isMultiple?'imgupload':''">
|
||||
<div :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}">
|
||||
<img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/>
|
||||
<img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%" @click="clickFunc"/>
|
||||
<!--<img v-if="!isMultiple && picUrl" src="http://localhost:3000/jero-boot/sys/common/download/1379989167782797313?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTc4NTA1OTgsInVzZXJuYW1lIjoiYWRtaW4ifQ.1xRpivI0TzTqAnISJICNm-PoMxSDUITH5uaEcvwheIQ&fullfilename=3.jpeg" style="width:100%;height:100%"/>-->
|
||||
<div v-else class="iconp">
|
||||
<a-icon :type="uploadLoading ? 'loading' : 'plus'" />
|
||||
@@ -215,6 +215,13 @@
|
||||
this.handlePathChange()
|
||||
}
|
||||
},
|
||||
// 图片点击预览
|
||||
clickFunc() {
|
||||
if (!this.disabled) return
|
||||
if (this.fileList.length > 0) {
|
||||
this.handlePreview(this.fileList[0])
|
||||
}
|
||||
},
|
||||
// 预览
|
||||
handlePreview(file) {
|
||||
if (file && file.url) {
|
||||
|
||||
Reference in New Issue
Block a user