|
@@ -1,32 +1,77 @@
|
|
|
<template>
|
|
|
- <div id="app">
|
|
|
- <div id="nav">
|
|
|
- <router-link to="/">Home</router-link> |
|
|
|
- <router-link to="/about">About</router-link>
|
|
|
+ <div id="app" @mousemove="mousemove">
|
|
|
+ <nav id="nav" :style="{ height: navHeight + 'px' }">
|
|
|
+ <router-link to="/" class="a">首页</router-link>
|
|
|
+ <router-link to="/monitor" class="a">视频监控</router-link>
|
|
|
+ <router-link to="/biology" class="a">生物防控</router-link>
|
|
|
+ <router-link to="/robot" class="a">机器人巡查</router-link>
|
|
|
+ <router-link to="/environmentalProtection" class="a"
|
|
|
+ >环保监测</router-link
|
|
|
+ >
|
|
|
+ </nav>
|
|
|
+ <header class="header">华腾石湾乡村振兴智能化管理平台</header>
|
|
|
+ <router-view />
|
|
|
</div>
|
|
|
- <router-view/>
|
|
|
- </div>
|
|
|
</template>
|
|
|
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "app",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ navHeight: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ mousemove(e) {
|
|
|
+ if (e.y <= 80) {
|
|
|
+ this.navHeight = 80;
|
|
|
+ } else {
|
|
|
+ this.navHeight = 0;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
<style lang="scss">
|
|
|
#app {
|
|
|
- font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
|
- -webkit-font-smoothing: antialiased;
|
|
|
- -moz-osx-font-smoothing: grayscale;
|
|
|
- text-align: center;
|
|
|
- color: #2c3e50;
|
|
|
-}
|
|
|
-
|
|
|
-#nav {
|
|
|
- padding: 30px;
|
|
|
-
|
|
|
- a {
|
|
|
- font-weight: bold;
|
|
|
- color: #2c3e50;
|
|
|
-
|
|
|
- &.router-link-exact-active {
|
|
|
- color: #42b983;
|
|
|
+ height: 100%;
|
|
|
+ min-width: 1600px;
|
|
|
+ min-height: 800px;
|
|
|
+ background-color: #060A2D;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ #nav {
|
|
|
+ width: 100%;
|
|
|
+ position: fixed;
|
|
|
+ background-color: #0e1e51;
|
|
|
+ color: #eee;
|
|
|
+ transition: height 0.4s;
|
|
|
+ overflow: hidden;
|
|
|
+ line-height: 80px;
|
|
|
+ padding-left: 30px;
|
|
|
+ .a {
|
|
|
+ color: #eee;
|
|
|
+ margin: 0 20px;
|
|
|
+ padding: 12px;
|
|
|
+ background-color: #142b77;
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > .header {
|
|
|
+ // border: 1px solid #8877dd;
|
|
|
+ background: url(./assets/bg_header.png) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ width: 100%;
|
|
|
+ height: 80px;
|
|
|
+ line-height: 50px;
|
|
|
+ // font-size: 1.3vw;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
</style>
|