How to call mutations defined in modules by vuex,

The

status can be obtained and has been tinkering with for a long time. Do not know how to call mutations, getters and actions defined in the module?

    const mA = {
      state : {
        a : 1,
        b : 1,
      },
      //  mutations
      mutations : {
        add : state =>{
          state.aPP
        },
      },
      getters : {
        double : state=> {
          return state.a *2
        }
      }
    }
    const mB = {
      state : {
        a : 2,
        b : 2,
      },
      //  mutations
      mutations: {
        addB: state => {
          state.aPP
        },
      },
      //  actions
      actions : {
        asyncAdd : ({commit, rootState ,state}) =>{
          setTimeout(() => {
            commit("add");
          }, 1000);
        }
      }
    }
    const store = new Vuex.Store({
      modules : {
        a : mA,
        b : mB,
      }
    });
    console.log(store.state.a);
Jul.21,2021
The commit in the

component calls the method in mutation to modify the variables in state. Dispatch calls the actions in actions, which generally handles asynchronous methods. After a good study of vuex's documents, it is quite clear that there are also many demo's


on GitHub.

generally, the status of state is obtained from the module namespace through getter

  

(1) call
this.$store.commit ('mA/add')
in vue (2) call
store.commit (' mA/add')

in js
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bfd2aa-3109d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bfd2aa-3109d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?