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 defaultSettings from '@/settings'
|
||||
|
||||
const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
|
||||
const { showSettings, tagsView, fixedHeader, sidebarLogo, platform } = defaultSettings
|
||||
|
||||
const state = {
|
||||
theme: variables.theme,
|
||||
showSettings: showSettings,
|
||||
tagsView: tagsView,
|
||||
fixedHeader: fixedHeader,
|
||||
sidebarLogo: sidebarLogo
|
||||
sidebarLogo: sidebarLogo,
|
||||
platform: platform
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
|
|
@ -100,7 +100,11 @@ export default {
|
|||
this.lineChartData = lineChartData[type]
|
||||
},
|
||||
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