Merge branch 'master' of https://github.com/Junlanok/TypeWords
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 96 KiB |
@@ -62,7 +62,9 @@ async function init() {
|
||||
store.load = true
|
||||
setTheme(settingStore.theme)
|
||||
|
||||
if (!settingStore.first) {
|
||||
if (settingStore.first) {
|
||||
set(APP_VERSION.key,APP_VERSION.version)
|
||||
}else {
|
||||
get(APP_VERSION.key).then(r => {
|
||||
runtimeStore.isNew = r ? (APP_VERSION.version > Number(r)) : true
|
||||
})
|
||||
|
||||
@@ -245,6 +245,7 @@ function nextSentence() {
|
||||
}
|
||||
|
||||
function onTyping(e: KeyboardEvent) {
|
||||
debugger
|
||||
if (!props.article.sections.length) return
|
||||
if (isTyping || isEnd) return;
|
||||
isTyping = true;
|
||||
@@ -277,12 +278,16 @@ function onTyping(e: KeyboardEvent) {
|
||||
if (e.code === 'Space') {
|
||||
next()
|
||||
} else {
|
||||
wrong = ' '
|
||||
playBeep()
|
||||
setTimeout(() => {
|
||||
wrong = ''
|
||||
wrong = input = ''
|
||||
}, 500)
|
||||
// 如果在第一个单词的最后一位上, 不按空格的直接输入下一个字母的话
|
||||
next()
|
||||
isTyping = false
|
||||
onTyping(e)
|
||||
// wrong = ' '
|
||||
// playBeep()
|
||||
// setTimeout(() => {
|
||||
// wrong = ''
|
||||
// wrong = input = ''
|
||||
// }, 500)
|
||||
}
|
||||
} else {
|
||||
//如果是首句首词
|
||||
|
||||
@@ -555,7 +555,7 @@ function importOldData() {
|
||||
<div class="line"></div>
|
||||
<SettingItem mainTitle="自动切换"/>
|
||||
<SettingItem title="自动切换下一个单词"
|
||||
desc="未开启自动切换时,当输入完成后请使用 **空格键** 切换下一个"
|
||||
desc="仅在 **跟写** 时生效,听写、辨认、默写均不会自动切换,需要手动按 **空格键** 切换"
|
||||
>
|
||||
<Switch v-model="settingStore.autoNextWord"/>
|
||||
</SettingItem>
|
||||
@@ -684,6 +684,22 @@ function importOldData() {
|
||||
</div>
|
||||
|
||||
<div v-if="tabIndex === 5">
|
||||
<div class="log-item">
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
<div>更新日期:2025/11/14</div>
|
||||
<div>更新内容:新增文章练习时可跳过空格:如果在单词的最后一位上,不按空格直接输入下一个字母的话,自动跳下一个单词, 按空格也自动跳下一个单词</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-item">
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
<div>更新日期:2025/11/13</div>
|
||||
<div>更新内容:新增文章练习时“输入时忽略符号/数字”选项</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-item">
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
|
||||
@@ -86,6 +86,8 @@ function startPractice() {
|
||||
complete: store.sdict.complete,
|
||||
wordPracticeMode: settingStore.wordPracticeMode
|
||||
})
|
||||
//把是否是第一次设置为false
|
||||
settingStore.first = false
|
||||
nav('practice-words/' + store.sdict.id, {}, {taskWords: currentStudy})
|
||||
} else {
|
||||
window.umami?.track('no-dict')
|
||||
|
||||
@@ -116,14 +116,8 @@ export const useSettingStore = defineStore("setting", {
|
||||
this.$patch(obj)
|
||||
},
|
||||
init() {
|
||||
return new Promise(async (resolve) => {
|
||||
//TODO 后面记得删除了
|
||||
let configStr = localStorage.getItem(SAVE_SETTING_KEY.key)
|
||||
let configStr2 = await get(SAVE_SETTING_KEY.key)
|
||||
if (configStr2) {
|
||||
//兼容localStorage.getItem
|
||||
configStr = configStr2
|
||||
}
|
||||
return new Promise(async resolve => {
|
||||
let configStr = await get(SAVE_SETTING_KEY.key)
|
||||
let data = checkAndUpgradeSaveSetting(configStr)
|
||||
if (CAN_REQUEST) {
|
||||
let res = await getSetting()
|
||||
|
||||
Reference in New Issue
Block a user