tianyunperfect hai 1 ano
pai
achega
8fff3ea261
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      simple-demo/send_memos.html

+ 8 - 0
simple-demo/send_memos.html

@@ -175,6 +175,7 @@
                               :preview-src-list="['https://memos_assert.tianyunperfect.cn/' + img['internal_path']]"
                               :preview-src-list="['https://memos_assert.tianyunperfect.cn/' + img['internal_path']]"
                               style="max-height: 200px;max-width: 300px; margin: 10px 10px 0 0; cursor: pointer">
                               style="max-height: 200px;max-width: 300px; margin: 10px 10px 0 0; cursor: pointer">
                     </el-image>
                     </el-image>
+                    <div @click="delPic(img)">删除</div>
                 </div>
                 </div>
 
 
             </div>
             </div>
@@ -242,6 +243,13 @@
             this.search();
             this.search();
         },
         },
         methods: {
         methods: {
+            delPic(img){
+              // 根据id从  cloneFileIds 删除
+                let index = this.cloneFileIds.findIndex(item => item.id === img.id);
+                if (index !== -1) {
+                    this.cloneFileIds.splice(index, 1);
+                }
+            },
             getCloneResourceIds(id) {
             getCloneResourceIds(id) {
                 let resourceMapElement = this.resourceMap[id];
                 let resourceMapElement = this.resourceMap[id];
                 if (resourceMapElement) {
                 if (resourceMapElement) {