vue vuex 提交 this.$store.commit({type: 'setSelectPro', selectPro: this.productId});

1、store.commit({'type':'mutation','parameter':'value'});

     store.dispatch('action');

2、获取state保存的值

   store.state.state

posted @ 2017-07-17 17:51  js初学者  阅读(1435)  评论(0编辑  收藏  举报