From 090bce038b881a55f6453f49a8ae93c5697cf718 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期日, 19 十一月 2023 18:39:02 +0800
Subject: [PATCH] 魅宠图像

---
 ruoyi-ui/src/views/secret/secretInfo.vue |   74 ++++++++++++++++++++-----------------
 1 files changed, 40 insertions(+), 34 deletions(-)

diff --git a/ruoyi-ui/src/views/secret/secretInfo.vue b/ruoyi-ui/src/views/secret/secretInfo.vue
index 081f05b..cae9dbb 100644
--- a/ruoyi-ui/src/views/secret/secretInfo.vue
+++ b/ruoyi-ui/src/views/secret/secretInfo.vue
@@ -119,40 +119,46 @@
         <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>
         <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
         <div slot="file" slot-scope="{file}">
-                  <img
-                    class="el-upload-list__item-thumbnail"
-                    src="../../assets/401_images/401.gif"
-                    alt=""
-                    style="width: 147px; height: 147px"
-                    fit="cover"
-                  >
-                  <span class="el-upload-list__item-actions">
-                  <span
+          <!-- 娣诲姞video鍏冪礌鐢ㄤ簬鏄剧ず瑙嗛 -->
+          <video
+            v-if="file.url.includes('.mp4')"
+            class="el-upload-list__item-thumbnail"
+            :src="file.url"
+            style="width: 147px; height: 147px"
+            fit="cover"
+          ></video>
+          <img v-else
+               class="el-upload-list__item-thumbnail"
+               src="../../assets/401_images/401.gif"
+               alt=""
+               style="width: 147px; height: 147px"
+               fit="cover">
 
-                    class="el-upload-list__item-preview"
-                    @click="handleFileCardPreview(file)"
-                  >
-                    <i class="el-icon-zoom-in"></i>
-                  </span>
-                  <span
+          <span class="el-upload-list__item-actions">
+               <span class="el-upload-list__item-name">{{ file.name }}</span>
+                    <span
+                      class="el-upload-list__item-preview"
+                      @click="handleFileCardPreview(file)"
+                    >
+                      <i class="el-icon-zoom-in"></i>
+                    </span>
+                    <span
 
-                    @click="handleRemove(file)"
-                    class="el-upload-list__item-delete"
+                      class="el-upload-list__item-delete"
+                      @click="handleDownload(file.url)"
+                    >
+                 <i class="el-icon-download"></i>
+                 </span>
+                    <span
+                      v-if="isShow"
+                      class="el-upload-list__item-delete"
+                      @click="handleRemoveFile(file)"
+                    >
+                      <i class="el-icon-delete"></i>
+                    </span>
+              </span>
 
-                  >
-                    <i class="el-icon-download"></i>
-                  </span>
-                  <span
-                    v-if="isShow"
-                    class="el-upload-list__item-delete"
-                    @click="handleRemoveFile(file)"
-                  >
-                    <i class="el-icon-delete"></i>
-                  </span>
-                </span>
-
-
-                </div>
+        </div>
 
 
             </el-upload>
@@ -164,7 +170,7 @@
 
 
       <el-dialog  :visible.sync="dialogVisible">
-        <img w-full :src="dialogImageUrl" alt="Preview Image" />
+        <img w-full :src="dialogImageUrl" style="width: 100%; height: 100%" alt="Preview Image" />
       </el-dialog>
     </div>
   </template>
@@ -464,7 +470,7 @@
   }
 
   </script>
-  <style scoped lang="scss">
+  <style scoped>
   .mt
   {
     position: relative;
@@ -479,7 +485,7 @@
     display: block;
     position: absolute;
   }
-  .hide .el-upload--picture-card {
+  .hide /deep/ .el-upload--picture-card {
     display: none;
   }
   .form{

--
Gitblit v1.9.1