This commit is contained in:
2025-03-04 11:39:37 +08:00
parent 90c0c9002a
commit ebff70fea3
13 changed files with 47 additions and 60 deletions

View File

@ -1,34 +1,14 @@
<script setup>
import NavBar from "./components/NavBar.vue";
import AppFooter from "./components/AppFooter.vue";
</script>
<template>
<div>
<!-- 全局导航栏 -->
<nav>
<router-link to="/">首页</router-link> |
<router-link to="/about">关于</router-link>
</nav>
<!-- 路由匹配的组件会渲染在这里 -->
<NavBar />
<router-view />
<AppFooter />
</div>
</template>
<style scoped>
/* 全局样式 */
nav {
padding: 10px;
background-color: #f0f0f0;
}
nav a {
margin-right: 10px;
text-decoration: none;
color: #333;
}
nav a.router-link-active {
color: #42b983;
font-weight: bold;
}
</style>
<style scoped></style>