12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // import {createRouter, createWebHistory} from '@ionic/vue-router';
- import { createRouter, createWebHistory } from 'vue-router';
- import layout from '@/layout/index.vue'
- const routes = [
- {
- path: '/',
- redirect: '/home',
- component: layout,
- children: [
- {
- path: 'home',
- name: 'home',
- component: () => import('@/views/HomeView.vue'),
- },
- {
- path: 'map',
- name: 'map',
- component: () => import('@/views/Map/index.vue'),
- },
- {
- path: 'inspect',
- name: 'inspect',
- component: () => import('@/views/Inspect/index.vue'),
- },
- {
- path: 'question',
- name: 'question',
- component: () => import('@/views/Question/index.vue'),
- },
- {
- path: 'about',
- name: 'about',
- component: () => import('@/views/AboutView.vue'),
- meta: { title: '我的' }
- },
- ],
- },
- ];
- const router = createRouter({
- history: createWebHistory(process.env.BASE_URL),
- routes,
- });
- export default router;
|