1. 详细步骤

1.1 安装 node 和 npm

# 执行以下命令同时安装 node 和 npm(brew 的安装参考其他文章,有详细的教程。通过 apt 等其他方式能正确安装也可以)
brew install node

1.2 验证 node 和 npm 是否安装成功(可跳过)

node --version
npm --version

1.3 配置镜像源(灵活)

# 配置镜像源
# npmmirror,能用,稳定性、安全性等未知
npm config set registry https://registry.npmmirror.com/


# 配置镜像源(taobao)(应急可以临时用下)(可跳过)
# 淘宝 npm 源
npm config set registry https://registry.npm.taobao.org
# 关闭 ssl 验证
npm config set strict-ssl false


# 改回官方镜像源(设置其他镜像源同理)(可跳过)
npm config set registry https://registry.npmjs.org/


注:比较经典的淘宝镜像源 https://registry.npm.taobao.org,https 证书过期了,使用可能有风险

1.4 安装 vue-cli

npm install -g @vue/cli

1.5 验证 vue-cli 是否安装成功(可跳过)

vue --version

1.6 创建项目

vue create my-vue3-project

1.7 启动项目

cd my-vue3-project && npm run serve

1.8 访问页面

访问 http://localhost:8080,可以看到 VUE 的欢迎页面

2. 资源

2.1 VUE3

Docs

https://vuejs.org/guide/quick-start.html

https://cn.vuejs.org/guide/quick-start

GitHub

https://github.com/vuejs/core

2.2 VUE2

GitHub

https://github.com/vuejs/vue

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部