Explorar o código

Update Editormd.vue

star7th %!s(int64=7) %!d(string=hai) anos
pai
achega
669758904d
Modificáronse 1 ficheiros con 16 adicións e 11 borrados
  1. 16 11
      web_src/src/components/common/Editormd.vue

+ 16 - 11
web_src/src/components/common/Editormd.vue

@@ -154,17 +154,22 @@ export default {
             localStorage.page_content= that.getMarkdown() ;
         }, 60000);
 
-        //检测是否有定时保存的内容
-        var page_content = localStorage.page_content ;
-        if (page_content && page_content.length > 0) {
-          localStorage.removeItem("page_content");
-          that.$confirm(that.$t('draft_tips'),
-          ).then(()=>{
-              that.clear() ;
-              that.insertValue(page_content) ;
-              localStorage.removeItem("page_content");
-            });
-        };
+      //检测是否有定时保存的内容
+      var page_content = localStorage.page_content ;
+      if (page_content && page_content.length > 0) {
+        localStorage.removeItem("page_content");
+        that.$confirm(that.$t('draft_tips'),'',{
+          showClose:false
+        }
+        ).then(()=>{
+            that.clear() ;
+            that.insertValue(page_content) ;
+            localStorage.removeItem("page_content");
+          }).catch(()=>{
+            localStorage.removeItem("page_content");
+          });
+      };
+
     },
     //关闭前提示
     beforeunloadHandler(e){