This commit is contained in:
zyronon
2023-12-13 17:42:17 +08:00
parent 1a70c9af45
commit 2baf00e780
3 changed files with 8 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ defineExpose({scrollToBottom, scrollToItem})
<VolumeIcon class="volume" @click="playWordAudio(item.name)"></VolumeIcon>
</div>
<div class="item-sub-title" v-if="item.trans.length && showTranslate">
<div v-for="tran in item.trans">{{ tran }}</div>
<div v-for="v in item.trans">{{ (v.pos ? v.pos + '.' : '') + v.cn }}</div>
</div>
</template>
<template v-slot:suffix="{ item, index }">

View File

@@ -162,7 +162,7 @@ defineExpose({del, showWord, hideWord, play})
}"
>
<div class="translate-item" v-for="(v,i) in word.trans">
<span>{{ v }}</span>
<span>{{ (v.pos ? v.pos + '.' : '') + v.cn }}</span>
<!-- <div class="volumeIcon">-->
<!-- <Tooltip-->
<!-- v-if="i === word.trans.length - 1"-->

View File

@@ -4,11 +4,16 @@ import codeFlag from "@/assets/img/flags/code.png";
import myFlag from "@/assets/img/flags/my.png";
import {DefaultChapterWordNumber} from "@/stores/setting.ts";
export type WordTrans = {
pos: string,
cn: string,
en: string
}
export type Word = {
"word": string,
"phonetic0": string,
"phonetic1": string,
"trans": string[]
"trans": WordTrans[]
checked?: boolean,
id?: any,
}