el-popover或el-popconfirm中button不展示问题

vue3在使用Element-plus 2.X时,出现el-popover或el-popconfirm中button不展示问题。

正常效果:

第一种错误原因:el-button没有添加 slot='reference'

javascript 复制代码
<template slot-scope="scope">
	<el-popconfirm title="您确定删除吗?" @onConfirm="cancelOrder(scope.row.id)">
	    <el-button >删除</el-button>
	</el-popconfirm>
</template>

第二种错误方式: 添加 **slot='reference' 还是不展示,没想到吧!!!!!**2.3.9官网就是这么写的啊

javascript 复制代码
<el-popover
        placement="top"
        width="200"
        v-model="scope.row.visible">
    <p>确定删除吗?</p>
    <div style="text-align: right; margin: 0">
        <el-button type="text" @click="scope.row.visible= false">取消</el-button>
        <el-button type="text" @click="delete(scope.row.id)">确定</el-button>
    </div>
    <el-button slot="reference">删除</el-button>
</el-popover>

正确方式:

javascript 复制代码
<el-popover
        placement="top"
        width="200"
        v-model="scope.row.visible">
    <p>确定删除吗?</p>
    <div style="text-align: right; margin: 0">
        <el-button type="text" @click="scope.row.visible= false">取消</el-button>
        <el-button type="text" @click="delete(scope.row.id)">确定</el-button>
    </div>
    <template #reference>
        <el-button >删除</el-button>
    </template>
</el-popover>
相关推荐
唐老板11 分钟前
前端和后端,转 AI 全栈怎么转
前端·后端
AI前端工程狮36 分钟前
我给 MCP 工具加了删除确认,用户点了拒绝,数据还是删了
javascript·人工智能·程序员
用户2986985301441 分钟前
在 React 中实现 Excel 文本与数字互转的完整实践
javascript·react.js·excel
程序员鱼皮1 小时前
Antigravity 保姆级实战教程,从 0 到 1 万字干货!
前端·后端·ai编程
徐小夕1 小时前
JitKnow AI知识库:把任何文档,一键变成可访问和可配置的Wiki站点
前端·vue.js·github
狮子座的男孩1 小时前
javascript 基础 es6:2、模板字符串,简化对象写法,箭头函数,箭头函数实践案例
前端·javascript·经验分享·es6·模板字符串·箭头函数·简化对象
hackhase1 小时前
Vue3 + Vite 纯 SPA 的 SEO 工程化:构建期预渲染 21 个页面
javascript·vite
夏与冰1 小时前
Vue2项目动态路由的实现思路
vue.js
陈如水2 小时前
AI Agent 主流架构
前端·javascript·react.js
Amos_Web2 小时前
通过 Rspack 源码学 Rust(七):Copy 与 Clone,什么时候复制,什么时候移动
前端