Explorar el Código

照片管理支持删除照片

梁展鹏 hace 3 años
padre
commit
bc0cece021
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      src/views/photoManagement/imageGoodsManagement/index.vue

+ 12 - 0
src/views/photoManagement/imageGoodsManagement/index.vue

@@ -191,6 +191,18 @@ export default {
 
   beforeDestroy() {
     this.$g_off('photo_reload', this.reload);
+  },
+
+  methods: {
+    async handleDelItem(item) {
+      const { success, msg } = await delItem({
+        id: item.id
+      });
+      if (success) {
+        this.$success('删除成功!');
+        this.$g_emit('photo_reload');
+      }
+    }
   }
 };
 </script>