摘要: Vuex 通过 store 选项,提供了一种机制将状态从根组件“注入”到每一个子组件中(需调用 Vue.use(Vuex)): const app = new Vue({ el: '#app', // 把 store 对象提供给 “store” 选项,这可以把 store 的实例注入所有的子组件 s 阅读全文
posted @ 2021-09-01 13:59 Scok 阅读(94) 评论(0) 推荐(0) 编辑