save
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
|
||||
import BasePage from "@/pages/pc/components/BasePage.vue";
|
||||
import WordDictDetail from "@/pages/pc/dict/components/WordDictDetail.vue";
|
||||
import {onMounted} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const route = useRoute()
|
||||
onMounted(() => {
|
||||
console.log('r', route.query.type)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -25,15 +25,15 @@ function clickEvent(e) {
|
||||
我的词典
|
||||
</div>
|
||||
<div class="grid flex-1 flex gap-5 mt-4">
|
||||
<div class="my-dict" @click="nav('edit-word-dict')">
|
||||
<div class="my-dict" @click="nav('edit-word-dict',{type:0})">
|
||||
<span>收藏</span>
|
||||
<div class="absolute bottom-4 right-4">{{ base.collectWord.length }}个词</div>
|
||||
</div>
|
||||
<div class="my-dict">
|
||||
<div class="my-dict" @click="nav('edit-word-dict',{type:1})">
|
||||
<span>生词本</span>
|
||||
<div class="absolute bottom-4 right-4">{{ base.wrong2.length }}个词</div>
|
||||
</div>
|
||||
<div class="my-dict">
|
||||
<div class="my-dict" @click="nav('edit-word-dict',{type:2})">
|
||||
<span>简单词</span>
|
||||
<div class="absolute bottom-4 right-4">{{ base.simple2.length }}个词</div>
|
||||
</div>
|
||||
|
||||
@@ -191,8 +191,11 @@ export function getDictFile(url: string) {
|
||||
export function useNav() {
|
||||
const router = useRouter()
|
||||
|
||||
function nav(val) {
|
||||
router.push(val)
|
||||
function nav(path, query = {}, data?: any) {
|
||||
// if (data) {
|
||||
// store.routeData = cloneDeep(data)
|
||||
// }
|
||||
router.push({path, query})
|
||||
}
|
||||
|
||||
return {nav, back: router.back}
|
||||
|
||||
Reference in New Issue
Block a user