axios的安装:npm install axios vue-axios

 lianxi01 % yarn add axios --save
yarn add v1.22.10
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] ?  Resolving packages...
[2/4] ?  Fetching packages...
[3/4] ?  Linking dependencies...
[4/4] ?  Building fresh packages...

success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.15", while you're on "1.22.10".
info To upgrade, run the following command:
$ curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
success Saved 1 new dependency.
info Direct dependencies
└─ axios@0.24.0
info All dependencies
└─ axios@0.24.0
✨  Done in 6.89s.
 lianxi01 % npm install axios vue-axios

added 1 package, and changed 4 packages in 4s

91 packages are looking for funding
  run `npm fund` for details
01 % 

版权声明:本文为weixin_40945354原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。