diff --git a/components.d.ts b/components.d.ts index af023807..13211ff4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -54,6 +54,8 @@ declare module 'vue' { TypeWord: typeof import('./src/components/Practice/TypeWord.vue')['default'] VolumeIcon: typeof import('./src/components/VolumeIcon.vue')['default'] VolumeSetting: typeof import('./src/components/Toolbar/VolumeSetting.vue')['default'] + Word: typeof import('./src/components/Word.vue')['default'] + WordItem: typeof import('./src/components/WordItem.vue')['default'] WordList: typeof import('./src/components/WordList.vue')['default'] } } diff --git a/src/components/Practice/Panel.vue b/src/components/Practice/Panel.vue index 9cad161d..c5b82204 100644 --- a/src/components/Practice/Panel.vue +++ b/src/components/Practice/Panel.vue @@ -36,34 +36,23 @@ watch(() => settingStore.showPanel, n => { }) const newWordDictActiveIndex = computed(() => { if (store.current.dictType !== DictType.newDict) return -1 - else { - if (store.current.repeatNumber) { - return store.chapter.findIndex(v => v.name === store.word.name) - } - return store.current.index - } + else return props.index }) const wrongWordDictActiveIndex = computed(() => { if (store.current.dictType !== DictType.wrongDict) return -1 - else { - if (store.current.repeatNumber) { - return store.chapter.findIndex(v => v.name === store.word.name) - } - return store.current.index - } + else return props.index }) const skipWordDictActiveIndex = computed(() => { if (store.current.dictType !== DictType.skipDict) return -1 - else { - if (store.current.repeatNumber) { - return store.chapter.findIndex(v => v.name === store.word.name) - } - return store.current.index - } + else return props.index }) +function changeIndex(i: number) { + +} +