Home > Web Front-end > JS Tutorial > body text

How to deal with the sub-routes not being displayed in the bottom navigation bar of vue.js

php中世界最好的语言
Release: 2018-04-11 14:57:17
Original
2238 people have browsed it

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

Navigation

column. 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' },
 ],
});
Copy after login
app.vue

<Bar v-show="$route.meta.navShow">
Copy after login
This is the solution I found, and then I modified my code based on this and solved it successfully. I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!