增加主页
This commit is contained in:
51
src/App.vue
51
src/App.vue
@@ -1,20 +1,6 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<header class="header">
|
||||
<h1>猪场管理系统</h1>
|
||||
<nav class="navigation">
|
||||
<el-menu mode="horizontal" :router="true">
|
||||
<el-menu-item index="/">首页</el-menu-item>
|
||||
<el-menu-item index="/devices">设备管理</el-menu-item>
|
||||
</el-menu>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="main-content">
|
||||
<router-view />
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<p>© 2025 猪场管理系统. All rights reserved.</p>
|
||||
</footer>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -24,35 +10,8 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.header {
|
||||
background-color: #409EFF;
|
||||
color: white;
|
||||
padding: 1rem;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,.1);
|
||||
<style>
|
||||
#app {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.navigation {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
max-width: 1200px;
|
||||
margin: 2rem auto;
|
||||
padding: 0 1rem;
|
||||
min-height: calc(100vh - 100px);
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
background-color: #f5f5f5;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user