| | |
| | | import { createRouter, createWebHashHistory } from 'vue-router' |
| | | import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router' |
| | | import Layout from '@/layout/layout.vue' |
| | | const Home = () => import('@/views/home.vue') |
| | | const Login = () => import('@/views/login.vue') |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHashHistory(import.meta.env.BASE_URL), |
| | | history: createWebHistory(import.meta.env.BASE_URL), |
| | | routes: [ |
| | | { |
| | | path: '/', |
| | |
| | | name: 'home', |
| | | meta: { auth: true }, |
| | | component: Home |
| | | }, |
| | | { |
| | | path: '/dictionary', |
| | | name: 'dictionary', |
| | | meta: { auth: true }, |
| | | component: () =>import('@/views/components/dictionary.vue') |
| | | } |
| | | ] |
| | | } |
| | | |
| | | ] |
| | | }) |
| | | |