fix: when practicing the article, use the original letters
This commit is contained in:
@@ -143,10 +143,11 @@ function setArticle(val: Article) {
|
||||
articleData.sentenceIndex = 0
|
||||
articleData.wordIndex = 0
|
||||
articleData.stringIndex = 0
|
||||
let ignoreList = [store.allIgnoreWords, store.knownWords][settingStore.ignoreSimpleWord ? 0 : 1]
|
||||
articleData.article.sections.map((v, i) => {
|
||||
v.map((w, j) => {
|
||||
w.words.map(s => {
|
||||
if (!store.allIgnoreWords.includes(s.word.toLowerCase()) && !s.isSymbol) {
|
||||
if (!ignoreList.includes(s.word.toLowerCase()) && !s.isSymbol) {
|
||||
statisticsStore.total++
|
||||
}
|
||||
})
|
||||
|
||||
@@ -231,7 +231,8 @@ function onTyping(e: KeyboardEvent) {
|
||||
isRight = key === letter
|
||||
}
|
||||
if (isRight) {
|
||||
input += letter
|
||||
//这里使用原文的字母,不使用用户输入的,因为原文是大写时,用户输入的小写,会导致布局重绘
|
||||
input += key
|
||||
wrong = ''
|
||||
// console.log('匹配上了')
|
||||
stringIndex++
|
||||
|
||||
@@ -298,7 +298,7 @@ function importOldData() {
|
||||
|
||||
<div class="line"></div>
|
||||
<SettingItem title="简单词过滤"
|
||||
desc="开启后,练习的单词中不会再出现简单词"
|
||||
desc="开启后,练习单词中不会包含简单词;文章统计的总词数中不会包含简单词"
|
||||
>
|
||||
<Switch v-model="settingStore.ignoreSimpleWord"/>
|
||||
</SettingItem>
|
||||
|
||||
Reference in New Issue
Block a user