This time I will bring you how to implement vueroutingnested highlighting, what are the things to noteabout implementing vue routing nested highlighting, the following is a practical case, let’s take a look together take a look.
Look at the code: Sub-routing JS:exprot default{ mounted() { this.routerHop(); }, updated() { //当前页再次点击主路由时重新判断跳转 var url = this.$route.path; if (url === "/statistics/dataStatistics") { this.routerHop(); } }, methods: { //权限判断 isPerson() { let user = this.$store.state.user.userInfo; if (user.userType == 1) { return true } return false; }, routerHop(){ // 客户账号登录只显示错误统计分析页面 if(this.isPerson() === false){ return router.push({name: 'statistics1', params: {showPanel: false}}); } router.push({name: 'statistics3', params: {showPanel: false}}); }, } } }
How to implement a custom multi-select event in WeChat applet
When select is not used How to implement the drop-down box function under vue
The above is the detailed content of How to implement nested highlighting of vue routes. For more information, please follow other related articles on the PHP Chinese website!