root.js 621 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // initial state
  2. const state = {
  3. config: {},
  4. settings: {
  5. limit: 50,
  6. expanded: [],
  7. expandedSeries: [],
  8. showCounts: true,
  9. showDeleted: false,
  10. abCacheEnabled: true,
  11. langDefault: '',
  12. },
  13. };
  14. // getters
  15. const getters = {};
  16. // actions
  17. const actions = {};
  18. // mutations
  19. const mutations = {
  20. setConfig(state, value) {
  21. state.config = value;
  22. },
  23. setSettings(state, value) {
  24. state.settings = Object.assign({}, state.settings, value);
  25. },
  26. };
  27. export default {
  28. namespaced: true,
  29. state,
  30. getters,
  31. actions,
  32. mutations
  33. };