From c4efa0df80721d001c71bdd7c3c3313b3fafbd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 19 Mar 2020 19:07:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E4=BF=9D=E5=AD=98=E5=9C=A8=E5=AE=9E=E8=AE=AD=E7=9A=84?= =?UTF-8?q?=E7=AE=80=E4=BB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tpm/shixunchild/Challenges/Challenges.js | 39 ++++++++++--------- .../Challenges/Challengesjupyter.js | 7 +++- .../shixunchild/Challenges/Showmarkdown.js | 38 ++++++++++++++++++ 3 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 public/react/src/modules/tpm/shixunchild/Challenges/Showmarkdown.js diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 5aa95f4a1..9c08f5a25 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -14,7 +14,8 @@ import '../shixunchildCss/Challenges.css'; import AccountProfile from"../../../user/AccountProfile"; -const $ = window.$; +import Showmarkdown from "./Showmarkdown"; + class Challenges extends Component { constructor(props) { @@ -118,16 +119,16 @@ class Challenges extends Component { } updatamakedown = (id) => { - setTimeout(() => { - var shixunDescr = window.editormd.markdownToHTML(id, { - htmlDecode: "style,script,iframe", - taskList: true, - tex: true, - flowChart: true, - sequenceDiagram: true - }); - $("#" + id + " p:first").addClass("ReactMarkdown"); - }, 200) + // setTimeout(() => { + // var shixunDescr = window.editormd.markdownToHTML(id, { + // htmlDecode: "style,script,iframe", + // taskList: true, + // tex: true, + // flowChart: true, + // sequenceDiagram: true + // }); + // $("#" + id + " p:first").addClass("ReactMarkdown"); + // }, 200) } // 关卡的上移下移操作 @@ -404,9 +405,9 @@ class Challenges extends Component { render() { let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state; let { loadingContent } = this.props; - if (ChallengesDataList != undefined) { - this.updatamakedown("ReactMarkdown") - } + // if (ChallengesDataList != undefined) { + // this.updatamakedown("ReactMarkdown") + // } let id = this.props.match.params.shixunId; const antIcon = ; @@ -535,11 +536,11 @@ class Challenges extends Component { src={getImageUrl("images/educoder/nodata.png")} />}

暂时还没有相关数据哦!

- :

- {ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"": -

- } -

} + : ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"": + + }