Merge branch 'dev'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {onMounted, watchEffect} from "vue"
|
||||
import {useSettingStore} from "@/stores/setting.ts";
|
||||
import {PronunciationApi} from "@/types/types.ts";
|
||||
import { onMounted, watchEffect } from "vue"
|
||||
import { useSettingStore } from "@/stores/setting.ts";
|
||||
import { PronunciationApi } from "@/types/types.ts";
|
||||
|
||||
import { SoundFileOptions } from "@/config/env.ts";
|
||||
|
||||
@@ -89,6 +89,7 @@ export function usePlayWordAudio() {
|
||||
const audio = $ref(new Audio())
|
||||
|
||||
function playAudio(word: string) {
|
||||
if (!word) return
|
||||
let url = `${PronunciationApi}${word}&type=2`
|
||||
if (settingStore.soundType === 'uk') {
|
||||
url = `${PronunciationApi}${word}&type=1`
|
||||
|
||||
@@ -665,9 +665,13 @@ provide('currentPractice', currentPractice)
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: .3rem;
|
||||
width: 6rem;
|
||||
color: gray;
|
||||
|
||||
.num,.name{
|
||||
word-break: keep-all;
|
||||
padding: 0 .4rem;
|
||||
}
|
||||
|
||||
.line {
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { inject, onMounted, onUnmounted, watch } from "vue"
|
||||
import { Article, ArticleWord, PracticeArticleWordType, Sentence, ShortcutKey, Word } from "@/types/types.ts";
|
||||
import { useBaseStore } from "@/stores/base.ts";
|
||||
import { useSettingStore } from "@/stores/setting.ts";
|
||||
import { usePlayBeep, usePlayCorrect, usePlayKeyboardAudio } from "@/hooks/sound.ts";
|
||||
import { usePlayBeep, usePlayKeyboardAudio, usePlayWordAudio } from "@/hooks/sound.ts";
|
||||
import { emitter, EventKey, useEvents } from "@/utils/eventBus.ts";
|
||||
import { _dateFormat, _nextTick, isMobile, msToHourMinute, total } from "@/utils";
|
||||
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
|
||||
@@ -76,8 +76,9 @@ const currentIndex = $computed(() => {
|
||||
})
|
||||
|
||||
const playBeep = usePlayBeep()
|
||||
const playCorrect = usePlayCorrect()
|
||||
const playKeyboardAudio = usePlayKeyboardAudio()
|
||||
const playWordAudio = usePlayWordAudio()
|
||||
|
||||
const {
|
||||
toggleWordCollect,
|
||||
} = useWordOptions()
|
||||
@@ -685,6 +686,7 @@ const currentPractice = inject('currentPractice', [])
|
||||
&&'hover-show',
|
||||
word.type === PracticeArticleWordType.Number && 'font-family text-xl'
|
||||
]"
|
||||
@click="playWordAudio(word.word)"
|
||||
>
|
||||
<TypingWord :word="word"
|
||||
:is-typing="true"
|
||||
|
||||
@@ -619,6 +619,14 @@ function transferOk() {
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
<div>日期:2025/11/30</div>
|
||||
<div>内容:文章里的单词可点击播放</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-item">
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
<div>日期:2025/11/29</div>
|
||||
<div>内容:修改 Slider 组件显示bug,新增 IE 浏览器检测提示</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -128,7 +128,7 @@ watchOnce(() => data.words.length, (newVal, oldVal) => {
|
||||
buttons: [
|
||||
{
|
||||
text: `下一步(5/${TourConfig.total})`,
|
||||
action:tour.next
|
||||
action: tour.next
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -140,7 +140,7 @@ watchOnce(() => data.words.length, (newVal, oldVal) => {
|
||||
buttons: [
|
||||
{
|
||||
text: `下一步(6/${TourConfig.total})`,
|
||||
action(){
|
||||
action() {
|
||||
tour.next()
|
||||
router.push('/articles')
|
||||
}
|
||||
@@ -313,7 +313,7 @@ async function next(isTyping: boolean = true) {
|
||||
} else {
|
||||
console.log('自由模式,全完学完了')
|
||||
showStatDialog = true
|
||||
localStorage.removeItem(PracticeSaveWordKey.key)
|
||||
setTimeout(() => localStorage.removeItem(PracticeSaveWordKey.key), 300)
|
||||
}
|
||||
} else {
|
||||
data.index++
|
||||
@@ -345,7 +345,7 @@ async function next(isTyping: boolean = true) {
|
||||
statStore.spend = Date.now() - statStore.startDate
|
||||
console.log('全完学完了')
|
||||
showStatDialog = true
|
||||
localStorage.removeItem(PracticeSaveWordKey.key)
|
||||
setTimeout(() => localStorage.removeItem(PracticeSaveWordKey.key), 300)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,15 +111,15 @@ const progress = $computed(() => {
|
||||
<div class="line"></div>
|
||||
<div class="name">单词总数</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="num">{{ format(statStore.inputWordNumber, '', 0) }}</div>
|
||||
<div class="line"></div>
|
||||
<div class="name">总输入数</div>
|
||||
</div>
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="num">{{ format(statStore.inputWordNumber, '', 0) }}</div>-->
|
||||
<!-- <div class="line"></div>-->
|
||||
<!-- <div class="name">总输入数</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="row">
|
||||
<div class="num">{{ format(statStore.wrong, '', 0) }}</div>
|
||||
<div class="line"></div>
|
||||
<div class="name">总错误数</div>
|
||||
<div class="name">错误数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-2 justify-center items-center" id="toolbar-icons">
|
||||
|
||||
Reference in New Issue
Block a user