This time I will bring you how to deal with the sub-routes of the Navigationbar at the bottom of vue.js that are not displayed. How to deal with the sub-routes of the navigation bar at the bottom of vue.js that are not displayed. NotesWhat are the following? Let’s take a look at the actual cases. Recently using vue third-party UI MuseUI develops a webapp, and then a problem occurs in the
Navigationcolumn. I need to display the bottom navigation bar on several routes on the navigation bar, but not on other routes. That's it. The problem is that the bottom navigation bar of MuseUI is loaded directly into app.vue, and every page will have a navigation bar, so this method is not feasible. Later, I really tried my best to go to MuseUI authorGit## I asked questions on #Hub, but no results. I went to segmentfault to ask questions, but no results. I went to vue official group to ask questions, but no results. Before asking questions, I went through some search and thought about it, but all of this made me think. I broke down. Possible things that could go wrong range from routing URLs, museUI usage bugs, to adding hooks function, all of which were expected, but none of them are, it doesn’t matter, persistence is victory, maybe my efforts moved God and I found a solution . router.js
const router = new VueRouter({ mode: 'history', routes: [ { path: '/first', component: firstView, meta: { navShow: true, cname: '一级页面' }, name: 'first' }, { path: '/sub', component: subView, meta: { navShow: false, cname: '子页面' }, name: 'sub' }, ], });
<Bar v-show="$route.meta.navShow">
How to extend string concatenation in JS
How to download Nginx configuration file in sections
The above is the detailed content of How to deal with the sub-routes not being displayed in the bottom navigation bar of vue.js. For more information, please follow other related articles on the PHP Chinese website!