|
@@ -19,62 +19,47 @@
|
|
|
fit="contain"
|
|
|
/>
|
|
|
<div class="words-right">
|
|
|
- <div :class="['words-item']">
|
|
|
- <label
|
|
|
- v-for="(item, index) in option_list"
|
|
|
- :key="index"
|
|
|
- :class="[active_index === index ? 'active' : '']"
|
|
|
- @click="active_index = index"
|
|
|
- >{{ item.content }}</label
|
|
|
- >
|
|
|
- </div>
|
|
|
<template v-for="(item, index) in option_list">
|
|
|
- <div class="strock-box" :key="index" v-if="index === active_index">
|
|
|
- <div class="strock-left" v-if="item.hz_strokes_list && item.hz_strokes_list.length > 0">
|
|
|
+ <div v-if="index === active_index" :key="index" class="strock-box">
|
|
|
+ <div class="pinyin-box">
|
|
|
+ <AudioPlay v-if="item.audio_file_id" :file-id="item.audio_file_id" theme-color="white" />
|
|
|
+ <span class="pinyin">{{ item.pinyin }}</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.hz_strokes_list && item.hz_strokes_list.length > 0" class="strock-left">
|
|
|
<template v-for="(items, indexs) in item.hz_strokes_list">
|
|
|
<Strockplayredline
|
|
|
+ v-if="items"
|
|
|
+ :key="indexs"
|
|
|
:play-storkes="true"
|
|
|
:book-text="items.hz"
|
|
|
:target-div="'pre' + items.hz + indexs + active_index"
|
|
|
:book-strokes="items.strokes"
|
|
|
:class="['strock-chinese', indexs !== item.hz_strokes_list.length - 1 ? 'border-right-none' : '']"
|
|
|
- :key="indexs"
|
|
|
- v-if="items"
|
|
|
/>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="strock-right">
|
|
|
- <el-rate v-model="item.rate" disabled text-color="#ff9900"> </el-rate>
|
|
|
- <div class="pinyin-box">
|
|
|
- <AudioPlay :file-id="item.audio_file_id" theme-color="white" v-if="item.audio_file_id" />
|
|
|
- <span class="pinyin">{{ item.pinyin }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <el-divider></el-divider>
|
|
|
- <div class="content-box" v-if="option_list[active_index]">
|
|
|
- <p class="definition" v-for="(itemd, indexd) in option_list[active_index].definition_preview" :key="indexd">
|
|
|
+ <el-divider />
|
|
|
+ <div v-if="option_list[active_index]" class="content-box">
|
|
|
+ <span v-if="option_list[active_index].definition_preview.length > 0" class="tips">释义:</span>
|
|
|
+ <p v-for="(itemd, indexd) in option_list[active_index].definition_preview" :key="indexd" class="definition">
|
|
|
{{ itemd }}
|
|
|
</p>
|
|
|
- <span
|
|
|
- class="tips"
|
|
|
- v-if="
|
|
|
- option_list[active_index].example_sentence &&
|
|
|
- (option_list[active_index].example_sentence[0].trim() ||
|
|
|
- option_list[active_index].example_sentence[1].trim())
|
|
|
- "
|
|
|
- >例句:</span
|
|
|
- >
|
|
|
+ <span v-if="option_list[active_index].collocation" class="tips">搭配:</span>
|
|
|
+ <p v-if="option_list[active_index].collocation" class="definition">
|
|
|
+ {{ option_list[active_index].collocation }}
|
|
|
+ </p>
|
|
|
+ <span v-if="option_list[active_index].example_sentence.length > 0" class="tips">例句:</span>
|
|
|
<template v-for="(iteme, indexe) in option_list[active_index].example_sentence">
|
|
|
- <p class="example-sentence" :key="indexe + iteme.trim()" v-if="iteme.trim()">
|
|
|
+ <p v-if="iteme.trim()" :key="indexe + iteme.trim()" class="example-sentence">
|
|
|
<span>{{ computeOptionMethods[data.option_number_show_mode](indexe) }} </span>
|
|
|
<span>{{ iteme }}</span>
|
|
|
</p>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <el-divider></el-divider>
|
|
|
- <div class="sound-box" v-if="answer.answer_list[active_index]">
|
|
|
+ <el-divider />
|
|
|
+ <div v-if="answer.answer_list[active_index]" class="sound-box">
|
|
|
<SoundRecordPreview
|
|
|
:wav-blob.sync="answer.answer_list[active_index].audio_file_id"
|
|
|
:type="'small'"
|
|
@@ -82,6 +67,16 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div v-if="option_list.length > 1" :class="['words-item']">
|
|
|
+ <label
|
|
|
+ v-for="(item, index) in option_list"
|
|
|
+ :key="index"
|
|
|
+ :class="[active_index === index ? 'active' : '']"
|
|
|
+ @click="active_index = index"
|
|
|
+ >{{ item.content }}</label
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -164,25 +159,25 @@ export default {
|
|
|
|
|
|
.words-right {
|
|
|
flex: 1;
|
|
|
+ }
|
|
|
|
|
|
- .words-item {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- gap: 16px;
|
|
|
+ .words-item {
|
|
|
+ width: 120px;
|
|
|
|
|
|
- label {
|
|
|
- padding: 8px 16px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 24px;
|
|
|
- color: #fff;
|
|
|
- cursor: pointer;
|
|
|
- background: rgba(48, 110, 255, 30%);
|
|
|
- border-radius: 20px;
|
|
|
+ label {
|
|
|
+ display: block;
|
|
|
+ padding: 4px 16px;
|
|
|
+ margin-bottom: 4px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 24px;
|
|
|
+ color: rgba(0, 0, 0, 30%);
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 20px;
|
|
|
|
|
|
- &.active {
|
|
|
- background: rgba(48, 110, 255, 100%);
|
|
|
- }
|
|
|
+ &.active {
|
|
|
+ color: #fff;
|
|
|
+ background: rgba(48, 110, 255, 100%);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -203,12 +198,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .strock-box {
|
|
|
- display: flex;
|
|
|
- column-gap: 16px;
|
|
|
- margin-top: 24px;
|
|
|
- }
|
|
|
-
|
|
|
.strock-left {
|
|
|
display: flex;
|
|
|
}
|
|
@@ -219,7 +208,7 @@ export default {
|
|
|
align-items: center;
|
|
|
width: max-content;
|
|
|
padding: 4px 8px;
|
|
|
- margin-top: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
background: rgba(47, 111, 236, 100%);
|
|
|
border-radius: 40px;
|
|
|
|