mirror of https://github.com/requarks/wiki
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.
24 lines
449 B
24 lines
449 B
'use strict'
|
|
|
|
export default {
|
|
state: {
|
|
shown: false,
|
|
hash: ''
|
|
},
|
|
getters: {},
|
|
mutations: {
|
|
anchorChange: (state, opts) => {
|
|
state.shown = (opts.shown === true)
|
|
state.hash = opts.hash || ''
|
|
}
|
|
},
|
|
actions: {
|
|
anchorOpen({ commit, dispatch }, hash) {
|
|
commit('anchorChange', { shown: true, hash })
|
|
},
|
|
anchorClose({ commit, dispatch }) {
|
|
commit('anchorChange', { shown: false })
|
|
}
|
|
}
|
|
}
|