From a73920f4c38b987862cc0f36717343704430fa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Wed, 15 Mar 2023 13:53:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=90=AD=E5=BB=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.BBS.Vue3/src/layout/LoginLayout.vue | 5 +++++ Yi.BBS.Vue3/src/router/index.js | 20 ++++++++++++++++++++ Yi.BBS.Vue3/src/views/Login.vue | 3 +++ 3 files changed, 28 insertions(+) create mode 100644 Yi.BBS.Vue3/src/layout/LoginLayout.vue create mode 100644 Yi.BBS.Vue3/src/views/Login.vue diff --git a/Yi.BBS.Vue3/src/layout/LoginLayout.vue b/Yi.BBS.Vue3/src/layout/LoginLayout.vue new file mode 100644 index 00000000..aeaf0880 --- /dev/null +++ b/Yi.BBS.Vue3/src/layout/LoginLayout.vue @@ -0,0 +1,5 @@ + + diff --git a/Yi.BBS.Vue3/src/router/index.js b/Yi.BBS.Vue3/src/router/index.js index 83a35572..ed19de08 100644 --- a/Yi.BBS.Vue3/src/router/index.js +++ b/Yi.BBS.Vue3/src/router/index.js @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router' import Layout from '../layout/Index.vue' import NotFound from '../views/NotFound.vue' +import LoginLayout from '../layout/LoginLayout.vue' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), scrollBehavior(to, from, savedPosition) { @@ -8,6 +9,25 @@ const router = createRouter({ return { top: 0 } }, routes: [ +{ + path: '/loginLayout', + name: 'loginLayout', + component: LoginLayout, + redirect: '/login' , + children :[ + { + name:'login', + path: '/login', + component: () => import('../views/Login.vue') + }, + // { + // name:'register', + // path: '/register', + // component: () => import('../views/Register.vue') + // }, + ] + }, + { path: '/', name: 'layout', diff --git a/Yi.BBS.Vue3/src/views/Login.vue b/Yi.BBS.Vue3/src/views/Login.vue new file mode 100644 index 00000000..6925ad0e --- /dev/null +++ b/Yi.BBS.Vue3/src/views/Login.vue @@ -0,0 +1,3 @@ + \ No newline at end of file