52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
||
|
|
import Layout from '@/layout/index.vue'
|
||
|
|
|
||
|
|
const routes = [
|
||
|
|
{
|
||
|
|
path: '/login',
|
||
|
|
name: 'Login',
|
||
|
|
component: () => import('@/views/login/index.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/',
|
||
|
|
component: Layout,
|
||
|
|
redirect: '/dashboard',
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
path: 'dashboard',
|
||
|
|
name: 'Dashboard',
|
||
|
|
component: () => import('@/views/dashboard/index.vue'),
|
||
|
|
meta: { title: '控制台' }
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'servers',
|
||
|
|
name: 'Servers',
|
||
|
|
component: () => import('@/views/servers/index.vue'),
|
||
|
|
meta: { title: '服务器管理' }
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'scripts',
|
||
|
|
name: 'Scripts',
|
||
|
|
component: () => import('@/views/scripts/index.vue'),
|
||
|
|
meta: { title: '脚本管理' }
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'execute',
|
||
|
|
name: 'Execute',
|
||
|
|
component: () => import('@/views/execute/index.vue'),
|
||
|
|
meta: { title: '批量执行' }
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'users',
|
||
|
|
name: 'Users',
|
||
|
|
component: () => import('@/views/users/index.vue'),
|
||
|
|
meta: { title: '用户管理' }
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
|
||
|
|
export default createRouter({
|
||
|
|
history: createWebHistory(),
|
||
|
|
routes
|
||
|
|
})
|