From bbc689cc872fa64e3e954ceb9f1f9e81ba7c74e4 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 28 Jun 2019 09:17:38 +0800 Subject: [PATCH] =?UTF-8?q?(=20=E6=95=B0=E6=8D=AE=E5=B7=B2=E4=BA=8E=2009:1?= =?UTF-8?q?7:12=20=E4=BF=9D=E5=AD=98=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/tpm/challengesnew/TPMMDEditor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 0f00d1c25..6967de008 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -80,8 +80,14 @@ function md_elocalStorage(editor,mdu,id){ md_add_data("content",mdu,editor.getValue()); var id1 = "#e_tip_"+id; var id2 = "#e_tips_"+id; - - $(id2).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 "); + + var text = " 数据已于 " + h + ':' + m + ':' + s +" 保存 "; + // 占位符 + if ($(id2).html() && $(id2).html() != ' ') { + $(id2).html( $(id2).html().split(' (')[0] + ` (${text})`); + } else { + $(id2).html(text); + } // $(id2).html(""); } },10000);