Skip to content

Commit

Permalink
fix: 修复由不规范引入router的控制台警告
Browse files Browse the repository at this point in the history
  • Loading branch information
simply-none committed Jan 20, 2024
1 parent bd60828 commit f340c36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
3 changes: 0 additions & 3 deletions src/views/todayVocabularyList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,6 @@ function changeWordType(type) {
function backToMainPage() {
router.push({
name: "wordMainPage",
query: {
reload: true,
},
});
}
Expand Down
14 changes: 0 additions & 14 deletions src/views/wordMainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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;
Expand Down Expand Up @@ -203,8 +191,6 @@ function arrowRightGetData(e) {
}
&-body {
// display: flex;
// flex-flow: row nowrap;
height: 100%;
.left,
.right {
Expand Down

0 comments on commit f340c36

Please sign in to comment.