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"
/>
相关推荐
你的人类朋友1 天前
【Node】认识一下Node.js 中的 VM 模块
前端·后端·node.js
Cosolar1 天前
FunASR 前端语音识别代码解析
前端·面试·github
@大迁世界1 天前
Vue 设计模式 实战指南
前端·javascript·vue.js·设计模式·ecmascript
芭拉拉小魔仙1 天前
Vue项目中如何实现表格选中数据的 Excel 导出
前端·vue.js·excel
jump_jump1 天前
妙用 localeCompare 获取汉字拼音首字母
前端·javascript·浏览器
U.2 SSD1 天前
Echarts单轴坐标系散点图
前端·javascript·echarts
不做无法实现的梦~1 天前
jetson刷系统之后没有浏览器--解决办法
开发语言·javascript·ecmascript
德育处主任Pro1 天前
前端玩转大模型,DeepSeek-R1 蒸馏 Llama 模型的 Bedrock 部署
前端·llama
Jedi Hongbin1 天前
Three.js NodeMaterial 节点材质系统文档
前端·javascript·three.js·nodematerial
前端小马1 天前
前后端Long类型ID精度丢失问题
java·前端·javascript·后端