mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(Button): add loading color when plain is true (#2746)
This commit is contained in:
parent
bfa648b13b
commit
45d0a32eab
@ -28,7 +28,7 @@
|
|||||||
custom-class="loading-class"
|
custom-class="loading-class"
|
||||||
size="{{ loadingSize }}"
|
size="{{ loadingSize }}"
|
||||||
type="{{ loadingType }}"
|
type="{{ loadingType }}"
|
||||||
color="{{ type === 'default' ? '#c9c9c9' : 'white' }}"
|
color="{{ loadingColor(type,color,plain) }}"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
wx:if="{{ loadingText }}"
|
wx:if="{{ loadingText }}"
|
||||||
@ -50,3 +50,19 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
<wxs module="loadingColor">
|
||||||
|
function get(type, color,plain) {
|
||||||
|
if(plain) {
|
||||||
|
return color ? color: '#c9c9c9';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(type === 'default') {
|
||||||
|
return '#c9c9c9';
|
||||||
|
}
|
||||||
|
return 'white';
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = get;
|
||||||
|
</wxs>
|
Loading…
x
Reference in New Issue
Block a user