Vue3+Element Plus

来自泡泡学习笔记
跳到导航 跳到搜索

安装Vue3

$ npm create vue@latest
$ cd <your-project-name>
$ npm install
$ npm run dev


安装Element Plus

$ npm install element-plus --save


Vue3引入Element Plus

// main.js
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'

const app = createApp(App)

app.use(ElementPlus)
app.mount('#app')