fix(image.viewer.ts): 修复ImageViewer公共组件对纵图处理不当导致图片被裁剪的问题 #2575
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
使用者提出issue,反馈ImageViewer 图片预览没有设置宽高限制的情况下,图片被截断了,特此修复了公共组件中对纵图处理不当导致图片被裁剪的问题
🤔 这个 PR 的性质是?
🔗 相关 Issue
#2560
💡 需求背景和解决方案
需求背景:使用者提出issue,反馈ImageViewer 图片预览没有设置宽高限制的情况下,图片被截断了
问题定位:经过通过对多种图片,尤其是该issue中的图片的测试验证发现,该公共组件中对纵图的处理方式不当,导致纵图的宽不能很好的显示而被裁剪。
解决方案:优化纵图宽高计算逻辑,使纵图优雅完好的显示。
📝 更新日志
☑️ 请求合并前的自查清单