We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
uploader
width
height
现在uploader组件有个参数叫做preview-size。
preview-size
目前uploader是将宽高都设定为preview-size指定的大小,也即宽高相同,这样的话uploader就只能是一个正方形区域。
如果我们能开放width和height参数的话,会使其更加灵活,而不仅仅只能做成正方形。
比如现在的image组件,就是支持width和height参数的。
image
<van-uploader width="200px" height="100px" />
考虑到老版本用户代码里可能有很多的preview-size,所以preview-size参数也会继续保留。
底层实现上,如果用户有指定width或height的话,就忽略preview-size。
没有指定width或height的话,就使用preview-size顶替
The text was updated successfully, but these errors were encountered:
搜索到目前有一个相关 PR #4798
Sorry, something went wrong.
相关 PR 已合并
No branches or pull requests
这个功能解决了什么问题
现在
uploader
组件有个参数叫做preview-size
。目前
uploader
是将宽高都设定为preview-size
指定的大小,也即宽高相同,这样的话uploader
就只能是一个正方形区域。如果我们能开放
width
和height
参数的话,会使其更加灵活,而不仅仅只能做成正方形。比如现在的
image
组件,就是支持width
和height
参数的。建议的API是什么样的
兼容性考虑
考虑到老版本用户代码里可能有很多的
preview-size
,所以preview-size
参数也会继续保留。底层实现上,如果用户有指定
width
或height
的话,就忽略preview-size
。没有指定
width
或height
的话,就使用preview-size
顶替The text was updated successfully, but these errors were encountered: