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>
相关推荐
用户298698530147 分钟前
前端如何把 TXT 文本文件转成 Word 文档:React 实践
前端·javascript·react.js
FEF前端团队7 分钟前
03# Claude Code实战:终端里的逻辑引擎
前端·ai编程·claude
FEF前端团队10 分钟前
04# Codex CLI实战:OpenAI的编程代理
前端·chatgpt·ai编程
掘金挖土12 分钟前
前端手摸手跑路之 AI 应用开发(七)
前端·后端
data analyse 45613 分钟前
重复事件怎么去重:按请求ID、用户+时间窗还是会话聚合?
前端·数据分析
亿元程序员13 分钟前
让Codex直接生成PSD难吗?提示词其实很简单
前端
Moment16 分钟前
为什么越来越多开发者开始用 PostgreSQL?
前端·后端·面试
mmsx16 分钟前
MapLibre 实战 13|让比例尺显示 100m 而不是 347.2m:屏幕距离换算与两个易错点
android·前端·app
YHL17 分钟前
🚀 从 SPA 到 Next.js 全栈:一个大前端的 SEO 突围笔记
前端·后端
颜进强19 分钟前
从零跑通一套 WorkBuddy Skill 骨架:【能跑通+代码】生成HTML报告实战
前端·后端·ai编程