From 45d0a32eab52236e15ecbb42398a8fd5faede4d2 Mon Sep 17 00:00:00 2001 From: Lindy <33708359+Lindysen@users.noreply.github.com> Date: Wed, 12 Feb 2020 12:21:59 +0800 Subject: [PATCH] fix(Button): add loading color when plain is true (#2746) --- packages/button/index.wxml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/button/index.wxml b/packages/button/index.wxml index 77b49429..162010a5 100644 --- a/packages/button/index.wxml +++ b/packages/button/index.wxml @@ -28,7 +28,7 @@ custom-class="loading-class" size="{{ loadingSize }}" type="{{ loadingType }}" - color="{{ type === 'default' ? '#c9c9c9' : 'white' }}" + color="{{ loadingColor(type,color,plain) }}" /> + + + +function get(type, color,plain) { + if(plain) { + return color ? color: '#c9c9c9'; + } + + if(type === 'default') { + return '#c9c9c9'; + } + return 'white'; +} + +module.exports = get; + \ No newline at end of file