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

[Bug Report] uploader组件,展示预览上传图片时,不能设置横向滚动条 #12932

Closed
dyjx2004 opened this issue Jun 14, 2024 · 6 comments

Comments

@dyjx2004
Copy link

重现链接

Vant 版本

4.9.1

描述一下你遇到的问题。

展示预览上传图片时,不能设置横向滚动条,如果把.van-uploader__wrapper的flex-wrap设置nowrap; 并且设置固定宽度和滚动条,那么上传的图片会被压缩
QQ截图20240614134149

重现步骤

/deep/ .van-uploader__wrapper{
width: 7rem;
overflow-x: scroll;
flex-wrap: nowrap;
}

设备/浏览器

No response

Copy link

Hello @dyjx2004. Please provide an online reproduction demo by codesandbox or a minimal GitHub repository. Issues marked with need reproduce will be closed if there is no activity within 3 days. For background, please refer to Why reproductions are required.

你好 @dyjx2004, 我们需要你提供一个在线的重现示例,以便于我们帮你排查问题。你可以通过点击 codesandbox 创建,或者提供一个最小化的 GitHub 仓库。如果 3 天内未跟进,此 issue 将会被自动关闭。背景请参考 为什么需要最小重现

@dyjx2004
Copy link
Author

vite.zip
已上传附件,请查看

@dyjx2004
Copy link
Author

重现链接 https://github.com/dyjx2004/uploader.git

@chenjiahan
Copy link
Member

这个问题和 Vant 没问题,是你添加自定义样式引入的问题。

在你的 case 里,如果需要横向滚动,那么不应该使用 flex 布局

@dyjx2004
Copy link
Author

这个问题和 Vant 没问题,是你添加自定义样式引入的问题。

在你的 case 里,如果需要横向滚动,那么不应该使用 flex 布局

那请问 横向滚动应该怎样设置 因为原来van-uploader__wrapper上就是flex布局 后续官方会考虑加上横向滚动展示上去吗

@chenjiahan
Copy link
Member

你可以覆盖 flex 布局。没有计划哈

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

3 participants