vuex第一次使用成功記錄

一、第一步,咱們在 vue.js 2.0 開發環境中安裝 vuex : npm install vuex --save 二、第二步 , 在 main.js 中加入 : import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { count: 0 }, mutations: {
相關文章
相關標籤/搜索