解决问题
Vuex应运而生
{ //组件的状态 state: { }, //改变状态的方法集 mutations: { }, actions: { } }
Vue学习之VueX
原文:https://www.cnblogs.com/twodoge/p/10238069.html