Install and configure vuex

Quick Start with vuex--Simple state and mutation operations (create warehouse, modify warehouse, read warehouse)

Install vuex

Open the console and enter the path of the project and enter the following command:

  1. npm install vuex --save
  2. cnpm install es6-promise --save
import 'es6-promise/auto'//(注意:此引入在引用vuex之前添加)
import Vuex from 'vuex'

Vue.use(Vuex)

Guess you like

Origin blog.csdn.net/xiaozhezhe0470/article/details/108984268