common.js 751 B

123456789101112131415161718192021222324252627282930313233343536
  1. // import { REST } from 'vuejs/api/rest-axios'
  2. // import { JSONAPI } from 'vuejs/api/json-axios'
  3. // import qs from 'querystring-es3'
  4. export default {
  5. namespaced: true,
  6. // initial state
  7. state: {
  8. pagetitle: null,
  9. hamburgerMenuToggle: document.querySelector('input#header-block-right-toggle')
  10. },
  11. // getters
  12. getters: {},
  13. // mutations
  14. mutations: {
  15. setPagetitle (state, title) {
  16. console.log('Common, setPagetitle', title)
  17. state.pagetitle = title
  18. },
  19. setHamMenuState (state, s) {
  20. state.hamburgerMenuToggle.checked = s
  21. }
  22. },
  23. // actions
  24. actions: {
  25. openCloseHamMenu ({ dispatch, commit, state }, s) {
  26. console.log('openCloseHamMenu', s)
  27. commit('setHamMenuState', s)
  28. }
  29. }
  30. }