| | |
| | | const state = { |
| | | sidebar: { |
| | | opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, |
| | | withoutAnimation: false |
| | | withoutAnimation: false, |
| | | hide: false |
| | | }, |
| | | device: 'desktop', |
| | | size: Cookies.get('size') || 'medium' |
| | |
| | | SET_SIZE: (state, size) => { |
| | | state.size = size |
| | | Cookies.set('size', size) |
| | | }, |
| | | SET_SIDEBAR_HIDE: (state, status) => { |
| | | state.sidebar.hide = status |
| | | } |
| | | } |
| | | |
| | |
| | | }, |
| | | setSize({ commit }, size) { |
| | | commit('SET_SIZE', size) |
| | | }, |
| | | toggleSideBarHide({ commit }, status) { |
| | | commit('SET_SIDEBAR_HIDE', status) |
| | | } |
| | | } |
| | | |