| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import { createRouter, createWebHistory } from 'vue-router'
- const routes: Array<ROUTER.RoutesProps> = [
- {
- path: '/',
- name: '首页',
- title: '首页',
- component: () => import('@/layout/layout.vue'),
- children: [
- {
- path: '/dashboard',
- name: '仪表盘',
- component: () => import('@/pages/Dashboard/index.vue'),
- children: [
- {
- path: '/dashboard-item',
- name: '仪表盘item',
- component: () => import('@/pages/Dashboard/index.vue')
- }
- ]
- }
- ]
- },
- {
- path: '/visual',
- name: '视觉平台',
- title: '视觉平台',
- component: () => import('@/layout/layout.vue'),
- children: [
- {
- path: '/visual-dashboard',
- name: '仪表盘',
- component: () => import('@/pages/Dashboard/index.vue'),
- children: [
- {
- path: '/visual-dashboard-item',
- name: '仪表盘item',
- component: () => import('@/pages/Dashboard/index.vue')
- }
- ]
- }
- ]
- },
- {
- path: '/iot',
- name: '物联网',
- component: () => import('@/layout/layout.vue'),
- redirect: '/iot/dashboard',
- children: [
- {
- path: '/iot/dashboard',
- name: '物联网',
- redirect: '/iot/dashboard-item',
- children: [
- {
- path: '/iot/dashboard-item',
- name: '物联网',
- component: () => import('@/pages/Iot/index.vue')
- }
- ]
- },
- {
- path: '/net/dashboard',
- name: '互联网',
- component: () => import('@/pages/Iot/net.vue')
- }
- ]
- }
- ]
- const router = createRouter({
- history: createWebHistory(process.env.BASE_URL),
- routes
- })
- export default router
|