Vue框架之vuex的使用

1.首先需要在你的项目目录下安装vuex 

  终端命令:

2.在全局组件中导入与声明vuex

  

3.创建store实例对象

  

let store = new Vuex.store({
    state:{

},
    mutations:{

},
    actions:{

}.


})

 

 

 

 

 

 

https://vuex.vuejs.org/zh/guide/

posted @ 2018-12-03 21:22  sado  阅读(301)  评论(0编辑  收藏  举报