1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-24 10:22:36 +08:00

[improvement] Loading: optimize circular icon ()

This commit is contained in:
neverland 2018-12-25 20:53:36 +08:00 committed by GitHub
parent 84b0333350
commit 631e7e3c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions
packages

@ -20,8 +20,8 @@
> >
<van-loading <van-loading
wx:if="{{ loading }}" wx:if="{{ loading }}"
size="20px"
custom-class="loading-class" custom-class="loading-class"
size="{{ size === 'mini' ? '14px' : '20px' }}"
color="{{ type === 'default' ? '#c9c9c9' : '' }}" color="{{ type === 'default' ? '#c9c9c9' : '' }}"
/> />
<slot wx:else /> <slot wx:else />

@ -2,7 +2,6 @@
.van-loading { .van-loading {
z-index: 0; z-index: 0;
font-size: 0;
line-height: 0; line-height: 0;
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -24,8 +23,8 @@
&--circular { &--circular {
border: 1px solid; border: 1px solid;
border-radius: 100%; border-radius: 100%;
border-color: currentColor; border-color: transparent;
border-top-color: transparent; border-top-color: currentColor
} }
} }
@ -48,7 +47,6 @@
} }
} }
.generate(@n, @i: 1) when (@i =< @n) { .generate(@n, @i: 1) when (@i =< @n) {
.van-loading__dot:nth-of-type(@{i}) { .van-loading__dot:nth-of-type(@{i}) {
opacity: 1 - (0.75 / 12) * (@i - 1); opacity: 1 - (0.75 / 12) * (@i - 1);