mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-24 02:16:16 +08:00
feat(Uploader): add upload-icon props (#2869)
This commit is contained in:
parent
d1d19fed91
commit
9a3b5df803
@ -181,6 +181,7 @@ uploadFilePromise(fileName, chooseResult) {
|
|||||||
| camera | 当 accept 为 `video` 时生效,可选值为 `back` `front` | _string_ | - | - |
|
| camera | 当 accept 为 `video` 时生效,可选值为 `back` `front` | _string_ | - | - |
|
||||||
| compressed | 当 accept 为 `video` 时生效,是否压缩视频,默认为`true` | _boolean_ | - | - |
|
| compressed | 当 accept 为 `video` 时生效,是否压缩视频,默认为`true` | _boolean_ | - | - |
|
||||||
| max-duration | 当 accept 为 `video` 时生效,拍摄视频最长拍摄时间,单位秒 | _number_ | - | - |
|
| max-duration | 当 accept 为 `video` 时生效,拍摄视频最长拍摄时间,单位秒 | _number_ | - | - |
|
||||||
|
| upload-icon | 上传区域图标,可选值见 [Icon 组件](#/icon) | *string* | `plus` | - |
|
||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
|
@ -71,6 +71,10 @@ VantComponent({
|
|||||||
maxDuration: {
|
maxDuration: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: 60
|
value: 60
|
||||||
|
},
|
||||||
|
uploadIcon: {
|
||||||
|
type: String,
|
||||||
|
value: 'plus'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
style="width: {{ utils.addUnit(previewSize) }}; height: {{ utils.addUnit(previewSize) }};"
|
style="width: {{ utils.addUnit(previewSize) }}; height: {{ utils.addUnit(previewSize) }};"
|
||||||
bind:tap="startUpload"
|
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>
|
<text wx:if="{{ uploadText }}" class="van-uploader__upload-text">{{ uploadText }}</text>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user