Browse Source

数学公式不换行问题

11wqe1 11 hours ago
parent
commit
8307e6570f

+ 10 - 7
src/components/easy2/studyStudent.vue

@@ -506,6 +506,7 @@
                   flex-direction: column;
                   position: relative;
                 "
+                class="renderedFor"
               >
                 <div
                   style="
@@ -1567,7 +1568,7 @@
                       </div>
                     </div>
                     <div
-                      class="tooldetail"
+                      class="tooldetail renderedFor"
                       v-if="tool.toolDetail != ''"
                       :class="{
                         isUpdateToolDetailClass: toolDetailIndex == toolIndex
@@ -6205,6 +6206,7 @@
                               word-break: break-word;
                               cursor: pointer;
                             "
+                            class="renderedFor"
                           >
                             {{ index + 1 + "、"  }} <span v-html="renderedFormula(item.teststitle)"></span>
                           </div>
@@ -13029,17 +13031,17 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
-                <div>题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
+                <div class="renderedFor">题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
               </div>
               <img
                 v-if="testJson.testJson[index1].img"
@@ -31101,17 +31103,18 @@ div::-webkit-scrollbar {
   overflow: hidden;
   text-overflow: ellipsis;
 }
-.pb_content >>> .katex {
+
+.renderedFor >>> .katex {
   font-size: 16px;
   width: 100%;
   white-space: normal;
 }
-.pb_content >>> .katex .base{
+.renderedFor >>> .katex .base{
   display: inline !important;
   display: contents !important;
 }
 
-.pb_content >>> .katex .base .cjk_fallback{
+.renderedFor>>> .katex .base .cjk_fallback{
     white-space: normal !important;
     display: inline !important;
 }

+ 22 - 6
src/components/easy3/studyStudent.vue

@@ -522,6 +522,7 @@
                   flex-direction: column;
                   position: relative;
                 "
+                class="renderedFor"
               >
                 <div
                   style="
@@ -1556,7 +1557,7 @@
                         </div>
                       </div>
                     </div>
-                    <div class="tooldetail" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
+                    <div class="tooldetail renderedFor" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
                       <!-- <div class="toolTitle">工具描述</div> -->
                       <!-- @click.stop="updateToolDetail(toolIndex, 2)" 点击开启修改-->
                       <div style="height:100%;"
@@ -4473,6 +4474,7 @@
                               word-break: break-word;
                               cursor: pointer;
                             "
+                            class="renderedFor"
                           >
                             {{ index + 1 + "、"  }} <span v-html="renderedFormula(item.teststitle)"></span>
                           </div>
@@ -9670,17 +9672,17 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
-                <div>题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
+                <div class="renderedFor">题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
               </div>
               <img
                 v-if="testJson.testJson[index1].img"
@@ -9799,13 +9801,13 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
@@ -26358,4 +26360,18 @@ div::-webkit-scrollbar {
   overflow: hidden;
   text-overflow: ellipsis;
 }
+.renderedFor >>> .katex {
+  font-size: 16px;
+  width: 100%;
+  white-space: normal;
+}
+.renderedFor >>> .katex .base{
+  display: inline !important;
+  display: contents !important;
+}
+
+.renderedFor>>> .katex .base .cjk_fallback{
+    white-space: normal !important;
+    display: inline !important;
+}
 </style>

+ 12 - 10
src/components/studyStudent.vue

@@ -1507,7 +1507,7 @@
                         </div>
                       </div>
                     </div>
-                    <div class="tooldetail" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
+                    <div class="tooldetail renderedFor" v-if="tool.toolDetail != ''" :class="{isUpdateToolDetailClass:toolDetailIndex == toolIndex}">
                       <!-- <div class="toolTitle">工具描述</div> -->
                         <!-- @click.stop="updateToolDetail(toolIndex, 2)" -->
                       <div style="height:100%;"
@@ -4424,8 +4424,9 @@
                               word-break: break-word;
                               cursor: pointer;
                             "
+                            class="renderedFor"
                           >
-                              {{ index + 1 + "、"  }} <span v-html="renderedFormula(item.teststitle)"></span>
+                              {{ index + 1 + "、"  }} <span  v-html="renderedFormula(item.teststitle)"></span>
                           </div>
                         </el-tooltip>
                       </div>
@@ -9597,17 +9598,17 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
-                  <div>题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
+                  <div class="renderedFor"><span>题目:</span> <span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
               </div>
               <img
                 v-if="testJson.testJson[index1].img"
@@ -9726,13 +9727,13 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
@@ -26308,17 +26309,18 @@ div::-webkit-scrollbar {
   overflow: hidden;
   text-overflow: ellipsis;
 }
-.pb_content >>> .katex {
+
+.renderedFor >>> .katex {
   font-size: 16px;
   width: 100%;
   white-space: normal;
 }
-.pb_content >>> .katex .base{
+.renderedFor >>> .katex .base{
   display: inline !important;
   display: contents !important;
 }
 
-.pb_content >>> .katex .base .cjk_fallback{
+.renderedFor>>> .katex .base .cjk_fallback{
     white-space: normal !important;
     display: inline !important;
 }

+ 12 - 10
src/components/studySutdentClass/studyStudent.vue

@@ -521,6 +521,7 @@
                   flex-direction: column;
                   position: relative;
                 "
+                class="renderedFor"
               >
                 <div
                   style="
@@ -529,7 +530,7 @@
                     font-size: 18px;
                     color: #0e1e33;
                   "
-                  class="cont"
+                   class="cont"
                   v-if="
                     chapInfoList[courseType].chapterInfo[0].taskJson[taskCount]
                       .taskDetail != ''
@@ -1563,7 +1564,7 @@
                       </div>
                     </div>
                     <div
-                      class="tooldetail"
+                      class="tooldetail renderedFor"
                       v-if="tool.toolDetail != ''"
                       :class="{
                         isUpdateToolDetailClass: toolDetailIndex == toolIndex
@@ -6201,6 +6202,7 @@
                               word-break: break-word;
                               cursor: pointer;
                             "
+                            class="renderedFor"
                           >
                             {{ index + 1 + "、"  }} <span v-html="renderedFormula(item.teststitle)"></span>
                           </div>
@@ -12842,17 +12844,17 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
-                <div>题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
+                <div class="renderedFor">题目:<span v-html="renderedFormula(testJson.testJson[index1].teststitle)"></span></div>
               </div>
               <img
                 v-if="testJson.testJson[index1].img"
@@ -12971,13 +12973,13 @@
                 <span class="askIndex">{{ index1 + 1 }}</span>
                 <div
                   v-if="testJson.testJson[index1].type == '1'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (单选题)
                 </div>
                 <div
                   v-if="testJson.testJson[index1].type == '2'"
-                  style="margin-right: 5px; min-width: 70px"
+                  style="margin-right: 5px; min-width: 70px;flex-shrink: 0;"
                 >
                   (多选题)
                 </div>
@@ -30423,17 +30425,17 @@ div::-webkit-scrollbar {
 
   text-overflow: ellipsis;
 }
-.pb_content >>> .katex {
+.renderedFor >>> .katex {
   font-size: 16px;
   width: 100%;
   white-space: normal;
 }
-.pb_content >>> .katex .base{
+.renderedFor >>> .katex .base{
   display: inline !important;
   display: contents !important;
 }
 
-.pb_content >>> .katex .base .cjk_fallback{
+.renderedFor>>> .katex .base .cjk_fallback{
     white-space: normal !important;
     display: inline !important;
 }