deepchart后台管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
578 B

2 months ago
  1. import defaultSettings from '@/settings'
  2. const { showSettings, fixedHeader, sidebarLogo } = defaultSettings
  3. const state = {
  4. showSettings: showSettings,
  5. fixedHeader: fixedHeader,
  6. sidebarLogo: sidebarLogo
  7. }
  8. const mutations = {
  9. CHANGE_SETTING: (state, { key, value }) => {
  10. // eslint-disable-next-line no-prototype-builtins
  11. if (state.hasOwnProperty(key)) {
  12. state[key] = value
  13. }
  14. }
  15. }
  16. const actions = {
  17. changeSetting({ commit }, data) {
  18. commit('CHANGE_SETTING', data)
  19. }
  20. }
  21. export default {
  22. namespaced: true,
  23. state,
  24. mutations,
  25. actions
  26. }