1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

feat(Uploader): add upload-icon props ()

This commit is contained in:
Lindy 2020-03-16 15:49:30 +08:00 committed by GitHub
parent d1d19fed91
commit 9a3b5df803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

@ -181,6 +181,7 @@ uploadFilePromise(fileName, chooseResult) {
| camera | 当 accept 为 `video` 时生效,可选值为 `back` `front` | _string_ | - | - |
| compressed | 当 accept 为 `video` 时生效,是否压缩视频,默认为`true` | _boolean_ | - | - |
| max-duration | 当 accept 为 `video` 时生效,拍摄视频最长拍摄时间,单位秒 | _number_ | - | - |
| upload-icon | 上传区域图标,可选值见 [Icon 组件](#/icon) | *string* | `plus` | - |
### Slot

@ -71,6 +71,10 @@ VantComponent({
maxDuration: {
type: Number,
value: 60
},
uploadIcon: {
type: String,
value: 'plus'
}
},

@ -49,7 +49,7 @@
style="width: {{ utils.addUnit(previewSize) }}; height: {{ utils.addUnit(previewSize) }};"
bind:tap="startUpload"
>
<van-icon name="plus" class="van-uploader__upload-icon" />
<van-icon name="{{ uploadIcon }}" class="van-uploader__upload-icon" />
<text wx:if="{{ uploadText }}" class="van-uploader__upload-text">{{ uploadText }}</text>
</view>
</block>