feat:搭建登录页面

This commit is contained in:
陈淳
2023-03-15 13:53:34 +08:00
parent 543d54f844
commit a73920f4c3
3 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<template>
登录共同页面
<RouterView />
</template>

View File

@@ -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',

View File

@@ -0,0 +1,3 @@
<template>
这个是登录页面
</template>