Vue框架之vuex的使用

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

  终端命令:

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

  

3.创建store实例对象

  

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

},
    mutations:{

},
    actions:{

}.


})

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

猜你喜欢

转载自www.cnblogs.com/qq631243523/p/10060996.html