Element Plus:图标

第一步:npm install @element-plus/icons-vue

第二步:在main.js

javascript 复制代码
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

第三步:在你需要用的地方页面

(1)按钮:

javascript 复制代码
<el-button size="small" type="primary" :icon="Edit" @click="openEditFileInfoModal(scope.row)">编辑</el-button>
<el-button size="small" type="danger" :icon="Delete" @click="deleteDownLoadList(scope.row.id)">删除</el-button>

(2)自定义:

javascript 复制代码
<el-button type="primary" @click="openAddCoverFile"><el-icon style="margin: 0 4px 0 0"><CirclePlus /></el-icon>新增</el-button>

<el-button type="primary" @click="chooseVideo">上传视频<el-icon class="el-icon--right"><UploadFilled /></el-icon></el-button>
相关推荐
渣渣xiong23 分钟前
从零开始:前端转型AI agent直到就业第五天-第十一天
前端·人工智能
布局呆星31 分钟前
Vue3 | 组件通信学习小结
前端·vue.js
C澒34 分钟前
IntelliPro 企业级产研协作平台:前端智能生产模块设计与落地
前端·ai编程
OpenTiny社区2 小时前
重磅预告|OpenTiny 亮相 QCon 北京,共话生成式 UI 最新技术思考
前端·开源·ai编程
前端老实人灬2 小时前
web前端面试题
前端
Moment2 小时前
AI 全栈指南:NestJs 中的 Service Provider 和 Module
前端·后端·面试
IT_陈寒2 小时前
为什么我的JavaScript异步回调总是乱序执行?
前端·人工智能·后端
Moment2 小时前
AI全栈入门指南:NestJs 中的 DTO 和数据校验
前端·后端·面试
小码哥_常2 小时前
告别RecyclerView卡顿!8个优化技巧让列表丝滑如德芙
前端
小村儿2 小时前
Harness Engineering:为什么你用 AI 越用越累?
前端·后端·ai编程