feat(Image): adjust icon size to 36px (#3724)

This commit is contained in:
neverland 2020-11-02 19:19:18 +08:00 committed by GitHub
parent 76acc72e20
commit 71bd97d8c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 3 deletions

View File

@ -4,7 +4,7 @@ page {
.text { .text {
width: 100%; width: 100%;
margin-top: 5px; margin: 5px 0 20px;
color: #7d7e80; color: #7d7e80;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;

View File

@ -277,6 +277,10 @@
@image-placeholder-text-color: @gray-6; @image-placeholder-text-color: @gray-6;
@image-placeholder-font-size: @font-size-md; @image-placeholder-font-size: @font-size-md;
@image-placeholder-background-color: @background-color; @image-placeholder-background-color: @background-color;
@image-loading-icon-size: 32px;
@image-loading-icon-color: @gray-4;
@image-error-icon-size: 32px;
@image-error-icon-color: @gray-4;
// Info // Info
@info-size: 16px; @info-size: 16px;

View File

@ -35,4 +35,14 @@
.theme(font-size, '@image-placeholder-font-size'); .theme(font-size, '@image-placeholder-font-size');
.theme(background-color, '@image-placeholder-background-color'); .theme(background-color, '@image-placeholder-background-color');
} }
&__loading-icon {
.theme(color, '@image-loading-icon-color');
.theme(font-size, '@image-loading-icon-size') !important;
}
&__error-icon {
.theme(color, '@image-error-icon-color');
.theme(font-size, '@image-error-icon-size') !important;
}
} }

View File

@ -21,13 +21,13 @@
class="loading-class van-image__loading" class="loading-class van-image__loading"
> >
<slot wx:if="{{ useLoadingSlot }}" name="loading" /> <slot wx:if="{{ useLoadingSlot }}" name="loading" />
<van-icon wx:else name="photo-o" size="22" /> <van-icon wx:else name="photo" custom-class="van-image__loading-icon" />
</view> </view>
<view <view
wx:if="{{ error && showError }}" wx:if="{{ error && showError }}"
class="error-class van-image__error" class="error-class van-image__error"
> >
<slot wx:if="{{ useErrorSlot }}" name="error" /> <slot wx:if="{{ useErrorSlot }}" name="error" />
<van-icon wx:else name="warning-o" size="22" /> <van-icon wx:else name="photo-fail" custom-class="van-image__error-icon" />
</view> </view>
</view> </view>