Explorar o código

fix: 适配题库界面为新的api逻辑

ChenYangfan %!s(int64=6) %!d(string=hai) anos
pai
achega
5e80696720

+ 7 - 0
src/views/quiz/components/MarkdownSection.vue

@@ -19,9 +19,16 @@ export default {
 </script>
 
 <style lang="scss">
+@import "~@/style/editor.scss";
+
 .markdown-section {
   img{
     max-width: 100%;
   }
+  pre {
+    font-size: 12px;
+    word-break: break-all;
+    white-space: pre-wrap;
+  }
 }
 </style>

+ 3 - 2
src/views/quiz/components/QuestionTable.vue

@@ -2,8 +2,9 @@
   <div class="question-table">
     <search-bar class="mb-16" v-model="inputStem" placeholder="题干搜索" @input="debounceFetchQuestions"/>
     <pagination class="mt-16 mb-32" :page="page.number" :size="page.size" :total-elements="page.totalElements"
-                @change="fetchQuestionList"></pagination>
-    <div class="question-card-container">
+                v-show="questionList && questionList.length > 0" @change="fetchQuestionList"></pagination>
+    <div class="no-content-warning" v-if="questionList === null || questionList.length === 0">请输入关键字搜索</div>
+    <div class="question-card-container" v-else>
       <template v-for="item in questionList">
         <question-card
           v-if="item !== null"