Skip to content

Bug: vxetable里使用elementui的image时,预览时出现问题 #6186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks done
callmeali opened this issue May 14, 2025 · 2 comments
Open
5 tasks done

Bug: vxetable里使用elementui的image时,预览时出现问题 #6186

callmeali opened this issue May 14, 2025 · 2 comments

Comments

@callmeali
Copy link

callmeali commented May 14, 2025

Version

Vben Admin V5

Describe the bug?

升级到5.5.6版本后在vxetable里使用element-ui的image时,预览图片时候遮罩不会全屏只会覆盖table的区域,而且预览的按钮在暗色主题下和底色接近看不清,在亮色主题正常。之前在5.5.4是正常的,不知道是不是只有我遇到问题。

Reproduction

src/adapter/vxe-table.ts 代码

 // 表格配置项可以用 cellRender: { name: 'CellImage' },
    vxeUI.renderer.add('CellImage', {
      renderTableDefault(_renderOpts, params) {
        const { column, row } = params;
        const src = row[column.field];
        return h(ElImage, { src, previewSrcList: [src] });
      },
    });

检查css时去掉table的style里transform: translate(0px, 0px);后表现正常。

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
    Memory: 1.51 GB / 15.96 GB
  Binaries:
    Node: 20.18.1 - C:\Program Files\nodejs\node.EXE     
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD        
    pnpm: 10.10.0 - ~\AppData\Roaming\npm\pnpm.CMD       
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.19041.4355

Relevant log output

Validations

@callmeali callmeali changed the title Bug: 升级到5.5.6版本后再vxetable里使用elementui的image时,预览时候遮罩不会全屏只会覆盖table的区域 Bug: vxetable里使用elementui的image时,预览时出现问题 May 14, 2025
@xingxingdcf
Copy link

配置一下preview-teleported:true默认挂载在 body 中

@callmeali
Copy link
Author

配置一下preview-teleported:true默认挂载在 body 中

解决了,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants