lists.js 567 B

1234567891011121314151617181920212223
  1. const listsStore = {
  2. state: {
  3. searchVal: '',
  4. keyword:''
  5. },
  6. mutations: {
  7. setSearchVal: (state, searchVal) => {
  8. state.searchVal = searchVal
  9. },
  10. setKeyword: (state, keyword) => {
  11. state.keyword = keyword
  12. },
  13. },
  14. actions: {
  15. saveSearchVal: ({ commit, state }, searchVal) => {
  16. commit('setSearchVal', searchVal)
  17. },
  18. saveKeyword: ({ commit, state }, keyword) => {
  19. commit('setKeyword', keyword)
  20. },
  21. }
  22. }
  23. export default listsStore;