diff --git a/src/components/Article/ArticleList.vue b/src/components/Article/ArticleList.vue index 0c64c724..bab984d0 100644 --- a/src/components/Article/ArticleList.vue +++ b/src/components/Article/ArticleList.vue @@ -13,7 +13,7 @@ interface IProps { const props = defineProps() const emit = defineEmits<{ - selectItem: [index: Article], + selectItem: [val: Article], delSelectItem: [], 'update:searchKey': [val: string], 'update:list': [list: Article[]], diff --git a/src/components/Practice/Panel.vue b/src/components/Practice/Panel.vue index 20672651..a308cfb7 100644 --- a/src/components/Practice/Panel.vue +++ b/src/components/Practice/Panel.vue @@ -36,7 +36,10 @@ watch(() => settingStore.showPanel, n => { let practiceType = $ref(DictType.word) function changeIndex(i: number, dict: Dict) { - store.changeDict(dict, dict.chapterIndex, i,practiceType) + store.changeDict(dict, dict.chapterIndex, i, practiceType) + setTimeout(() => { + tabIndex = 0 + }) } @@ -70,7 +73,10 @@ function changeIndex(i: number, dict: Dict) { 单词 文章 -
{{ store.collect.words.length }}个单词
+
{{ + store.collect.words.length + }}个单词 +
{{ store.collect.articles.length }}篇文章
@@ -309,7 +311,7 @@ $article-width: 50vw; left: 0; top: 10rem; z-index: 1; - margin-left: calc(50% + ($article-width / 2) + $space); + margin-left: calc(50% + (var(--toolbar-width) / 2) + $space); height: calc(100% - 20rem); } diff --git a/src/stores/base.ts b/src/stores/base.ts index 40fbadb9..eb32a03c 100644 --- a/src/stores/base.ts +++ b/src/stores/base.ts @@ -194,10 +194,10 @@ export const useBaseStore = defineStore('base', { } ], current: { - dictType: DictType.word, - index: 1, - // dictType: DictType.article, - // index: 0, + // dictType: DictType.word, + // index: 1, + dictType: DictType.article, + index: 0, practiceType: DictType.word, }, simpleWords: [