From c3b455b05d1f393a5d7feecbbe8f76ae4062d103 Mon Sep 17 00:00:00 2001 From: Guarp Date: Thu, 27 Feb 2025 07:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GeneralRenderer.vue | 5 +- .../demoPages/podExercise/QuestionText.vue | 4 +- src/pages/demoPages/podExercise/Quiz.vue | 74 ++++++++++++++----- 3 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/components/GeneralRenderer.vue b/src/components/GeneralRenderer.vue index 7036224..317921e 100644 --- a/src/components/GeneralRenderer.vue +++ b/src/components/GeneralRenderer.vue @@ -21,7 +21,10 @@ const formattedLatex = ref(''); // 监听外部内容的变化,并同步更新内部内容 watch(() => props.contentInput, (newValue) => { - localInput.value = newValue; + localInput.value = newValue.replaceAll('', '$') + .replaceAll('', '$') + .replaceAll('/lt', '<') + .replaceAll('/gt', '>'); }); // 监听 localInput 的变化,实时更新渲染内容 diff --git a/src/pages/demoPages/podExercise/QuestionText.vue b/src/pages/demoPages/podExercise/QuestionText.vue index ce82607..05ae05e 100644 --- a/src/pages/demoPages/podExercise/QuestionText.vue +++ b/src/pages/demoPages/podExercise/QuestionText.vue @@ -1,9 +1,11 @@