2019-11-25 18:40:27 +00:00
|
|
|
import { SET_WIDGET_COLOR } from '../types';
|
|
|
|
|
|
|
|
const state = {
|
|
|
|
widgetColor: '',
|
|
|
|
};
|
|
|
|
|
|
|
|
const getters = {
|
|
|
|
getWidgetColor: $state => $state.widgetColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
const actions = {
|
|
|
|
setWidgetColor({ commit }, data) {
|
|
|
|
commit(SET_WIDGET_COLOR, data);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const mutations = {
|
|
|
|
[SET_WIDGET_COLOR]($state, data) {
|
2020-04-19 18:10:28 +00:00
|
|
|
$state.widgetColor = data.widgetColor;
|
2019-11-25 18:40:27 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
|
|
|
state,
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations,
|
|
|
|
};
|