Skip to content

Commit

Permalink
feat: 隐藏部分侧边栏
Browse files Browse the repository at this point in the history
  • Loading branch information
ttop5 committed Dec 10, 2019
1 parent a4b0964 commit e76da71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/layouts/MyLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
typeListObj: {},
typeClass: (localStorage.getItem('slackTypeClass') && localStorage.getItem('slackTypeClass').replace(new RegExp('"', 'g'), '')) || '全部',
typeClassOptions: [],
hideTypeList: JSON.parse(localStorage.getItem('slackHideTabs')) || [],
hideTypeList: JSON.parse(localStorage.getItem('slackHideTabs')) || ['101'],
rightTopMenuList: [
{
href: 'https://github.com/tophubs/to-be-slack',
Expand Down Expand Up @@ -195,7 +195,7 @@ export default {
}
},
showAllType() {
this.$set(this, 'hideTypeList', []);
this.$set(this, 'hideTypeList', ['101']);
},
clickHandler(id) {
localStorage.setItem('slackActiveTab', id);
Expand All @@ -212,6 +212,7 @@ export default {
document.getElementById('left-top').classList.remove('absolute-top');
document.getElementById('left-list').classList.remove('q-mt-xl');
}
this.hideType('101');
},
};
</script>
Expand Down

0 comments on commit e76da71

Please sign in to comment.