Compare commits
No commits in common. 'f000c0925608acae393d2ee1c2e26f7202d3266a' and 'be7b8641a59d7a3f443a08be164f2e30288faa9c' have entirely different histories.
f000c09256
...
be7b8641a5
7 changed files with 37 additions and 108 deletions
@ -1,18 +1,5 @@ |
||||
const getters = { |
||||
routes: state => state.menu.routes, |
||||
screenWidth: state => state.screen.screenWidth, |
||||
screenPadding: state => { |
||||
let width = state.screen.screenWidth |
||||
if (width >= 600) { |
||||
if (width >= 1000) { |
||||
return {paddingLeft: '15%', paddingRight: '15%'} |
||||
} else { |
||||
return {paddingLeft: '5%', paddingRight: '5%'} |
||||
} |
||||
} else { |
||||
return {} |
||||
} |
||||
} |
||||
routes: state => state.menu.routes |
||||
} |
||||
|
||||
export default getters |
||||
|
@ -1,19 +0,0 @@ |
||||
const state = { |
||||
screenWidth: document.body.clientWidth |
||||
} |
||||
|
||||
const mutations = { |
||||
UPDATE_SCREEN_WIDTH(state, value) { |
||||
state.screenWidth = value |
||||
console.log('run update screen width') |
||||
} |
||||
} |
||||
|
||||
const actions = {} |
||||
|
||||
export default { |
||||
namespaced: true, |
||||
state, |
||||
mutations, |
||||
actions |
||||
} |
Loading…
Reference in new issue