Vue3如何使用element-plus

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内容请搜索编程宝库以前的文章,希望以后支持编程宝库

本文实例为大家分享了JavaScript实现密码框验证信息的具体代码。效果展示:代码展示<!DOCTYPE html><html><head><meta ch ...