详解Vue3怎么使用element-plus_vue.js

本文主要介绍了Vue3怎么使用element-plus,文中通过示例代码介绍的非常详细,具有一定的参

详解Vue3怎么使用element-plus_vue.js

本文主要介绍了Vue3怎么使用element-plus,文中通过示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

目录

1、安装2、在main.js引入3、使用

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内容请搜索3399IT网以前的文章或继续浏览下面的相关文章希望大家以后多多支持3399IT网!

本文为网络共享文章,如有侵权请联系邮箱485837881@qq.com

作者: 听听那晚风

为您推荐

返回顶部