From 853ba384544fb7abb992e0a0fed4d7ed858191db Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 6 Dec 2023 10:07:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++-- src/layouts/default/AppBar.vue | 7 ++++--- src/router/index.ts | 37 +++++++++++++++++----------------- src/views/documents/List.vue | 5 +++++ 4 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 src/views/documents/List.vue diff --git a/src/App.vue b/src/App.vue index 61d0851..ab0007f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@ diff --git a/src/layouts/default/AppBar.vue b/src/layouts/default/AppBar.vue index ed5b39d..33a6064 100644 --- a/src/layouts/default/AppBar.vue +++ b/src/layouts/default/AppBar.vue @@ -16,6 +16,7 @@ @@ -45,9 +46,9 @@ const configStore = useConfigStore(); const drawer = ref(false); const items = [ - { icon: "mdi-contacts", text: "Contacts", to: "/" }, - { icon: "mdi-history", text: "Frequently contacted", to: "/" }, - { icon: "mdi-content-copy", text: "Duplicates", to: "/" }, + { icon: "mdi-home", text: "首页", to: {name: "home"} }, + { icon: "mdi-history", text: "Frequently contacted", to: "/documents" }, + { icon: "mdi-content-copy", text: "login", to: "/auth/login" }, ]; diff --git a/src/router/index.ts b/src/router/index.ts index 8e5d6a1..089b617 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -6,25 +6,24 @@ import { useConfigStore } from "@/store/config"; const routes = [ { path: "/", - component: () => import("@/layouts/default/Default.vue"), - children: [ - { - path: "", - name: "Home", - meta: { - auth: true, - }, - // route level code-splitting - // this generates a separate chunk (Home-[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import("@/views/Home.vue"), - }, - { - path: "auth/login", - name: "Login", - component: () => import("@/views/auth/Login.vue"), - }, - ], + name: "home", + meta: { + auth: true, + }, + // route level code-splitting + // this generates a separate chunk (Home-[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import("@/views/Home.vue"), + }, + { + path: "/auth/login", + name: "login", + component: () => import("@/views/auth/Login.vue"), + }, + { + path: "/documents", + name: "documents", + component: () => import("@/views/documents/List.vue"), }, ]; diff --git a/src/views/documents/List.vue b/src/views/documents/List.vue new file mode 100644 index 0000000..435d3c1 --- /dev/null +++ b/src/views/documents/List.vue @@ -0,0 +1,5 @@ + + +