zoukankan      html  css  js  c++  java
  • vue Cli 安装axios

     

    1、通过命令下载 axios     当前项目  npm install axios

    D:studymy-project>npm install axios
    npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_moduleswatchpack-chokidar2
    ode_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_moduleswebpack-dev-server
    ode_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    + axios@0.20.0
    added 1 package from 1 contributor in 30.477s
    
    29 packages are looking for funding
    run `npm fund` for details
    
    
    D:studymy-project>

    2、如果想看自己是否下载成功    打开你的package.json 看看有没有axios的版本信息

    3、 打开你的main.js去做配置  把我给你圈着的填进去  就ok

     

     在相对应的页面上如何使用axios

     本文大部分转载自:https://www.cnblogs.com/l-ialiu/p/12627081.html 并对博客做了进一步编辑

  • 相关阅读:
    python全栈闯关--16-匿名函数
    python全栈闯关--15-内置函数
    python全栈闯关--14-生成器进阶
    示例库
    MySQL的远程连接
    前后端传输编码方式
    后端接收前端时间参数
    控制器接参的空值问题
    MyBatis模糊查询的几种方式
    MySQL常用函数
  • 原文地址:https://www.cnblogs.com/minmin123/p/13559297.html
Copyright © 2011-2022 走看看