App.vue
<template>
<div id="app">
<keep-alive>
<router-view v-if="$route.meta.keepAlive" :key="$route.fullPath"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :key="$route.fullPath"></router-view>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
body {
margin: 0;
padding: 0;
min-height: 100vh;
background: #fff;
}
* {
margin: 0;
padding: 0;
}
</style>
本文标题:App.vue
本文链接:https://www.haomeiwen.com/subject/suofxktx.html
网友评论