1
0

cart.js 774 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const state = {
  2. reportAndError: {
  3. boolean: false,
  4. content: '网络开了会儿小差, 请刷新重试下哦~',
  5. },
  6. is_edit: false
  7. };
  8. const getters = {
  9. reportAndErrorObj(state) {
  10. return state.reportAndError;
  11. },
  12. is_edit(state) {
  13. return state.is_edit;
  14. },
  15. };
  16. const mutations = {
  17. reportAndErrorObj(state, data) {
  18. state.reportAndError = data;
  19. },
  20. is_edit(state, data) {
  21. state.is_edit = data;
  22. },
  23. };
  24. const actions = {
  25. reportAndErrorObj(content, data) {
  26. content.commit('reportAndErrorObj', data);
  27. },
  28. is_edit(content, data) {
  29. content.commit('is_edit', data);
  30. }
  31. };
  32. export default {
  33. namespaced:true,
  34. state,
  35. getters,
  36. mutations,
  37. actions,
  38. }