jinxia.mo 1 hónapja
szülő
commit
211f733608
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      back-ui/src/views/learn/questions/index.vue

+ 5 - 2
back-ui/src/views/learn/questions/index.vue

@@ -227,7 +227,8 @@
                     v-model:limit="queryParams.pageSize" @pagination="getList"/>
 
         <!-- 添加或修改试题对话框 -->
-        <el-dialog :title="title" v-model="open" width="1200px" append-to-body>
+        <!-- Use v-if destroy editor, or else editor will auto add <p></p> tags -->
+        <el-dialog v-if="open" :title="title" v-model="open" width="1200px" append-to-body>
             <div class="form-content-wrapper">
                 <el-form ref="questionsRef" :model="form" :rules="rules" label-width="140px">
                 <!-- 只读显示区域:题目标题和选项(仅在修改时显示) -->
@@ -786,7 +787,9 @@ function handleTextUpdate(row) {
     getQuestions(_id).then(response => {
         form.value = response.data
         open.value = true
-        title.value = "文本修改"
+        // 在标题中显示题目id
+        const questionId = form.value.id || _id
+        title.value = questionId ? `文本修改 - 题目ID:${questionId}` : "文本修改"
     })
 }