Vue routing Jump problem

demand:

footer

my attempt:

mountedfooter
    (: (footer))
    

is currently a project from vue-cli, with vue-router.

solve. (it is hoped that each route jump will determine whether it is a details page, and if so, hide the bottom.)

Apr.07,2021

you can try the beforeRouteEnter hook function in the details component,

beforeRouteEnter(to, from, next) {
     footer 
}
main.jsRouter.beforeEach(to, from, next) {
    to.path footer
    
    next() next
}

<footer v-if="$store.state.blFooter"><footer>

beforeRouteEnter


clipboard.png




index.vue


footer


1:meta isShowBottomTab
clipboard.png


2:beforeEach vuex store

clipboard.png


3footertab computed store isShowBottomTab

clipboard.png


4footer v-show="isShowBottomTab" footer
clipboard.png

Menu