mardi 6 juillet 2021

V-if statement only for one line/link

I try to hide a link("myprofile") below a picture, when the if-statement isn't "right", in VUE.JS. But when I set the v-if into the vue-router or div tag, the whole picture/div-tag is hidden. How can I set a if-statement, which only concerns the link?

The Code:

            <router-link v-if="condition == true" class="nav-link" to="/myprofile">
              <div
                class="img"
                :style="{
                  'background-image': "url"
                }"
              />
            </router-link>

Aucun commentaire:

Enregistrer un commentaire