el-table 自定义头部,el-table-column使用fixed="right"后,无法使用el-popover 用 v-model="visible" 的方式去打开el-popover
<el-table-column align="center" width="180" prop="clientName">
<template #header>
<el-popover
placement="top"
width="160"
v-model="visible">
<p>这是一段内容这是一段内容确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="visible = false">确定</el-button>
</div>
<el-button slot="reference">删除</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" fixed="right" >
</el-table-column>
</el-table>
设置 trigger="click",去掉v-model试试
明白,我后面也找到方法了,但是文档没有doClose(),卡了很久。官网的操控方式就是用v-model
------------------ 原始邮件 ------------------ 发件人: "ElemeFE/element" @.>; 发送时间: 2025年5月8日(星期四) 中午11:35 @.>; @.@.>; 主题: Re: [ElemeFE/element] el-table 自定义头部,el-table-column使用fixed="right"后,无法使用el-popover 用 v-model="visible" 的方式去打开el-popover (Issue #23067)
leonardo110 left a comment (ElemeFE/element#23067)
你这个el-popover是在列里的,是要循环生成ref的,然后使用各行的refs去控制显隐,有个this.$refs['***'].show() 开启, 好像还有个close还是什么来着
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
明白,我后面也找到方法了,但是文档没有doClose(),卡了很久。官网的操控方式就是用v-model。应该更新一下文档
------------------ 原始邮件 ------------------ 发件人: "ElemeFE/element" @.>; 发送时间: 2025年5月8日(星期四) 中午11:35 @.>; @.@.>; 主题: Re: [ElemeFE/element] el-table 自定义头部,el-table-column使用fixed="right"后,无法使用el-popover 用 v-model="visible" 的方式去打开el-popover (Issue #23067)
leonardo110 left a comment (ElemeFE/element#23067)
你这个el-popover是在列里的,是要循环生成ref的,然后使用各行的refs去控制显隐,有个this.$refs['***'].show() 开启, 好像还有个close还是什么来着
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
不是的,我这个不是在列表里的。是在表头的。跟循环没有关系,我是单个的。而且还是插槽里面的
------------------ 原始邮件 ------------------ 发件人: "ElemeFE/element" @.>; 发送时间: 2025年5月8日(星期四) 中午11:35 @.>; @.@.>; 主题: Re: [ElemeFE/element] el-table 自定义头部,el-table-column使用fixed="right"后,无法使用el-popover 用 v-model="visible" 的方式去打开el-popover (Issue #23067)
leonardo110 left a comment (ElemeFE/element#23067)
你这个el-popover是在列里的,是要循环生成ref的,然后使用各行的refs去控制显隐,有个this.$refs['***'].show() 开启, 好像还有个close还是什么来着
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>