Vue3快速上手参考文档:https://cn.vuejs.org/guide/quick-start.html
1.创建Vue3
npm init vue@latest
Project name: … <your-project-name>
Add TypeScript? … No
Add JSX Support? … No
Add Vue Router for Single Page Application development? … Yes
Add Pinia for state management? … Yes
Add Vitest for Unit testing? … No
Add Cypress for both Unit and End-to-End testing? … No
Add ESLint for code quality? … No
Add Prettier for code formatting? … No
2.选择镜像
cd <项目名称>
npm config set registry https://registry.npm.taobao.org
npm config get registry
3.安装element-plus
npm install element-plus --save
// 在main.js中引用ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp(App)
app.use(ElementPlus)