首页 > 其他分享 >vue+elementui+axios环境搭建

vue+elementui+axios环境搭建

时间:2022-10-14 12:00:45浏览次数:63  
标签:npm axios cnpm elementui -- vue

1.去官网下载安装node.js,安装后用命令检测版本信息
    node -v
    npm -v
2.安装vue环境
    #安装淘宝npm
    npm install -g cnpm --registry=https://registry.npm.taobao.org
    #安装vue-cli依赖
    cnpm install --g vue-cli
3.新建项目
    vue ui
4.安装elementui和elementui
    #安装element-ui依赖
    cnpm install element-ui --save
    #安装axios依赖
    cnpm install axios --save

 

标签:npm,axios,cnpm,elementui,--,vue
From: https://www.cnblogs.com/pingfanren/p/16791169.html

相关文章

  • 利用a标签实现文件下载功能(ant design vue可用)
    #利用a标签实现文件下载功能(antdesignvue可用)##代码和注释```letfileUrl=“”//所下载文件的网络地址letfileName=“”//下载成功后保存的文件名//创建一个a标......
  • Vue3+Element-plus 报错记录
    目录Vue3+Element-plus报错记录报错信息错误场景还原问题排查错误代码el-select多选Vue3+Element-plus报错记录报错信息TypeError:Cannotreadpropertiesofnull......
  • VUE截图
    一、安装html2canvas、vue-croppernpmihtml2canvas--save//用于将指定区域转为图片npmivue-cropper-S//将图片进行裁剪二、在main.js注册vue-cropper组件im......
  • axios取消请求
    AbortController从 v0.22.0 开始,Axios支持以fetchAPI方式—— AbortController 取消请求:constcontroller=newAbortController();axios.get('/foo/bar',{......
  • vue封装自己的axios
    在项目中封装自己的axios在src目录下建立一个unit文件夹//unit=>http.jsimportaxiosfrom"axios";consthttp=axios.create({baseURL:"xxxx",......
  • vue中基于webpack打包的一些配置说明
    以下配置只限于打包时assetsPublicPath路径变化时的配置,如果是正常的打包,不用配置任何路径,不必参考!1.静态资源配置:index:path.resolve(__dirname,'../dist/index.html'......
  • vue2实现树
    效果:接口返回数据: vue2前端代码:getTree(){this.listLoading=truegetAcademyTree().then(response=>{console.log(response.data)......
  • Vue面试题32:你用过自定义指令吗?(总结自B站up主‘前端杨村长’视频,仅供自用学习)
    分析:这是一道API题,我们可能写的自定义指令少,但是我们用的多呀,多举几个例子就行;使用://Vue2directives:{focus:{inserted(el,binding,vnode){el.f......
  • vue3+vite引入插件unplugin-auto-import
    自动引入compositionapi,不需要再手动引入。github地址:https://github.com/antfu/unplugin-auto-import下载npmiunplugin-auto-import-D修改vite.config.ts文件i......
  • 实现简单的vue-router
    1.使用vue-cli创建一个配置Router,且是history模式的项目,可以看到使用vue-router的相关代码://route-demo/src/router/index.jsimportVuefrom'vue'importVueRouterf......