From a9385c77c4a0809f47dae3866ea4b74e40088c16 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 13 Nov 2023 15:39:27 +0800 Subject: [PATCH] fix problem hint. --- src/admin/problem/detail.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/admin/problem/detail.vue b/src/admin/problem/detail.vue index b29e909..996bfd8 100644 --- a/src/admin/problem/detail.vue +++ b/src/admin/problem/detail.vue @@ -268,9 +268,17 @@ function getTemplate() { } } +function filterHint() { + // 编辑器会自动添加一段 HTML + if (problem.hint === '


') { + problem.hint = "" + } +} + async function submit() { const notCompleted = detectProblemCompletion() if (notCompleted) return + filterHint() getTemplate() problem.tags = [...newTags.value, ...fromExistingTags.value] const api = { @@ -403,11 +411,7 @@ watch([fromExistingTags, newTags], (tags) => { 添加用例 - - - - - +