文章目录[隐藏]
目录
vue3出来一段时间了,element也更新了版本去兼容vue3,在这里简单的介绍一下如何使用element-plus吧
1、安装
npm install element-plus --save
2、在main.js引入
import { createApp, Vue } 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')
3、使用
这里使用的是按钮
<el-row> <el-button>默认按钮</el-button> <el-button type="primary">主要按钮</el-button> <el-button type="success">成功按钮</el-button> <el-button type="info">信息按钮</el-button> <el-button type="warning">警告按钮</el-button> <el-button type="danger">危险按钮</el-button> </el-row>
具体的可以查看官方文档
到此这篇关于Vue3怎么使用element-plus的文章就介绍到这了,更多相关Vue3怎么使用element-plus内容请搜索华域联盟以前的文章或继续浏览下面的相关文章希望大家以后多多支持华域联盟!
本文由 华域联盟 原创撰写:华域联盟 » 详解Vue3怎么使用element-plus
转载请保留出处和原文链接:https://www.cnhackhy.com/146840.htm