fix: 国际化切换动态title

This commit is contained in:
xiaoxian521
2021-04-28 15:07:24 +08:00
parent 2d5a82ddc0
commit 8cb2d896ad
4 changed files with 26 additions and 18 deletions

View File

@@ -1,29 +1,27 @@
import defaultSettings from '../../settings'
import defaultSettings from "../../settings";
const state = {
title: defaultSettings.title,
fixedHeader: defaultSettings.fixedHeader,
sidebarLogo: defaultSettings.sidebarLogo
}
};
const mutations = {
CHANGE_SETTING: (state: any, { key, value }) => {
if (state.hasOwnProperty(key)) {
state[key] = value
state[key] = value;
}
}
}
},
};
const actions = {
changeSetting({ commit }, data) {
commit('CHANGE_SETTING', data)
}
}
commit("CHANGE_SETTING", data);
},
};
export default {
namespaced: true,
state,
mutations,
actions
}
actions,
};