feat:save
This commit is contained in:
@@ -25,7 +25,7 @@ export function useWordOptions() {
|
||||
}
|
||||
|
||||
function isWordSimple(val: Word) {
|
||||
return !!store.simple.words.find(v => v.word.toLowerCase() === val.word.toLowerCase())
|
||||
return !!store.known.words.find(v => v.word.toLowerCase() === val.word.toLowerCase())
|
||||
}
|
||||
|
||||
function toggleWordSimple(val: Word) {
|
||||
@@ -110,7 +110,7 @@ export function getCurrentStudyWord() {
|
||||
// console.time()
|
||||
const store = useBaseStore()
|
||||
let data = {new: [], review: [], write: []}
|
||||
let dict = store.currentStudyWordDict;
|
||||
let dict = store.sdict;
|
||||
if (dict.words?.length) {
|
||||
for (let i = dict.lastLearnIndex; i < dict.words.length; i++) {
|
||||
if (data.new.length >= dict.perDayStudyNumber) break
|
||||
|
||||
@@ -92,11 +92,9 @@ export function usePlayWordAudio() {
|
||||
const audio = $ref(new Audio())
|
||||
|
||||
function playAudio(word: string) {
|
||||
let url = ''
|
||||
let url = `${PronunciationApi}${word}&type=2`
|
||||
if (settingStore.wordSoundType === 'uk') {
|
||||
url = `${PronunciationApi}${word}&type=1`
|
||||
} else if (settingStore.wordSoundType === 'us') {
|
||||
url = `${PronunciationApi}${word}&type=2`
|
||||
}
|
||||
audio.src = url
|
||||
audio.volume = settingStore.wordSoundVolume / 100
|
||||
|
||||
Reference in New Issue
Block a user