fix(Uploader): incorrect default size and loading style (#3317)

This commit is contained in:
neverland 2020-06-24 17:55:42 +08:00 committed by GitHub
parent b4cfcceca8
commit 82b9356315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -138,6 +138,6 @@
&__loading { &__loading {
width: @uploader-loading-icon-size; width: @uploader-loading-icon-size;
height: @uploader-loading-icon-size; height: @uploader-loading-icon-size;
color: @uploader-loading-icon-color; color: @uploader-loading-icon-color !important;
} }
} }

View File

@ -12,7 +12,7 @@ VantComponent({
beforeRead: null, beforeRead: null,
previewSize: { previewSize: {
type: null, type: null,
value: 90, value: 80,
}, },
name: { name: {
type: [Number, String], type: [Number, String],
@ -78,9 +78,7 @@ VantComponent({
? isImageFile(item) ? isImageFile(item)
: item.isImage, : item.isImage,
deletable: deletable:
typeof item.deletable === 'undefined' typeof item.deletable === 'undefined' ? true : item.deletable,
? true
: item.deletable,
})); }));
this.setData({ lists, isInCount: lists.length < maxCount }); this.setData({ lists, isInCount: lists.length < maxCount });
}, },

View File

@ -34,8 +34,8 @@
class="van-uploader__mask" class="van-uploader__mask"
> >
<van-icon wx:if="{{ item.status === 'failed' }}" name="warning-o" class="van-uploader__mask-icon" /> <van-icon wx:if="{{ item.status === 'failed' }}" name="warning-o" class="van-uploader__mask-icon" />
<van-loading wx:else class="van-uploader__loading" /> <van-loading wx:else custom-class="van-uploader__loading" />
<text wx:if="{{ item.message }}" class="van-uploader__upload-text">{{ item.message }}</text> <text wx:if="{{ item.message }}" class="van-uploader__mask-message">{{ item.message }}</text>
</view> </view>
<view <view
wx:if="{{ deletable && item.deletable }}" wx:if="{{ deletable && item.deletable }}"