2018-06-05 14:43:43 +08:00
|
|
|
export default {
|
|
|
|
|
state: {
|
|
|
|
|
themeName: 'star'
|
|
|
|
|
},
|
|
|
|
|
mutations: {
|
|
|
|
|
// 设置主题
|
|
|
|
|
setTheme (state, themeName) {
|
|
|
|
|
state.themeName = themeName
|
2018-06-11 13:29:06 +08:00
|
|
|
document.body.className = `theme-${state.themeName}`
|
2018-06-05 14:43:43 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|