Skip to content

Conversation

@QuentinHsu
Copy link
Collaborator

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

#6229

💡 需求背景和解决方案

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

tdesign-vue-next

  • fix(ImageViewer): 缩小图片后新增空白区域无法正常关闭预览

@tdesign-vue-next/chat

@tdesign-vue-next/auto-import-resolver

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@tdesign-bot
Copy link
Collaborator

tdesign-bot commented Dec 3, 2025

TDesign Component Site Preview Open

Component Preview
tdesign-vue-next 完成
@tdesign-vue-next/chat 完成

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

  • tdesign-vue-next-demo

    npm i https://pkg.pr.new/Tencent/tdesign-vue-next/@tdesign-vue-next/auto-import-resolver@6235
    
    npm i https://pkg.pr.new/Tencent/tdesign-vue-next@6235
    
    npm i https://pkg.pr.new/Tencent/tdesign-vue-next/@tdesign-vue-next/chat@6235
    

commit: bba9af6

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the ImageViewer component where clicking on blank areas after zooming out an image would not properly close the preview. The fix reorganizes the CSS transform properties by moving the scale transformation from individual image elements to their parent container.

Key Changes:

  • Removed scale transform from individual image elements (main image, placeholder image, and SVG elements)
  • Applied scale transform to the parent container box element, combining it with translation and mirror transformations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/components/image-viewer/base/ImageItem.tsx Moved scale transform from image elements to parent container, ensuring proper scaling of the entire clickable area
packages/components/image-viewer/tests/snapshots/image-viewer.test.tsx.snap Updated test snapshots to reflect the new transform structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants