Kaynağa Gözat

增加黄色主题图片

dsy 2 hafta önce
ebeveyn
işleme
d9e9ffa472

BIN
src/assets/NPC/play-yellow.png


+ 58 - 65
src/components/Adult/preview/ConfigurableTable.vue

@@ -8,7 +8,7 @@
         'box-shadow': `${
           curQue.isShadow ? '4px 4px 4px rgba(0, 0, 0, 0.3)' : ''
         }`,
-        border: `${curQue.marginHighlight ? '1.1px solid #949494' : ''}`
+        border: `${curQue.marginHighlight ? '1.1px solid #949494' : ''}`,
       }"
     >
       <colgroup>
@@ -30,7 +30,7 @@
           v-for="({ content }, i) in curQue.tableData.headers"
           :key="`thead-${i}`"
           :style="{
-            'background-color': `${curQue.headerBgColor}`
+            'background-color': `${curQue.headerBgColor}`,
           }"
         >
           <template v-for="({ text, colspan, rowspan }, j) in content">
@@ -48,7 +48,7 @@
 
       <tbody
         :style="{
-          'text-align': `${curQue.textAlign}`
+          'text-align': `${curQue.textAlign}`,
         }"
       >
         <tr v-for="(row, i) in curQue.tableData.body" :key="`tr-${i}`">
@@ -68,7 +68,7 @@
                       ? 'correct'
                       : 'error'
                     : ''
-                  : ''
+                  : '',
               ]"
               :style="{ 'background-color': `${col.background}` }"
             >
@@ -76,7 +76,7 @@
                 class="cell-wrap"
                 :class="[
                   col.isCross ? 'cell-wrap-between' : '',
-                  'cell-wrap-' + curQue.textAlign
+                  'cell-wrap-' + curQue.textAlign,
                 ]"
               >
                 <template v-if="col.type === 'content'">
@@ -85,6 +85,10 @@
                   </span>
                   <template v-else>
                     <el-input
+                      v-if="
+                        judgeAnswer !== 'standardAnswer' ||
+                        (judgeAnswer === 'standardAnswer' && col.answer)
+                      "
                       v-model="
                         judgeAnswer === 'standardAnswer'
                           ? col.answer
@@ -98,17 +102,10 @@
                       @blur="
                         judgeAnswer == 'standardAnswer'
                           ? (col.answer = col.answer.trim())
-                          : (curQue.Bookanswer[i].content[
-                              j
-                            ].answer = curQue.Bookanswer[i].content[
-                              j
-                            ].answer.trim())
+                          : (curQue.Bookanswer[i].content[j].answer =
+                              curQue.Bookanswer[i].content[j].answer.trim())
                       "
                       @input="enterAnswer(i, j, 'input')"
-                      v-if="
-                        judgeAnswer !== 'standardAnswer' ||
-                          (judgeAnswer === 'standardAnswer' && col.answer)
-                      "
                     />
                   </template>
                 </template>
@@ -120,6 +117,10 @@
                   </template>
                   <template v-else>
                     <el-input
+                      v-if="
+                        judgeAnswer !== 'standardAnswer' ||
+                        (judgeAnswer === 'standardAnswer' && col.answer)
+                      "
                       v-model="
                         judgeAnswer === 'standardAnswer'
                           ? col.answer
@@ -131,10 +132,6 @@
                       :disabled="isAnswerMode"
                       :autosize="{ minRows: 1, maxRows: 6 }"
                       @input="enterAnswer(i, j, 'input')"
-                      v-if="
-                        judgeAnswer !== 'standardAnswer' ||
-                          (judgeAnswer === 'standardAnswer' && col.answer)
-                      "
                     />
                   </template>
                 </div>
@@ -150,21 +147,19 @@
                     <span
                       v-for="({ pinyin, chs }, k) in col.sentence_data
                         .wordsList"
-                      :key="
-                        `${
-                          curQue.pinyinPosition === 'top' ||
-                          curQue.pinyinPosition === 'left'
-                            ? 'pinyin'
-                            : 'chs'
-                        }-${k}`
-                      "
+                      :key="`${
+                        curQue.pinyinPosition === 'top' ||
+                        curQue.pinyinPosition === 'left'
+                          ? 'pinyin'
+                          : 'chs'
+                      }-${k}`"
                       :class="[
                         `${
                           curQue.pinyinPosition === 'top' ||
                           curQue.pinyinPosition === 'left'
                             ? 'pinyin'
                             : 'chs'
-                        }`
+                        }`,
                       ]"
                     >
                       {{
@@ -177,8 +172,8 @@
                     <span
                       v-if="
                         col.type === 'twoAnnotation' &&
-                          (curQue.pinyinPosition === 'right' ||
-                            curQue.pinyinPosition === 'bottom')
+                        (curQue.pinyinPosition === 'right' ||
+                          curQue.pinyinPosition === 'bottom')
                       "
                       class="english"
                     >
@@ -189,21 +184,19 @@
                     <span
                       v-for="({ pinyin, chs }, k) in col.sentence_data
                         .wordsList"
-                      :key="
-                        `${
-                          curQue.pinyinPosition === 'top' ||
-                          curQue.pinyinPosition === 'left'
-                            ? 'chs'
-                            : 'pinyin'
-                        }-${k}`
-                      "
+                      :key="`${
+                        curQue.pinyinPosition === 'top' ||
+                        curQue.pinyinPosition === 'left'
+                          ? 'chs'
+                          : 'pinyin'
+                      }-${k}`"
                       :class="[
                         `${
                           curQue.pinyinPosition === 'top' ||
                           curQue.pinyinPosition === 'left'
                             ? 'chs'
                             : 'pinyin'
-                        }`
+                        }`,
                       ]"
                     >
                       {{
@@ -216,8 +209,8 @@
                     <span
                       v-if="
                         col.type === 'twoAnnotation' &&
-                          (curQue.pinyinPosition === 'top' ||
-                            curQue.pinyinPosition === 'left')
+                        (curQue.pinyinPosition === 'top' ||
+                          curQue.pinyinPosition === 'left')
                       "
                       class="english"
                     >
@@ -231,7 +224,7 @@
                   <div
                     class="right-pinyin"
                     :style="{
-                      'grid-template-columns': `repeat(${col.sentence_data.wordsList.length}, auto)`
+                      'grid-template-columns': `repeat(${col.sentence_data.wordsList.length}, auto)`,
                     }"
                   >
                     <span
@@ -271,7 +264,7 @@
                           paddingRight:
                             sddItem.config.wordPadding.indexOf('right') > -1
                               ? '4px'
-                              : '0px'
+                              : '0px',
                         }"
                       >
                         <!-- 补全句子 -->
@@ -291,8 +284,8 @@
                         <template
                           v-if="
                             sddItem.img_list &&
-                              sddItem.img_list.length > 0 &&
-                              sddItem.img_list[0].id
+                            sddItem.img_list.length > 0 &&
+                            sddItem.img_list[0].id
                           "
                         >
                           <img
@@ -336,28 +329,28 @@ export default {
   props: {
     curQue: {
       type: Object,
-      required: true
+      required: true,
     },
     themeColor: {
       type: String,
-      required: true
+      required: true,
     },
     judgeAnswer: {
-      type: String
+      type: String,
     },
     TaskModel: {
-      type: String
-    }
+      type: String,
+    },
   },
   data() {
     return {
       isAnswerMode: false,
       userError: false,
       userAnswer: {
-        completeInput: []
+        completeInput: [],
       },
       userBookanswer: [],
-      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"]
+      chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"],
     };
   },
   computed: {
@@ -365,28 +358,28 @@ export default {
       let pyPos = this.curQue.pinyinPosition;
       if (pyPos === "left") {
         return {
-          "column-gap": "16px"
+          "column-gap": "16px",
         };
       }
 
       if (pyPos === "top") {
         return {
-          "flex-direction": "column"
+          "flex-direction": "column",
         };
       }
 
       if (pyPos === "right") {
         return {
-          "column-gap": "16px"
+          "column-gap": "16px",
         };
       }
 
       if (pyPos === "bottom") {
         return {
-          "flex-direction": "column"
+          "flex-direction": "column",
         };
       }
-    }
+    },
   },
   created() {
     if (this.judgeAnswer) {
@@ -397,9 +390,9 @@ export default {
       let flag = false; // 是否含有多个句子类型
       this.curQue.tableData.body.forEach((item, i) => {
         arr.push({
-          content: []
+          content: [],
         });
-        item.content.forEach(items => {
+        item.content.forEach((items) => {
           if (items.type === "mulText") {
             flag = true;
           }
@@ -412,7 +405,7 @@ export default {
                 items.CrossAnswer &&
                 items.CrossAnswer !== "normal")
                 ? "[JUDGE##F##JUDGE]"
-                : ""
+                : "",
           });
         });
       });
@@ -420,8 +413,8 @@ export default {
         this.$set(this.curQue, "Bookanswer", arr);
       }
     } else {
-      this.curQue.Bookanswer.forEach(item => {
-        item.content.forEach(item => {
+      this.curQue.Bookanswer.forEach((item) => {
+        item.content.forEach((item) => {
           if (item.userAnswerJudge === "[JUDGE##F##JUDGE]") {
             this.userError = true;
             return;
@@ -577,7 +570,7 @@ export default {
             items.mulText.detail.forEach((sdItem, sdIndex) => {
               let isHasPY = 0;
               let maxFontsize = 0;
-              sdItem.detail.forEach(sddItem => {
+              sdItem.detail.forEach((sddItem) => {
                 if (sddItem.wordsList.length > 0) {
                   sddItem.wordsList.forEach((sItem, sIndex) => {
                     let reg = /_{2,}/g;
@@ -608,7 +601,7 @@ export default {
                               bool || !complateArr[sItem.hengIndex]
                                 ? ""
                                 : "[JUDGE##F##JUDGE]",
-                            input_Isexample: Boolean(bool)
+                            input_Isexample: Boolean(bool),
                           };
                           Bookanswer[index].content[indexs].completeInput.push(
                             JSON.parse(JSON.stringify(obj))
@@ -716,8 +709,8 @@ export default {
       } else {
         sItem.isShow = true;
       }
-    }
-  }
+    },
+  },
 };
 </script>