[new feature] Uploader: support maxSize prop (#575)

This commit is contained in:
neverland
2018-01-24 20:28:53 +08:00
committed by GitHub
parent 8f97bc9f0f
commit c89d82afc9
5 changed files with 97 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
<demo-section>
<demo-block :title="$t('basicUsage')">
<div class="demo-uploader-container">
<van-uploader :after-read="logContent">
<van-uploader :max-size="102400" @oversize="logContent('oversize')">
<van-icon name="photograph" />
</van-uploader>
</div>
@@ -10,7 +10,7 @@
<demo-block :title="$t('title2')">
<div class="demo-uploader-container">
<van-uploader :after-read="logContent" accept="image/gif, image/jpeg" multiple>
<van-uploader accept="image/gif, image/jpeg" multiple :max-size="36000" @oversize="logContent">
<van-icon name="photograph" />
</van-uploader>
</div>