脚手架项目

npm install -g @vue/cli
vue -V 查看版本
npm root -g 查看安装地址

创建脚手架项目

vue create axios-msm 开始创建

-------进入选择
-------Manually select features
-------Babel, Router, CSS Pre-processors, Linter
-------Sass/scss(width dart-sass)
-------Prettier
-------Lint on save
-------In dedicated config files
-------重写项目名

—创建vue.config.js
1、编辑端口号 2、提高打包效率

示例:
module.exports={
devServer :
port : 8888,//端口号
host:“localhost”,//主机 //127.0.0.1
https:false,//协议
open:true,//启动服务自动打开协议
},
lintOnSave:false,//关闭格式检查
productionSourceMap:false,//加快打包速度,不会生成.map的文件
}

npm i -s axios //处理异步请求
npm i -s pubsub-js //非父子之间的通信
npm i -s element-ui //

—main.js
//引入element-ui
import ElementUI from ‘element-ui’;
import ‘element-ui/lib/theme-chalk/index.css’;
//使用element-ui
Vue.use(ElementUI);
//模式:1、开发环境 false 2、大的生产环境 true
Vue.config.productionTip = process.env.NODE_ENV === ‘production’;
console.log(“信息”+Vue.config.productionTip);

—需要安装的插件
Element UI Snippets
Auto Rename Tag
HTML CSS Support
Live Server
Node Snippets
open in browser
Path Intellisense
Path Intellisense
Vetur
Chinese (Simplified) Language Pack for Visual Studio Code

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值