Skip to content
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

[t-image] mode="aspectFit" 图片 radius 两侧不一致 #2582

Closed
yahuian opened this issue Jan 30, 2024 · 5 comments
Closed

[t-image] mode="aspectFit" 图片 radius 两侧不一致 #2582

yahuian opened this issue Jan 30, 2024 · 5 comments
Labels
question This is a question, not a bug

Comments

@yahuian
Copy link

yahuian commented Jan 30, 2024

tdesign-miniprogram 版本

1.2.7

重现链接

No response

重现步骤

正常情况下圆角:

image

image

mode="aspectFit" 圆角两侧不一致

image

其他

scaleToFill/aspectFit/aspectFill/widthFix/heightFix/top/bottom/center/left/right/top left/top right/bottom left/bottom right
上述 mode 全部测试完,只有 aspectFit 有问题

期望结果

No response

实际结果

No response

基础库版本

3.1.1

补充说明

No response

Copy link
Contributor

👋 @yahuian,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@jarmywang
Copy link
Collaborator

jarmywang commented Jan 31, 2024

请问方便发原图地址吗?或者请提供尺寸 @yahuian

@yahuian
Copy link
Author

yahuian commented Feb 1, 2024

海

@jarmywang 这是原图,不过其他图片应该也能复现该问题

@anlyyao
Copy link
Collaborator

anlyyao commented Feb 4, 2024

@yahuian 看一下 aspectFit 缩放模式的规则,应该是图片宽高比和容器宽高比不匹配的问题,目前并没有好的解决方案,如果你图片包含 宽>高、宽<高 等情况,还是建议图片拉伸。
截屏2024-02-04 11 31 07

@anlyyao anlyyao added the question This is a question, not a bug label Feb 4, 2024
@yahuian
Copy link
Author

yahuian commented Feb 4, 2024

@anlyyao 非常感谢,我明白了。因为 aspectFit 不能保证图片会占满整个容器(只能保证长边完全占满容器),所以可能出现 radius 两侧不一致问题。而其他的 mode 都可以保证图片会充满整个容器,所以没问题。

image

@yahuian yahuian closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question, not a bug
Projects
None yet
Development

No branches or pull requests

3 participants