plat form saved to store, console.logging on change
This commit is contained in:
parent
9a6514fe17
commit
1e9b248f24
|
@ -1,14 +1,15 @@
|
||||||
import variables from '@/styles/element-variables.scss'
|
import variables from '@/styles/element-variables.scss'
|
||||||
import defaultSettings from '@/settings'
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
|
const { showSettings, tagsView, fixedHeader, sidebarLogo, platform } = defaultSettings
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
theme: variables.theme,
|
theme: variables.theme,
|
||||||
showSettings: showSettings,
|
showSettings: showSettings,
|
||||||
tagsView: tagsView,
|
tagsView: tagsView,
|
||||||
fixedHeader: fixedHeader,
|
fixedHeader: fixedHeader,
|
||||||
sidebarLogo: sidebarLogo
|
sidebarLogo: sidebarLogo,
|
||||||
|
platform: platform
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
|
|
@ -100,7 +100,11 @@ export default {
|
||||||
this.lineChartData = lineChartData[type]
|
this.lineChartData = lineChartData[type]
|
||||||
},
|
},
|
||||||
someHandler() {
|
someHandler() {
|
||||||
console.log(this.platform)
|
this.$store.dispatch('settings/changeSetting', {
|
||||||
|
key: 'platform',
|
||||||
|
value: this.platform
|
||||||
|
})
|
||||||
|
console.log(this.$store.state.settings.platform)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue