comVal.js 340 B

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