vue-element-admin Quick Navigation (tab bar navigation)

Quick Navigation (tab bar navigation)

This function is to respond to the needs of everyone, plus the latter, in fact, I am in the company or individual project in the project is unlikely to use this feature. Before those traditional background frame tend to include this feature, since most of the background before projects are multi-page forms, so the tab bar navigation or a certain sense of basic, mostly iframe-based way to achieve.

But with the development of the times, and now almost all of the project's background spa (single page web application developers a single page), and then to implement the tab navigation using the previous scheme clearly inappropriate.

Therefore, the current program is roughly: the use  keep-alive and  router-view combination.

Code: @/layout/components/AppMain.vue

<keep-alive :include="cachedViews"> <router-view></router-view> </keep-alive> 

Top tab bar navigation nav actual acts as another form of show, in fact, that white is one router-link, click to jump to the corresponding page. Then we have to listen to routing  $route changes, to determine whether the need to reload the current page or has been cached

 

http://www.jellytoyboy.cn
http://www.royalemmy.cn
http://www.eminis.cn
http://www.liancans.cn
http://www.chunyus.cn
http://www.joefurai.cn
http://www.ferzige.cn
http://www.miccbeirn.cn
http://www.tangmufangs.cn
http://www.nalthai.cn
http://www.weishas.cn
http://www.lackwars.cn
http://www.eternelle.cn

Guess you like

Origin www.cnblogs.com/zjhcap/p/11372326.html