litian
2024-05-11 576fbe7418510c9f442fe93100db93445fcf3964
src/router/index.ts
@@ -1,10 +1,10 @@
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: '/',
@@ -24,10 +24,15 @@
          name: 'home',
          meta: { auth: true },
          component: Home
        },
        {
          path: '/dictionary',
          name: 'dictionary',
          meta: { auth: true },
          component: () =>import('@/views/components/dictionary.vue')
        }
      ]
    }
  ]
})