watch:{ '$route':'isTab' }, methods:{ isTab(){ if(this.$route.path==='/index'||this.$route.path==='/gameHall'||this.$route.path==='/car'||this.$route.path==='/par'){ this.$refs.tabItem.style.display = 'flex'; }else { this.$refs.tabItem.style.display = 'none'; } } }
简单明了