脚手架创建项目
创建 Vue2
详细用法请参考本站 示例
安装 vue CLI
bash
npm install -g @vue/cli --registry=https://registry.npmmirror.com查看 vue 版本
bash
vue --version创建名为 test1 项目,手动选择组件模式并选择 vue2
bash
vue create test1安装项目依赖
bash
npm install开发模式运行项目
bash
npm run serve创建 Vue3
详细用法请参考本站 示例
安装 vue CLI
bash
npm install -g @vue/cli --registry=https://registry.npmmirror.com查看 vue 版本
bash
vue --version创建名为 test1 项目,手动选择组件模式并选择 vue3
bash
vue create test1安装项目依赖
bash
npm install编译 vue 项目
bash
npm run build开发模式运行项目
bash
npm run serve