Commit 29fec6b98925a26b8ddbf228a4c4595f2898f8e9
1 parent
cbd5265d
图片回显
Showing
1 changed file
with
6 additions
and
4 deletions
src/components/Generator/components/Upload/UploadFz.vue
| @@ -13,12 +13,14 @@ | @@ -13,12 +13,14 @@ | ||
| 13 | name="el-list"> | 13 | name="el-list"> |
| 14 | <li class="el-upload-list__item is-success" v-for="(file,index) in fileList" | 14 | <li class="el-upload-list__item is-success" v-for="(file,index) in fileList" |
| 15 | :key="file.fileId"> | 15 | :key="file.fileId"> |
| 16 | - <div style="display: flex; align-items: center;"> | ||
| 17 | - <a class="el-upload-list__item-name" @click="handleChaeck(file,index)" style="width: 60px; margin-right: 5px;"><i class="el-icon-view"></i>查看</a> | 16 | + <el-tooltip class="item" effect="dark" placement="left"> |
| 17 | + <div slot="content"> | ||
| 18 | + <img class="avatar" :src="define.comUrl + file.url"> | ||
| 19 | + </div> | ||
| 18 | <a class="el-upload-list__item-name" @click="handleClick(file)" style="flex: 1;"> | 20 | <a class="el-upload-list__item-name" @click="handleClick(file)" style="flex: 1;"> |
| 19 | <i class="el-icon-download"></i>{{file.name}} | 21 | <i class="el-icon-download"></i>{{file.name}} |
| 20 | </a> | 22 | </a> |
| 21 | - </div> | 23 | + </el-tooltip> |
| 22 | <label class="el-upload-list__item-status-label"> | 24 | <label class="el-upload-list__item-status-label"> |
| 23 | <i class="el-icon-upload-success el-icon-circle-check"></i> | 25 | <i class="el-icon-upload-success el-icon-circle-check"></i> |
| 24 | </label> | 26 | </label> |
| @@ -131,7 +133,7 @@ export default { | @@ -131,7 +133,7 @@ export default { | ||
| 131 | // }).catch(() => { }) | 133 | // }).catch(() => { }) |
| 132 | }, | 134 | }, |
| 133 | handleChaeck(file, index) { | 135 | handleChaeck(file, index) { |
| 134 | - window.open(`${this.define.comUrl}/api/File/Image/${this.type}/${file.fileId}`) | 136 | + window.open(this.define.comUrl + file.url, '_blank') |
| 135 | }, | 137 | }, |
| 136 | handleClick(file) { | 138 | handleClick(file) { |
| 137 | // 点击下载文件 | 139 | // 点击下载文件 |