本地告警页面V0
This commit is contained in:
58
src/router/index.ts
Normal file
58
src/router/index.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
// 第一步,引入createRouter
|
||||
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import Layout from '@/components/Layout.vue';
|
||||
import AlertChart from '@/components/AlertChart.vue';
|
||||
import Statistics from '@/components/Statistics.vue';
|
||||
import AlertManagement from '@/html/AlertManagement.vue';
|
||||
import Test from '@/html/Test.vue';
|
||||
// import Login from '@/html/LoginView.vue';
|
||||
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Layout',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AlertManagement',
|
||||
component: AlertManagement,
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
name: 'Test',
|
||||
component: Test,
|
||||
},
|
||||
{
|
||||
path: '/alertChart',
|
||||
name: 'AlertChart',
|
||||
component: AlertChart,
|
||||
},
|
||||
{
|
||||
path: '/statistics',
|
||||
name: 'Statistics',
|
||||
component: Statistics,
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// path: '/login',
|
||||
// name: 'Login',
|
||||
// component: Login,
|
||||
// meta: { requiresAuth: false }
|
||||
// },
|
||||
|
||||
]
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user