guhongwei 4 年之前
父节点
当前提交
2cee2c4ced
共有 1 个文件被更改,包括 16 次插入8 次删除
  1. 16 8
      src/views/superAdminCenter/enterpriseProduct/index.vue

+ 16 - 8
src/views/superAdminCenter/enterpriseProduct/index.vue

@@ -433,14 +433,22 @@ export default {
     },
     // 刪除
     async handleDelete(id) {
-      const res = await this.delete(id);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '删除信息成功',
-          type: 'success',
-        });
-        this.search();
-      }
+      this.$confirm('您确定要删除此信息吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(async () => {
+          const res = await this.delete(id);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '删除信息成功',
+              type: 'success',
+            });
+            this.search();
+          }
+        })
+        .catch(() => {});
     },
     // 图片
     uploadSuccess({ type, data }) {