Browse Source

新的git命令

e 1 year ago
parent
commit
a2721d1629
1 changed files with 27 additions and 29 deletions
  1. 27 29
      day35/vue-admin-template-master/src/views/message/index.vue

+ 27 - 29
day35/vue-admin-template-master/src/views/message/index.vue

@@ -89,39 +89,37 @@ export default {
     },
     // 删除
     handleDelete(row) {
-         this.$confirm('是否删除当前信息', '确认删除', {
-          distinguishCancelAndClose: true,
-          confirmButtonText: '删除',
-          cancelButtonText: '取消'
-        })
-          .then(() => {
-      delMessage({
-        id: row.jrid,
+      this.$confirm("是否删除当前信息", "确认删除", {
+        distinguishCancelAndClose: true,
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
       })
-        .then((res) => {
-          console.log(res, "删除成功");
-          if (res.code == 101) {
-
-            this.$message({
-              message: res.message,
-              type: "success",
-            });
-            this.getList();
-            this.value = "";
-          }
-        })
-        .catch((err) => {
-          console.log(err, "删除失败");
-        });
+        .then(() => {
+          delMessage({
+            id: row.jrid,
           })
-          .catch(action => {
-            this.$message({
-              type: 'info',
-              message: action === 'cancel'
-                ? '放弃删除并离开页面'
-                : '停留在当前页面'
+            .then((res) => {
+              console.log(res, "删除成功");
+              if (res.code == 101) {
+                this.$message({
+                  message: res.message,
+                  type: "success",
+                });
+                this.getList();
+                this.value = "";
+              }
             })
+            .catch((err) => {
+              console.log(err, "删除失败");
+            });
+        })
+        .catch((action) => {
+          this.$message({
+            type: "info",
+            message:
+              action === "cancel" ? "放弃删除并离开页面" : "停留在当前页面",
           });
+        });
     },
     // 查询地址
     searchMain() {