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-upload] 上传组件预览图无法居左对齐 目前只能两端对齐 #3221

Open
LawyerLu opened this issue Oct 24, 2024 · 3 comments
Open
Labels
question This is a question, not a bug

Comments

@LawyerLu
Copy link

LawyerLu commented Oct 24, 2024

这个功能解决了什么问题

编写发帖页面时,图片预览方格居左对齐,符合视觉习惯。

你建议的方案是什么

目前默认是两端对齐,设置为每行4张图片间距正常,但是如果设置为3张,间距就会过大,因为是两端对齐,目前只能通过调整根容器的边距来从视觉上满足需求,但考虑到兼容性问题,建议像grid宫格组件一样,增加align属性,可选 left/center.
image

Copy link
Contributor

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

@LawyerLu
Copy link
Author

LawyerLu commented Oct 24, 2024

目前临时的解决方案是:设置gridConfig的固定宽高后,如100,然后再设置

.t-upload__drag-item,.t-grid-item{
  width: 110rpx !important;
}

其中多出来的间距就是gutter的值。

@anlyyao
Copy link
Collaborator

anlyyao commented Oct 25, 2024

@LawyerLu column取3的时候,实际上已经将容器宽度均分3份啦,所以这里最好的处理方式是根据gridConfig调整图片的宽高

@anlyyao anlyyao added the question This is a question, not a bug label Oct 25, 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

2 participants