el-table中使用el-image图片预览被其他表格遮挡,使用z-index层级设置无效

【Element Plus】el-table中使用el-image图片预览被其他表格遮挡,使用z-index层级设置无效

  1. 首先,确保你在设置 z-index 时已经正确地指定了元素的位置(例如,使用 position: relative, position: absolute 或 position: fixed)
  2. 检查父元素的 z-index
html 复制代码
<el-image-viewer
            :z-index="3000"
            :teleported="true"
        />
只需要在el-image中加入:preview-teleported="true",把image-viewer 插入至 body 元素上,就可以解决问题了
html 复制代码
<el-image
 :src="scope.row.productImage"
 :preview-src-list="[scope.row.productImage]"
 preview-teleported="true"
/>
相关推荐
懂懂tty11 分钟前
Vue2与Vue3之间API差异
前端·javascript·vue.js
AI焦点20 分钟前
跨越协议鸿沟:Tool Use状态机从Anthropic到OpenAI兼容体系的适配要点
前端·人工智能
Dxy123931021623 分钟前
Python线程锁:为什么多线程会“打架“,以及怎么解决
开发语言·前端·python
老毛肚1 小时前
软件测试期末考试
vue.js
海兰1 小时前
【web应用】Excel 项目数据自动化分析系统(AI 驱动分析)详细设计与部署指南(附源代码)
前端·人工智能·自动化·excel
小二·1 小时前
Next.js 15 全栈开发实战
开发语言·javascript·ecmascript
2501_940041741 小时前
技术分享:高质量全栈开发提示词设计实践 —— 覆盖简单到复杂
前端·prompt
IT_陈寒1 小时前
Python的os.path.join居然能这么坑?
前端·人工智能·后端
艳阳天_.1 小时前
星瀚弹框页面实现
java·前端·python
杨若瑜2 小时前
本地开发环境慢?localhost的锅!
vue.js