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>
相关推荐
不爱学英文的码字机器29 分钟前
重塑 Web 性能:用 Rust 与 WASM 构建“零开销”图像处理器
前端·rust·wasm
浩星37 分钟前
react的框架UmiJs(五米)
前端·javascript·react.js
子醉3 小时前
推荐一种适合前端开发使用的解决本地跨域问题的办法
前端
Niyy_3 小时前
前端一个工程构建多个项目,记录一次工程搭建
前端·javascript
xiangxiongfly9154 小时前
CSS link标签
前端·css
快乐非自愿4 小时前
常用设计模式:工厂方法模式
javascript·设计模式·工厂方法模式
岁月宁静5 小时前
AI 多模态全栈应用项目描述
前端·vue.js·node.js
十年磨一剑~5 小时前
html+js开发一个测试工具
javascript·css·html
nn_(nana)5 小时前
修改文件权限--- chmod ,vi/vim,查看文件内容,yum-软件包管理器,systemctl管理系统服务
前端