Bladeren bron

适配章节报告

cxmo 8 maanden geleden
bovenliggende
commit
a7bb0fb25e
1 gewijzigde bestanden met toevoegingen van 6 en 5 verwijderingen
  1. 6 5
      src/views/report/Detail.vue

+ 6 - 5
src/views/report/Detail.vue

@@ -64,6 +64,7 @@ async function getReportInfo() {
         Title:detail.title,
         Content:detail.content,
         HasChapter:Boolean(detail.hasChapter),
+        ChapterContent:detail.chapters,
         HeadResource:{
             ImgUrl:detail.headResource?.imgURL||'',
             Style:detail.headResource?.style||''
@@ -201,7 +202,7 @@ onUnmounted(() => {
         :key="item.value"
         :style="{
           fontFamily:item.family,
-          fontSize:item.size+'px',
+          fontSize:item.size,
           fontWeight:item.weight,
           textAlign:item.align,
           color:item.color,
@@ -254,7 +255,7 @@ onUnmounted(() => {
         <div
             id="rich-content"
             class="report-content-box rich-content"
-            v-if="reportInfo.HasChapter!==1"
+            v-if="!reportInfo.HasChapter"
         >
             <div v-for="item in renderContentList" :key="item" v-html="item"></div>
         </div>
@@ -262,7 +263,7 @@ onUnmounted(() => {
         <div
             id="rich-content"
             class="report-content-box rich-content"
-            v-if="reportInfo.HasChapter===1"
+            v-if="reportInfo.HasChapter"
         >
             <div 
                 class="chapter-item-wrap" 
@@ -270,9 +271,9 @@ onUnmounted(() => {
                 :key="index"
             >
                 <div class="chapter-title">
-                <h3 class="chapter-title-text">{{chapter.Title}}</h3>
+                <h3 class="chapter-title-text">{{chapter.title}}</h3>
                 </div>
-                <div v-html="chapter.Content"></div>
+                <div v-html="chapter.content"></div>
             </div>
         </div>
     </template>