vuex的简单使用

1,vuex是专为vue.js设计的状态管理模式,集中存储和管理应用程序中所有组件的状态,适用于中大型单页应用 2,使用vuex的第一步: 引入 import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); 同样需要在main.js中引入store import store from './store'; window.$vue
相关文章
相关标签/搜索