in app.vue
<div id="nav" v-show="$route.meta.istrun">
Then in index.js in the router folder
// 4. Configure routing and component mapping relationship
let routes = [//Create a Vue Router instance and complete the route mapping configuration
{
path: "/",
redirect: '/home'
},
{
path: '/home',
component: Home,
meta:{
istrun:true
}, judge, if necessary, it is true
},
{
path: '/about',
component: About,
meta:{
istrun:true
},
},
{
path: '/dingdan',
component: Dingdan, if you don’t need it, don’t fill it in, it’s not there by default
},