Fix update config store

This commit is contained in:
CzBiX
2019-10-16 18:10:08 +08:00
parent f83300ebdf
commit 96d6033ccf
2 changed files with 20 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ export const configStore : Module<ConfigState, any> = {
updateConfig(state, payload) {
const { key, value } = payload;
if (_.isPlainObject(value)) {
const tmp = _.merge({}, state.userConfig, value);
const tmp = _.merge({}, state.userConfig[key], value);
Vue.set(state.userConfig, key, tmp);
} else {
Vue.set(state.userConfig, key, value);