小伙伴们在使用若依框架的时候经常会遇到一个问题就是你想展示某一个页面的时候不展示侧边栏和顶部导航栏,接下来我就向大家介绍一下我的办法。
效果展示:
直接贴代码!
mounted() {
this.$store.dispatch('app/toggleSideBarHide', true);
document.querySelector('.navbar').style.display = "none";
document.querySelector('.tags-view-container').style.display = "none"
}
只需要在mounted的时候写上这段代码就可以。