バグ修正など
This commit is contained in:
parent
665afccb45
commit
a8083eb52b
6 changed files with 21 additions and 28 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue