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>
相关推荐
sen_shan14 分钟前
Vue3+Vite+TypeScript+Element Plus开发-04.静态菜单设计
前端·javascript·typescript·vue3·element·element plus·vue 动态菜单
旧识君37 分钟前
移动端1px终极解决方案:Sass混合宏工程化实践
开发语言·前端·javascript·前端框架·less·sass·scss
ElasticPDF-新国产PDF编辑器1 小时前
Angular use pdf.js and Elasticpdf tutorial
javascript·pdf·angular.js
揣晓丹1 小时前
JAVA实战开源项目:校园失物招领系统(Vue+SpringBoot) 附源码
java·开发语言·vue.js·spring boot·开源
吃没吃1 小时前
vue2.6-源码学习-Vue 核心入口文件分析
前端
Carlos_sam1 小时前
Openlayers:海量图形渲染之图片渲染
前端·javascript
XH2761 小时前
Android Retrofit用法详解
前端
鸭梨大大大1 小时前
Spring Web MVC入门
前端·spring·mvc
你的人类朋友1 小时前
MQTT协议是用来做什么的?此协议常用的概念有哪些?
javascript·后端·node.js
吃没吃1 小时前
vue2.6-源码学习-Vue 初始化流程分析 (src/core/instance/init.js)
前端