《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>

效果

相关推荐
哆啦A梦15881 小时前
商城后台管理系统 03 登录布局
javascript·vue.js·elementui
曼巴UE52 小时前
UE FString, FName ,FText 三者转换,再次学习,官方文档理解
服务器·前端·javascript
selt7912 小时前
Redisson之RedissonLock源码完全解析
android·java·javascript
行走的陀螺仪2 小时前
高级前端 Input 公共组件设计方案(Vue3 + TypeScript)
前端·javascript·typescript·vue·组件设计方案
一颗不甘坠落的流星3 小时前
【Antd】基于 Upload 组件,导入Json文件并转换为Json数据
前端·javascript·json
LYFlied3 小时前
Vue2 与 Vue3 虚拟DOM更新原理深度解析
前端·javascript·vue.js·虚拟dom
Lucky_Turtle3 小时前
【Node】npm install报错npm error Cannot read properties of null (reading ‘matches‘)
前端·npm·node.js
小飞侠在吗3 小时前
vue shallowRef 与 shallowReacitive
前端·javascript·vue.js
惜分飞4 小时前
sql server 事务日志备份异常恢复案例---惜分飞
前端·数据库·php