- 执行命令:
yarn add element-plus
- 修改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')
- 使用
样例:
<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
网友评论