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 >

Menu