plat form saved to store, console.logging on change

This commit is contained in:
Chad Derya 2019-09-03 10:16:08 +01:00
parent 9a6514fe17
commit 1e9b248f24
2 changed files with 8 additions and 3 deletions

View File

@ -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 = {

View File

@ -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)
}
}
}