save
This commit is contained in:
@@ -82,7 +82,7 @@ function scrollToBottom() {
|
||||
}
|
||||
|
||||
function scrollToItem(index: number) {
|
||||
listRef.scrollToItem(index)
|
||||
nextTick(() => listRef.scrollToItem(index))
|
||||
}
|
||||
|
||||
defineExpose({scrollToBottom, scrollToItem})
|
||||
|
||||
@@ -157,8 +157,17 @@ let residueWordListCheckedTotal = $computed(() => {
|
||||
function handleChangeCurrentChapter(val: {
|
||||
index: number
|
||||
}) {
|
||||
chapterWordList.map(v => v.checked = false)
|
||||
chapterIndex = val.index
|
||||
chapterWordList.map(v => {
|
||||
v.checked = false
|
||||
//TODO 可能会存在卡的问题
|
||||
if (!v.trans.length && runtimeStore.translateWordList.length) {
|
||||
let res = runtimeStore.translateWordList.find(a => a.name === v.name)
|
||||
if (res) v = Object.assign(v, res)
|
||||
}
|
||||
})
|
||||
|
||||
chapterWordListRef?.scrollToItem(0)
|
||||
closeWordForm()
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {MessageBox} from "@/utils/MessageBox.tsx";
|
||||
import PracticeArticle from "@/pages/practice/practice-article/index.vue";
|
||||
import PracticeWord from "@/pages/practice/practice-word/index.vue";
|
||||
import {ShortcutKey} from "@/types.ts";
|
||||
import useTheme from "@/hooks/useTheme.ts";
|
||||
import useTheme from "@/hooks/theme.ts";
|
||||
import SettingDialog from "@/components/dialog/SettingDialog.vue";
|
||||
import DictModal from "@/components/dialog/DictDiglog.vue";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user