From c388c01d839bf21d03646311c4d6542eda51f792 Mon Sep 17 00:00:00 2001
From: luobisheng <727299681@qq.com>
Date: 星期二, 29 十一月 2022 09:26:38 +0800
Subject: [PATCH] 短信模板修改

---
 src/components/myUpload/index.vue |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/components/myUpload/index.vue b/src/components/myUpload/index.vue
index 799794e..b2e666d 100644
--- a/src/components/myUpload/index.vue
+++ b/src/components/myUpload/index.vue
@@ -2,11 +2,12 @@
     <div class="my-upload">
       <div v-if="pictureList.length > 0" class="image-box">
         <div v-for="image in pictureList" class="image-box-item">
-          <i @click="handleDeletePicture(image)" class="el-icon-delete image-delete-icon"></i>
+          <i v-if="isShowUpload" @click="handleDeletePicture(image)" class="el-icon-delete image-delete-icon"></i>
           <el-image :key="image" class="image-content" :src="image" ></el-image>
         </div>
       </div>
       <el-upload
+          v-if="isShowUpload"
         :file-list="fileList" 
         action="/sccg/file/medias"
         :multiple="multiple"
@@ -15,8 +16,7 @@
         :limit="limit" 
         :on-success="handleSuccess"
         :on-error="handleError" 
-        :list-type="listType" 
-        :on-remove="handleRemove"
+        :list-type="listType"
         :headers="getToken()">
           <div class="upload-btn">
             <i class="el-icon-plus"></i>
@@ -83,28 +83,19 @@
                 return { Authorization: tokenHead + token }
             }
         },
-        // 绉婚櫎鏂囦欢
-        handleRemove(file, fileList){
-            this.$emit('delPictureUrl',{url:file.response.data.url1});
-        },
 
         handleDeletePicture(imageUrl) {
           this.$emit('delPictureUrl', { url: imageUrl });
         }
     },
     props: {
-        // 杩斿洖涓婁紶鎴愬姛鍥剧墖鍦板潃
-        setPictureUrl:{
-            type:Function,
-            default:()=>{}
-        },
-        delPictureUrl:{
-            type:Function,
-            default:()=>{}
-        },
       pictureList: {
         type: Array,
         default: () => []
+      },
+      isShowUpload: {
+        type: Boolean,
+        default: () => true
       }
     },
 }

--
Gitblit v1.8.0