vuex 模块化之后如何调用其他模块的方法和属性
dispatch('cart/get',{},{root:true})
参数一:是其他模块的 actions 路径,。
参数二:是传给 actions 的数据, 如果不需要传数据, 也必须预留,
参数三:是配置选项, 申明这个 acitons 不是当前模块的
commit 也是一样
dispatch('cart/get',{},{root:true})
参数一:是其他模块的 actions 路径,。
参数二:是传给 actions 的数据, 如果不需要传数据, 也必须预留,
参数三:是配置选项, 申明这个 acitons 不是当前模块的
commit 也是一样