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>
相关推荐
daols884 分钟前
vue 甘特图组件 vxe-gantt 修改滚动条样式-让滚动条自动隐藏
javascript·vue.js·甘特图
高晶9 分钟前
ARM 嵌入式 Linux 内核编译与结构解析实战
前端·架构
今年下半年37 分钟前
【前端】Vue2 项目 ECharts 统计图表组件封装与使用实践(附组件源码)
前端·javascript·echarts
冒险的豆子41 分钟前
JS 原型链 通俗易懂 解释说明(类比 关系)
开发语言·javascript·原型模式
西索斯coding1 小时前
在 中接入 教程:p配置、m填写、扩展思考参数一篇就够(2)
java·前端·javascript·ai
代码猎人1 小时前
前端怎么优化项目基础架构
前端
__sjfzllv___1 小时前
在职前端Leader学习/转行 AI Agent -DAY78
前端
代码猎人1 小时前
前端怎么封装工具类
前端
deli0071 小时前
PDF 合并别再用在线工具:12 份文件浏览器里合完,实测不上传
前端
shuoshuohaohao1 小时前
SpringBoot3-web开发-静态资源-内容协商
前端