state 应用办法

Store仓库

state应用形式一

state应用形式二

state应用形式三
一般调用形式,模块化须要增加模块


mutations

mutations 同步批改state数据

调用mutations形式一 commit

调用mutations形式二 mapMutation

actions

异步批改state数据,然而state数据只能通过mutations同步批改.须要通过嗲用mutations中的办法来批改

调用actions形式一 dispatch

调用actions形式二

modules

模块应用形式

导出模块

引入模块

注册

页面应用state数据形式一 ,state后边增加模块名

页面应用state数据形式二