feat:搭建登录页面
This commit is contained in:
5
Yi.BBS.Vue3/src/layout/LoginLayout.vue
Normal file
5
Yi.BBS.Vue3/src/layout/LoginLayout.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
登录共同页面
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
@@ -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',
|
||||
|
||||
3
Yi.BBS.Vue3/src/views/Login.vue
Normal file
3
Yi.BBS.Vue3/src/views/Login.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
这个是登录页面
|
||||
</template>
|
||||
Reference in New Issue
Block a user