一、使用 Vue CLI 创建 VUE 项目:
- 首先下载node.js。
- 设置 npm 使用国内阿里去镜像:
npm config set registry https://registry.npm.taobao.org
npm config get registry
npm config set registry https://registry.npmmirror.com
npm config get registry
- 安装 Vue CLI:
npm install -g @vue/cli
- 创建vue项目:
vue create 项目名
- 根据需求选择Vue2.0或3.0。
- 进入我们的项目目录下:
cd 项目名
- 根据需求安装对应的依赖:
npm install
npm i vue-router@3.5.2
npm install element-ui
npm install bootstrap
npm install jquery
- 运行项目到服务器:
npm run serve