Vue route hopping

<div id="app">
<router-view></router-view>
<div class="">
 <router-link to="/">1</router-link>
<router-link to="/2">2</router-link>
<router-link to="/3">3</router-link>
<router-link to="/4">4</router-link>
</div>
</div>
//2
<div><router-link></div>

when I click router 1, br 2, 3, 4, the component renders to
, but what I want is that when I click 2, I jump to a new page and don"t want to see Navigation,

.

how should I layout and how should the route jump?

Mar.04,2021

you can write a watch to listen to the route, and hide the navigation when the route information becomes the route information of Route 2, otherwise it will be displayed


if the page is more recommended to make navigation into a nav component, use it when needed, and control the display of hiding in the page and so on.
if there are few pages, you can hide them through status management control.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38f44-2ae9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38f44-2ae9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?