Browse Source

删除tab二次确认

reaper 4 years ago
parent
commit
6e435ff280
1 changed files with 26 additions and 6 deletions
  1. 26 6
      src/components/knowledgeExtra/AddDevKnow.vue

+ 26 - 6
src/components/knowledgeExtra/AddDevKnow.vue

@@ -497,14 +497,34 @@ export default {
   },
   methods: {
     closeStaticTab() {
-      this.staticTabShow = false;
-      this.tabActiveChange("two");
-      this.tabErrMsg = null;
+      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: "warning"
+      })
+        .then(() => {
+          this.staticTabShow = false;
+          this.tabActiveChange("two");
+          this.tabErrMsg = null;
+        })
+        .catch(() => {});
     },
     closeAssesTab() {
-      this.AssesTabSHow = false;
-      this.tabActiveChange("one");
-      this.tabErrMsg = null;
+      this.$alert("确定要删除该标签?删除后该标签内容将会被清空!", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: '取消',
+        // cancelButtonClass: 'leaveBtn',
+        // customClass: 'leaveBox',
+        type: "warning"
+      })
+        .then(() => {
+          this.AssesTabSHow = false;
+          this.tabActiveChange("one");
+          this.tabErrMsg = null;
+        })
+        .catch(() => {});
     },
     scrollTo(value) {
       let div = this.$refs["elscrollbar"].$refs["wrap"];