From f340c369a06e3441e6147046fbd1b40f40ba9bed Mon Sep 17 00:00:00 2001 From: jousindea Date: Sat, 20 Jan 2024 14:43:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=B1=E4=B8=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=BC=95=E5=85=A5router=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8F=B0=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/todayVocabularyList.vue | 3 --- src/views/wordMainPage.vue | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/src/views/todayVocabularyList.vue b/src/views/todayVocabularyList.vue index dc05381..0f0ebcb 100644 --- a/src/views/todayVocabularyList.vue +++ b/src/views/todayVocabularyList.vue @@ -307,9 +307,6 @@ function changeWordType(type) { function backToMainPage() { router.push({ name: "wordMainPage", - query: { - reload: true, - }, }); } diff --git a/src/views/wordMainPage.vue b/src/views/wordMainPage.vue index 1c47c68..8d66189 100644 --- a/src/views/wordMainPage.vue +++ b/src/views/wordMainPage.vue @@ -72,11 +72,9 @@ import { useBookStore } from "../stores/books"; import { storeToRefs } from "pinia"; import { setNotify } from "../utils/element-plus"; import { isPC } from "../utils/common"; -import { useRouter } from "vue-router"; // mounted函数必须在异步调用之前,不然不生效 onMounted(() => { - console.log(new Date()); window.addEventListener("keyup", arrowRightGetData); }); @@ -100,16 +98,6 @@ let { getSearchText, } = useVoca(); -let router = useRouter(); - -if ( - router && - router.currentRoute.value.query && - router.currentRoute.value.query.reload -) { - location.href = "./"; -} - function OpenSetting() { drawer.value = true; bookItemBeforeSearch.value = null; @@ -203,8 +191,6 @@ function arrowRightGetData(e) { } &-body { - // display: flex; - // flex-flow: row nowrap; height: 100%; .left, .right {