放开日语限制
This commit is contained in:
Vendored
-37
@@ -7,28 +7,11 @@ export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
Add: typeof import('./src/pages/pc/components/toolbar/Add.vue')['default']
|
||||
ArticleContentDialog: typeof import('./src/pages/pc/components/dialog/ArticleContentDialog.vue')['default']
|
||||
ArticleList: typeof import('./src/pages/pc/components/list/ArticleList.vue')['default']
|
||||
Backgorund: typeof import('./src/pages/pc/components/Backgorund.vue')['default']
|
||||
BackIcon: typeof import('./src/components/icon/BackIcon.vue')['default']
|
||||
BaseButton: typeof import('./src/components/BaseButton.vue')['default']
|
||||
BaseIcon: typeof import('./src/components/BaseIcon.vue')['default']
|
||||
BaseList: typeof import('./src/pages/pc/components/list/BaseList.vue')['default']
|
||||
ChapterName: typeof import('./src/pages/pc/components/toolbar/ChapterName.vue')['default']
|
||||
Close: typeof import('./src/components/icon/Close.vue')['default']
|
||||
CollectNotice: typeof import('./src/pages/pc/components/CollectNotice.vue')['default']
|
||||
DeleteIcon: typeof import('./src/components/icon/DeleteIcon.vue')['default']
|
||||
Dialog: typeof import('./src/pages/pc/components/dialog/Dialog.vue')['default']
|
||||
DictDiglog: typeof import('./src/pages/pc/components/dialog/DictDiglog.vue')['default']
|
||||
DictGroup: typeof import('./src/pages/pc/components/list/DictGroup.vue')['default']
|
||||
DictItem: typeof import('./src/pages/pc/components/list/DictItem.vue')['default']
|
||||
DictList: typeof import('./src/pages/pc/components/list/DictList.vue')['default']
|
||||
DictListPanel: typeof import('./src/pages/pc/components/DictListPanel.vue')['default']
|
||||
EditAbleText: typeof import('./src/pages/pc/components/EditAbleText.vue')['default']
|
||||
EditArticle: typeof import('./src/pages/pc/components/article/EditArticle.vue')['default']
|
||||
EditBatchArticleModal: typeof import('./src/pages/pc/components/article/EditBatchArticleModal.vue')['default']
|
||||
EditSingleArticleModal: typeof import('./src/pages/pc/components/article/EditSingleArticleModal.vue')['default']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
@@ -44,31 +27,11 @@ declare module 'vue' {
|
||||
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
Empty: typeof import('./src/components/Empty.vue')['default']
|
||||
FeedbackModal: typeof import('./src/pages/pc/components/toolbar/FeedbackModal.vue')['default']
|
||||
Fireworks: typeof import('./src/pages/pc/components/Fireworks.vue')['default']
|
||||
IconWrapper: typeof import('./src/pages/pc/components/IconWrapper.vue')['default']
|
||||
Input: typeof import('./src/pages/pc/components/Input.vue')['default']
|
||||
List: typeof import('./src/pages/pc/components/list/List.vue')['default']
|
||||
Logo: typeof import('./src/pages/pc/components/Logo.vue')['default']
|
||||
MiniDialog: typeof import('./src/pages/pc/components/dialog/MiniDialog.vue')['default']
|
||||
PopConfirm: typeof import('./src/pages/pc/components/PopConfirm.vue')['default']
|
||||
RepeatSetting: typeof import('./src/pages/pc/components/toolbar/RepeatSetting.vue')['default']
|
||||
RightTopBar: typeof import('./src/pages/pc/components/RightTopBar.vue')['default']
|
||||
Ring: typeof import('./src/pages/pc/components/Ring.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
Setting: typeof import('./src/pages/pc/components/Setting.vue')['default']
|
||||
SettingDialog: typeof import('./src/pages/pc/components/dialog/SettingDialog.vue')['default']
|
||||
Slide: typeof import('./src/pages/pc/components/Slide.vue')['default']
|
||||
SlideHorizontal: typeof import('./src/components/slide/SlideHorizontal.vue')['default']
|
||||
SlideItem: typeof import('./src/components/slide/SlideItem.vue')['default']
|
||||
Toolbar: typeof import('./src/pages/pc/components/toolbar/index.vue')['default']
|
||||
Tooltip: typeof import('./src/pages/pc/components/Tooltip.vue')['default']
|
||||
TranslateSetting: typeof import('./src/pages/pc/components/toolbar/TranslateSetting.vue')['default']
|
||||
VolumeIcon: typeof import('./src/components/icon/VolumeIcon.vue')['default']
|
||||
VolumeSetting: typeof import('./src/pages/pc/components/toolbar/VolumeSetting.vue')['default']
|
||||
WordList: typeof import('./src/pages/pc/components/list/WordList.vue')['default']
|
||||
WordListDialog: typeof import('./src/pages/pc/components/dialog/WordListDialog.vue')['default']
|
||||
}
|
||||
export interface ComponentCustomProperties {
|
||||
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
|
||||
|
||||
+5
-2
@@ -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"-->
|
||||
|
||||
+4
-2
@@ -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