fix problem hint.

This commit is contained in:
2023-09-04 01:44:32 +00:00
parent 858560510a
commit 026f91f544

View File

@@ -273,8 +273,6 @@ async function submit() {
if (notCompleted) return if (notCompleted) return
getTemplate() getTemplate()
problem.tags = [...newTags.value, ...fromExistingTags.value] problem.tags = [...newTags.value, ...fromExistingTags.value]
// 因为编辑器的问题,删掉空白的 hint
if ((problem.hint = "<p><br></p>")) problem.hint = ""
const api = { const api = {
"admin problem create": createProblem, "admin problem create": createProblem,
"admin problem edit": editProblem, "admin problem edit": editProblem,
@@ -405,7 +403,11 @@ watch([fromExistingTags, newTags], (tags) => {
<n-button class="addSamples box" tertiary type="primary" @click="addSample"> <n-button class="addSamples box" tertiary type="primary" @click="addSample">
添加用例 添加用例
</n-button> </n-button>
<TextEditor v-if="ready" v-model:value="problem.hint" title="提示" /> <n-form>
<n-form-item label="提示">
<n-input v-model:value="problem.hint"/>
</n-form-item>
</n-form>
<n-form> <n-form>
<n-form-item label="题目的来源"> <n-form-item label="题目的来源">
<n-input <n-input