《ElementPlus 与 ElementUI 差异集合》el-popconfirm 气泡确认框之插槽写法有差异

ElementUI

  • 直接在 el-button 上配置属性 slot
html 复制代码
<el-popconfirm title="确定删除吗?请谨慎操作!" @confirm="delete">
	<el-button slot="reference" size="small" type="danger">删除</el-button>
</el-popconfirm>

elementPlus

  • 内嵌 <template #reference> 实现插槽机制;
html 复制代码
<el-popconfirm title="确定删除吗?请谨慎操作!" @confirm="delete">
	<template #reference>
		<el-button slot="reference" size="small" type="danger">删除</el-button>
	</template>
</el-popconfirm>

效果

相关推荐
陈随易4 小时前
真的,你可以不用TypeScript
前端·后端·程序员
郑州光合科技余经理4 小时前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
唐璜Taro5 小时前
Vue3 + TypeScript 后台管理系统完整方案
前端·javascript·typescript
dustcell.5 小时前
haproxy七层代理
java·开发语言·前端
掘金酱5 小时前
「寻找年味」 沸点活动|获奖名单公示🎊
前端·人工智能·后端
颜酱5 小时前
栈的经典应用:从基础到进阶,解决LeetCode高频栈类问题
javascript·后端·算法
患得患失9495 小时前
【前端】前端动画优化的核心
前端
Xin_z_5 小时前
Vue3 + Sticky 锚点跳转被遮挡问题解决方案
前端·javascript·vue.js
REDcker5 小时前
WebCodecs VideoDecoder 的 hardwareAcceleration 使用
前端·音视频·实时音视频·直播·webcodecs·videodecoder
修炼前端秘籍的小帅5 小时前
Stitch——Google热门的免费AI UI设计工具
前端·人工智能·ui