更新代码
This commit is contained in:
14
src/home.vue
14
src/home.vue
@ -6,7 +6,13 @@ import Footer from './views/layout/pc/footer/index.vue'
|
||||
<template>
|
||||
<div id="app">
|
||||
<Header id="header" />
|
||||
<router-view id="main" />
|
||||
|
||||
<!-- include 对应组件的 name -->
|
||||
<router-view id="main" v-slot="{Component}">
|
||||
<keep-alive include="New">
|
||||
<component :is="Component" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
<Footer id="footer" />
|
||||
</div>
|
||||
</template>
|
||||
@ -19,19 +25,19 @@ import Footer from './views/layout/pc/footer/index.vue'
|
||||
flex-direction: column;
|
||||
#header {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
height: $header_nav_height;
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
}
|
||||
#main {
|
||||
margin-top: 100px;
|
||||
margin-top: $header_nav_height;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
background-color: $white;
|
||||
}
|
||||
#footer {
|
||||
width: 100%;
|
||||
height: 681px;
|
||||
height: 500px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user