美文网首页
vue集成ElementUI

vue集成ElementUI

作者: 蓝不蓝编程 | 来源:发表于2021-12-25 11:43 被阅读0次
  1. 执行命令:yarn add element-plus
  2. 修改main.js内容为如下:
import { createApp } 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')
  1. 使用
    样例:
<el-button type="info" @click="resetTimer">重置</el-button>
<el-button type="primary" @click="startOrPauseTimer">{{ startPauseButtonText }}</el-button>

零基础系列

《零基础学安卓编程》
《零基础学Java编程》
《零基础学鸿蒙编程》

关于我

厦门大学计算机专业 | 前华为工程师
专注《零基础学编程系列》,包含:Java | 安卓 | 前端 | Flutter | iOS | 小程序 | 鸿蒙
全网可关注:花生皮编程

参考资料:https://element-plus.gitee.io/en-US/guide/installation.html#using-package-manager

相关文章

网友评论

      本文标题:vue集成ElementUI

      本文链接:https://www.haomeiwen.com/subject/odjcqrtx.html