From 75eef2a43abbbfcd874f8de9d7f58bde3b72a710 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 28 Jun 2019 09:56:10 +0800 Subject: [PATCH] textStart --- public/react/src/modules/tpm/challengesnew/TPMMDEditor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 6967de008..47efccf74 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -81,9 +81,10 @@ function md_elocalStorage(editor,mdu,id){ var id1 = "#e_tip_"+id; var id2 = "#e_tips_"+id; - var text = " 数据已于 " + h + ':' + m + ':' + s +" 保存 "; + var textStart = " 数据已于 " + var text = textStart + h + ':' + m + ':' + s +" 保存 "; // 占位符 - if ($(id2).html() && $(id2).html() != ' ') { + if ($(id2).html() && $(id2).html() != ' ' && $(id2).html().startWith(textStart) == false) { $(id2).html( $(id2).html().split(' (')[0] + ` (${text})`); } else { $(id2).html(text);