comVal.js 344 B

1234567891011121314151617181920212223
  1. const state = {
  2. name:666,
  3. isBack:false
  4. }
  5. const actions = {
  6. saveCommonValue({commit},value) {
  7. commit('SAVE_COMMON_VALUE', value);
  8. }
  9. }
  10. const mutations = {
  11. SAVE_COMMON_VALUE(state, obj) {
  12. state[obj.key] = obj.value;
  13. // state.data = data;
  14. },
  15. }
  16. export default {
  17. state,
  18. actions,
  19. mutations
  20. }