Vue development practice 02 Vue project adds status management vuex, routing router, and HTTP request Axios

liangblog 2022-06-23 15:23:58 阅读数:295

  • Vue Developing actual combat 01- build Vue Basic projects , Dependency management uses yarn
  • Vue Developing actual combat 02-vue Project addition status management Vuex, route router, as well as http request axios

1、 add to vuex:

Installation dependency , Open the terminal , Carry out orders :

yarn add vuex

Out of commission install
 Insert picture description here

Code new utils Under the table of contents store.js file

/** Storage */
import {
 createStore } from "vuex"
const state = {