12345678910111213141516171819202122232425 |
- import PersistedState from '../PersistedState'
- // search.js
- // initial state
- const state = {
- currentKey: PersistedState.getStorage('homesearch','currentKey', ''),
- currenKeywords: PersistedState.getStorage('homesearch','currenKeywords', []),
- }
- // mutations
- const mutations = {
- //
- changeKey (state, value) {
- state.currentKey = value
- PersistedState.setStorage('homesearch',state)
- },
- saveKeywords(state, value){
- state.currenKeywords = value
- PersistedState.setStorage('homesearch',state)
- }
- }
- export default {
- state,
- mutations
- }
|