放开日语限制
This commit is contained in:
@@ -91,11 +91,14 @@ export function usePlayWordAudio() {
|
||||
const audio = $ref(new Audio())
|
||||
|
||||
function playAudio(word: string) {
|
||||
let url = ''
|
||||
if (settingStore.wordSoundType === 'uk') {
|
||||
audio.src = `${PronunciationApi}${word}&type=1`
|
||||
url = `${PronunciationApi}${word}&type=1`
|
||||
} else if (settingStore.wordSoundType === 'us') {
|
||||
audio.src = `${PronunciationApi}${word}&type=2`
|
||||
url = `${PronunciationApi}${word}&type=2`
|
||||
}
|
||||
url += '&le=jap'
|
||||
audio.src = url
|
||||
audio.volume = settingStore.wordSoundVolume / 100
|
||||
audio.playbackRate = settingStore.wordSoundSpeed
|
||||
audio.play()
|
||||
|
||||
@@ -53,7 +53,7 @@ defineExpose({scrollToBottom, scrollToItem})
|
||||
<VolumeIcon class="volume" @click="playWordAudio(item.word)"></VolumeIcon>
|
||||
</div>
|
||||
<div class="item-sub-title" v-if="item.trans.length && showTranslate">
|
||||
<div v-for="v in item.trans">{{ (v.pos ? v.pos + '.' : '') + v.cn }}</div>
|
||||
<div v-for="v in item.trans">{{ (v.pos ? v.pos + '.' : '') + (v.cn || v.en)}}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:suffix="{ item, index }">
|
||||
|
||||
@@ -162,7 +162,7 @@ defineExpose({del, showWord, hideWord, play})
|
||||
}"
|
||||
>
|
||||
<div class="translate-item" v-for="(v,i) in word.trans">
|
||||
<span>{{ (v.pos ? v.pos + '.' : '') + v.cn }}</span>
|
||||
<span>{{ (v.pos ? v.pos + '.' : '') + (v.cn || v.en) }}</span>
|
||||
<!-- <div class="volumeIcon">-->
|
||||
<!-- <Tooltip-->
|
||||
<!-- v-if="i === word.trans.length - 1"-->
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import bookFlag from "@/assets/img/flags/book.png";
|
||||
import enFlag from "@/assets/img/flags/en.png";
|
||||
import jaFlag from "@/assets/img/flags/ja.png";
|
||||
import deFlag from "@/assets/img/flags/de.png";
|
||||
import codeFlag from "@/assets/img/flags/code.png";
|
||||
import myFlag from "@/assets/img/flags/my.png";
|
||||
import {DefaultChapterWordNumber} from "@/stores/setting.ts";
|
||||
@@ -204,8 +206,8 @@ export enum TranslateEngine {
|
||||
export const languageCategoryOptions = [
|
||||
{id: 'article', name: '文章', flag: bookFlag},
|
||||
{id: 'en', name: '英语', flag: enFlag},
|
||||
// {id: 'ja', word: '日语', flag: jpFlag},
|
||||
// {id: 'de', word: '德语', flag: deFlag},
|
||||
{id: 'ja', name: '日语', flag: jaFlag},
|
||||
{id: 'de', name: '德语', flag: deFlag},
|
||||
{id: 'code', name: 'Code', flag: codeFlag},
|
||||
{id: 'my', name: '我的', flag: myFlag},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user