如何在vue3.0项目中集成Element-plus

一、Element-plus简介
Element plus是一套为开发者,设计师和产品经理准备的基于vue3.0的桌面端组件库。
之前在vue2中都使用element-ui,而element-plus是针对vue3开发的一个ui组件库。
二、基本使用
安装element-plus

npm install element-plus

2.1、全局引入
一种引入element-plus的方式是全局引入的方式,代表的含义是所有的组件和插件都会背自动注册。

import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'

const app = createApp(App)
app.use(ElementPlus)
app.mount('#app')

你可能感兴趣的:(vue面试,vue,element-plus)