詳解Vue3怎么使用element-plus
更新時間:2021年11月11日 08:40:59 作者:聽聽那晚風
本文主要介紹了Vue3怎么使用element-plus,文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
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內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
vue?watch中如何獲取this.$refs.xxx節(jié)點
這篇文章主要介紹了vue?watch中獲取this.$refs.xxx節(jié)點的方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-08-08淺談element中InfiniteScroll按需引入的一點注意事項
這篇文章主要介紹了淺談element中InfiniteScroll按需引入的一點注意事項,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-06-06