下载安装npm和cnpm

下载安装npm

http://nodejs.cn/download/

下载安装cnpm

完成npm的安装后,再安装cnpm

https://npm.taobao.org/

切换源为 taobao 源

npm set registry https://registry.npm.taobao.org/

安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

安装vue-cli

https://cli.vuejs.org/zh/guide/installation.html

cnpm install -g @vue/cli

创建项目

vue create hello-world

进入cli目录里启动服务

  • cd cli
  • npm run serve

浏览器里打开页面看看效果:

http://localhost:8080/

下载vue-router.js

https://router.vuejs.org/zh/installation.html

猜你喜欢

转载自www.cnblogs.com/haima/p/11235640.html