axios in vue of use:

A, axios in vue of use:

  Axios mounted in vue-cli3 environment, do not control the path:

(1) Elevation install g cnpm --registry = https: //registry.npm.taobao.org

  asl -v

(2) npm i axios -s   

Close cmd

(3) open the editor, open the folder, open a terminal (lower left corner of the triangle)

Enter in this folder:
VUE the Create Axios-VUE

Select custom mode: babel router linter css process 

Custom, you can select via the arrow keys, the spacebar to select, enter:

 yes, less, and, and, and not

cd axios-vue

npm add axios ----- phrase is the key

npm run serve

 

 Second, the use axios in an existing file

(1) mounted in axios vue-cli3 environment, do not control the path:

asl install -g cnpm --registry = https: //registry.npm.taobao.org

asl -v

(2) created open powershell:

cnpm install

(3) to open the editor terminal (lower left corner of the triangle, click), enter the following command to preview the page in real time:

npm run start 

Guess you like

Origin www.cnblogs.com/warm--hope--win/p/11544248.html