Compare commits

..

No commits in common. "231af38a93a034c709dbc27f960dac77ea44347b" and "f35c1ed3d8ff74ade71c932ae8ec777b9490398c" have entirely different histories.

2 changed files with 13 additions and 21 deletions

View File

@ -1,16 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>延庆博物馆</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@ -3,7 +3,7 @@ import { createRouter, createWebHistory } from 'vue-router';
const routes = [
{
path: '/',
redirect: 'home/navigation'
redirect: 'home'
},
{
path: '/home',
@ -14,7 +14,6 @@ const routes = [
{
path: 'navigation',
name: 'navigation',
meta: { title: '首页' },
component: () => import('@/views/navigation/index.vue'),
},
]
@ -118,9 +117,5 @@ const router = createRouter({
history: createWebHistory(),
routes
});
router.beforeEach((to, from) => {
if (to.meta.title) {
document.title = to.meta.title
}
})
export default router;