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"
/>
相关推荐
子兮曰3 小时前
OpenClaw入门:从零开始搭建你的私有化AI助手
前端·架构·github
吴仰晖3 小时前
使用github copliot chat的源码学习之Chromium Compositor
前端
1024小神3 小时前
github发布pages的几种状态记录
前端
不像程序员的程序媛5 小时前
Nginx日志切分
服务器·前端·nginx
Daniel李华5 小时前
echarts使用案例
android·javascript·echarts
北原_春希5 小时前
如何在Vue3项目中引入并使用Echarts图表
前端·javascript·echarts
JY-HPS5 小时前
echarts天气折线图
javascript·vue.js·echarts
尽意啊5 小时前
echarts树图动态添加子节点
前端·javascript·echarts
吃面必吃蒜5 小时前
echarts 极坐标柱状图 如何定义柱子颜色
前端·javascript·echarts
O_oStayPositive5 小时前
Vue3使用ECharts
前端·javascript·echarts