Browse Source

生词搭配

natasha 1 year ago
parent
commit
10d441976f

+ 12 - 0
src/components/Adult/common/NewordPhraseModule.vue

@@ -139,6 +139,18 @@
         </div>
         <div class="addoption" @click="Addcn">添加释义</div>
         <div class="adult-book-input-item">
+          <span class="adult-book-lable">搭配:</span>
+          <el-input
+            placeholder="请输入"
+            v-model="curQueItem.collocation"
+            @blur="onBlur(curQueItem, 'collocation')"
+            class="adult-book-input"
+            :autosize="{ minRows: 2 }"
+            maxlength="200"
+            show-word-limit
+          ></el-input>
+        </div>
+        <div class="adult-book-input-item">
           <Upload
             :changeFillId="changeMp3"
             :datafileList="fileCon.mp3_list"

+ 4 - 0
src/components/Adult/inputModules/Neword.vue

@@ -202,6 +202,7 @@ export default {
               mp3_list: [],
               pinyin_site: "first", //拼音位置
               motif_color: false, //主题色
+              collocation: '', // 搭配
             },
           ],
         ],
@@ -468,6 +469,9 @@ export default {
             if(!items.hasOwnProperty("motif_color")){
                 this.$set(items, "motif_color", false);
             }
+            if(!items.hasOwnProperty("collocation")){
+                this.$set(items, "collocation", '')
+            }
         })
       });
       // this.curQue = JSON.parse(JSON.stringify(data));

+ 22 - 0
src/components/Adult/preview/WordPhrase.vue

@@ -257,6 +257,9 @@
                   @click="showDetail(sItem)"
                 />
               </span>
+              <div v-if="sItem.collocation" class="collocation">
+                <span>搭配:</span><b v-html="sItem.collocation"></b>
+              </div>
             </div>
           </li>
         </ul>
@@ -635,6 +638,7 @@ export default {
       .NPC-word-row {
         cursor: pointer;
         display: flex;
+        flex-flow: wrap;
         justify-content: flex-start;
         padding: 8px 13px 8px 12px;
         border-radius: 8px;
@@ -760,6 +764,24 @@ export default {
           color: #bd8865;
         }
       }
+      .collocation{
+        width: 100%;
+        display: flex;
+        padding-top: 16px;
+        >span{
+            color: #000;
+            font-size: 16px;
+            font-weight: 400;
+            line-height: 24px;
+        }
+        >b{
+            flex: 1;
+            color: rgba(0, 0, 0, 0.65);
+            font-size: 16px;
+            font-weight: 400;
+            line-height: 24px;
+        }
+      }
     }
   }
   .NPC-play-btn-brown {