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

效果

相关推荐
通义灵码8 分钟前
用 Qoder 加速前端巨石应用的架构演进
前端·人工智能·架构·qoder
一水鉴天12 分钟前
整体设计 定稿 之21 拼语言表述体系之3 dashboard.html V5(codebuddy)
前端·人工智能·架构
前端fighter18 分钟前
全栈项目:宠物用品购物系统及后台管理
前端·vue.js·后端
吃炒鸡蛋33 分钟前
反射更新字段
java·服务器·前端
子洋37 分钟前
LLM 原理 - 输入预处理
前端·人工智能·后端
女生寝室0381 小时前
DiskSGenius Pro [6.0.1.1645][单文件汉化版] 下载
前端
前端老宋Running1 小时前
别让你那 5MB 的 JS 文件把用户吓跑:React 代码分割(Code Splitting)实战指南
前端·javascript·react.js
小飞侠在吗1 小时前
vue ref
前端·javascript·vue.js
悟能不能悟1 小时前
在 Vue Router 4 中,如何设置base参数
前端·javascript·vue.js
Lovely_Ruby2 小时前
前端er Go-Frame 的学习笔记:实现 to-do 功能(三),用 docker 封装成镜像,并且同时启动前后端数据库服务
前端·后端