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

feat(van-uploader) add preview-size prop type #4798

Merged
merged 1 commit into from
Mar 27, 2022
Merged

Conversation

BajaXX
Copy link
Contributor

@BajaXX BajaXX commented Feb 17, 2022

van-uploader 组件新增preview-size属性类型支持Array,String[]或者String,实现自定义宽高

example:

<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" preview-size="{{[450,250]}}" />
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead" preview-size="100" />

@kxbin
Copy link
Contributor

kxbin commented Mar 14, 2022

我觉得直接开放widthheight这个方案,相比于让preview-size支持数组类型,应该会更好一些。

因为preview-size数组类型不太符合用户的直觉,比如image组件就是开放widthheight参数的。

详见 #4839

@chenjiahan
Copy link
Member

我觉得 preview-size 支持数组格式是蛮合适的,props 太多也不太好

@chenjiahan chenjiahan merged commit 52aa2f0 into youzan:dev Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants