searchList.js 378 B

12345678910111213141516171819
  1. export const state = () => ({
  2. listData: {
  3. fetching: false,
  4. data: []
  5. }
  6. })
  7. export const mutations = {
  8. REQUEST_SEARCHLIST (state) {
  9. state.listData.fetching = true
  10. },
  11. GET_SEARCHLIST_FAILURE (state) {
  12. state.listData.fetching = false
  13. },
  14. GET_SEARCHLIST_SUCCESS (state, result) {
  15. state.listData.fetching = false
  16. state.listData.data = result
  17. }
  18. }