バグ修正など

This commit is contained in:
syuilo
2018-04-29 17:54:50 +09:00
parent 665afccb45
commit a8083eb52b
6 changed files with 21 additions and 28 deletions

View File

@ -41,10 +41,6 @@ export default (os: MiOS) => new Vuex.Store({
},
mutations: {
init(state, settings) {
state.data = settings;
},
set(state, x: { key: string; value: any }) {
state.data[x.key] = x.value;
},
@ -66,6 +62,12 @@ export default (os: MiOS) => new Vuex.Store({
},
actions: {
merge(ctx, settings) {
Object.entries(settings).forEach(([key, value]) => {
ctx.commit('set', { key, value });
});
},
set(ctx, x) {
ctx.commit('set', x);