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.

25 lines
467 B

  1. 'use strict'
  2. export default {
  3. namespaced: true,
  4. state: {
  5. shown: false,
  6. hash: ''
  7. },
  8. getters: {},
  9. mutations: {
  10. anchorChange: (state, opts) => {
  11. state.shown = (opts.shown === true)
  12. state.hash = opts.hash || ''
  13. }
  14. },
  15. actions: {
  16. open({ commit }, hash) {
  17. console.info('MIGUEL!')
  18. commit('anchorChange', { shown: true, hash })
  19. },
  20. close({ commit }) {
  21. commit('anchorChange', { shown: false })
  22. }
  23. }
  24. }