Vue v-if / v-show

my header,content,footer is a common component
this picture is added to the common component.

the desired effect is
clipboard.png
when I click on the processing center, 1. Route jump 2. After the jump, a picture appears (/ home path name)
when I click on my workbench, 1. Route jump 2. The picture disappears after the jump (/ home2 path name)

my idea is to get the current path, and if the current path corresponds to / home, then I"ll let the picture display,

< div class= "banner" vmurifs = "" >

    <img src="../assets/banner.png" alt="">

< / div >

after thinking about it for a long time, I don"t know what to do. I would like to ask the boss for advice. Thank you.

May.24,2021

first of all, there is a question about where your picture is and whether it is in a shared position.
because when we use route switching, it usually corresponds to a component,. If your image is placed in component, there is no need to judge.
if it is placed globally, then judge $route.path='/home'


< div class= "banner" VMI if = "$route.path='/home'" > < / div >

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-1e592a4-45512.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-1e592a4-45512.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?