Skip to content

Instantly share code, notes, and snippets.

@andrewpedia
Created August 14, 2020 02:37
Show Gist options
  • Save andrewpedia/d937a36f9cf3514a290e8dc3ca0d81eb to your computer and use it in GitHub Desktop.
Save andrewpedia/d937a36f9cf3514a290e8dc3ca0d81eb to your computer and use it in GitHub Desktop.
computed: {
...mapState({
sidebar: state => state.app.sidebar,
device: state => state.app.device,
showSettings: state => state.settings.showSettings,
needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader
}),
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment