12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // import REST from 'vuejs/api/rest-axios'
- // import JSONAPI from 'vuejs/api/json-axios'
- // import qs from 'querystring-es3'
- export default {
- namespaced: true,
- // initial state
- state: {
- pagetitle: null,
- hamburgerMenuToggle: document.querySelector('input#header-block-right-toggle'),
- coolLightBoxItems: null,
- coolLightBoxIndex: null
- },
- // getters
- getters: {},
- // mutations
- mutations: {
- setPagetitle (state, title) {
- console.log('Common, setPagetitle', title)
- state.pagetitle = title
- },
- setHamMenuState (state, s) {
- state.hamburgerMenuToggle.checked = s
- },
- setcoolLightBoxItems (state, items) {
- state.coolLightBoxItems = items
- },
- setcoolLightBoxIndex (state, i) {
- state.coolLightBoxIndex = i
- }
- },
- // actions
- actions: {
- openCloseHamMenu ({ dispatch, commit, state }, s) {
- console.log('openCloseHamMenu', s)
- commit('setHamMenuState', s)
- },
- setcoolLightBoxIndex ({ dispatch, commit, state }, i) {
- console.log('setcoolLightBoxIndex', i)
- commit('setcoolLightBoxIndex', i)
- },
- setcoolLightBoxItems ({ dispatch, commit, state }, items) {
- console.log('setcoolLightBoxItems', items)
- commit('setcoolLightBoxItems', items)
- }
- }
- }
|