From b6dd47e1fa3b748c62210e9a70413feb3bcecf4e Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 13 Aug 2021 19:20:32 +0800
Subject: [PATCH] 图片附件预览

---
 src/views/resource/attach.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/views/resource/attach.vue b/src/views/resource/attach.vue
index ea05bfb..73d687f 100644
--- a/src/views/resource/attach.vue
+++ b/src/views/resource/attach.vue
@@ -41,10 +41,10 @@
                            @click="handleDownload(scope.row)">下载222
                 </el-button>
                 <el-button type="text"
-                           icon="el-icon-download"
+                           icon="el-icon-picture-outline-round"
                            size="small"
                            v-show="!fileFormat(scope.row)"
-                           @click="seeImages(scope.row)">图片预览
+                           @click="seeImages(scope.row)">预览
                 </el-button>
             </template>
             <template slot-scope="{ row }"
@@ -63,12 +63,16 @@
             </avue-form>
         </el-dialog>
 
-        <el-dialog title="图片预览"
+        <el-dialog title="预览"
                    append-to-body
                    :visible.sync="imgSee"
                    class="see-img-box">
-            <img :src="imgUrl"
-                 alt="">
+
+            <div class="img"
+                 :style="{background: imgUrl}">
+
+            </div>
+
         </el-dialog>
 
     </basic-container>
@@ -347,7 +351,7 @@
 
         seeImages (row) {
             this.imgUrl = "";
-            this.imgUrl = row.link;
+            this.imgUrl = "url(" + row.link + ") center center / contain no-repeat";
 
             this.imgSee = true;
         },

--
Gitblit v1.9.3