element-plus官网:https://element-plus.gitee.io/zh-CN/component/button.html
1、安装element-plus
npm install element-plus -D
2、在index.js中导入element-plus
import { createApp } from 'vue' // 引入element-plus import ElementPlus from "element-plus" import "element-plus/dist/index.css" import App from "./App.vue" const app = createApp(App) // 使用element-plus app.use(ElementPlus) app.mount("#app")
3、在app.vue文件中写入下面button的标签
<template> <el-row class="mb-4"> <el-button>Default</el-button> <el-button type="primary">Primary</el-button> <el-button type="success">Success</el-button> <el-button type="info">Info</el-button> <el-button type="warning">Warning</el-button> <el-button type="danger">Danger</el-button> </el-row> </template> <script> </script> <style> </style>
4、打开页面查看展示效果
标签:vue,app,element,plus,vue3,import,Element,App From: https://www.cnblogs.com/testlearn/p/16780078.html