mirror of
https://github.com/wangdage12/Snap.Server.Web.git
synced 2026-02-18 02:42:14 +08:00
初始模板
This commit is contained in:
50
src/router/index.ts
Normal file
50
src/router/index.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import DefaultLayout from '@/layouts/DefaultLayout.vue'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
meta: { hidden: true }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: DefaultLayout,
|
||||
redirect: '/dashboard',
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index.vue'),
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
},
|
||||
{
|
||||
path: 'user',
|
||||
component: () => import('@/views/dashboard/index.vue'),
|
||||
meta: { title: '用户管理', icon: 'User' },
|
||||
},
|
||||
{
|
||||
path: 'system',
|
||||
meta: { title: '系统管理', icon: 'Setting' },
|
||||
children: [
|
||||
{
|
||||
path: 'menu',
|
||||
component: () => import('@/views/dashboard/index.vue'),
|
||||
meta: { title: '菜单管理', icon: 'Menu' },
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
component: () => import('@/views/dashboard/index.vue'),
|
||||
meta: { title: '角色管理', icon: 'UserFilled' },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user