diff --git a/src/hooks/dict.ts b/src/hooks/dict.ts index e98e3533..efe3df57 100644 --- a/src/hooks/dict.ts +++ b/src/hooks/dict.ts @@ -71,15 +71,15 @@ export function useArticleOptions() { const store = useBaseStore() function isArticleCollect(val: Article) { - return !!store.collect.articles.find(v => v.title.toLowerCase() === val.title.toLowerCase()) + return !!store.collectArticle.find(v => v.title.toLowerCase() === val.title.toLowerCase()) } function toggleArticleCollect(val: Article) { - let rIndex = store.collect.articles.findIndex(v => v.title.toLowerCase() === val.title.toLowerCase()) + let rIndex = store.collectArticle.findIndex(v => v.title.toLowerCase() === val.title.toLowerCase()) if (rIndex > -1) { - store.collect.articles.splice(rIndex, 1) + store.collectArticle.splice(rIndex, 1) } else { - store.collect.articles.push(val) + store.collectArticle.push(val) } } diff --git a/src/pages/pc/components/dialog/DictDiglog.vue b/src/pages/pc/components/dialog/DictDiglog.vue index 8e02c0a0..6e2b36a4 100644 --- a/src/pages/pc/components/dialog/DictDiglog.vue +++ b/src/pages/pc/components/dialog/DictDiglog.vue @@ -15,23 +15,15 @@ import Dialog from "@/pages/pc/components/dialog/Dialog.vue"; import {useRouter} from "vue-router"; const store = useBaseStore() -const settingStore = useSettingStore() const runtimeStore = useRuntimeStore() -let router = useRouter() let show = $ref(false) let chapterWordNumber = $ref(0) -let toggleLoading = $ref(false) - function close() { show = false } -const dictIsArticle = $computed(() => { - return isArticle(runtimeStore.editDict.type) -}) - function showAllWordModal() { emitter.emit(EventKey.openWordListModal, { title: runtimeStore.editDict.name, @@ -52,13 +44,6 @@ function resetChapterList(v: number) { } } -function option(type: string) { - show = false - setTimeout(() => { - router.push({path: '/pc/dict', query: {type: type}}) - }, 500) -} - onMounted(() => { emitter.on(EventKey.openDictModal, (typ) => { show = true @@ -76,7 +61,7 @@ onMounted(() => {