chore(Switch): remove inline style

This commit is contained in:
chenjiahan
2020-03-01 20:17:48 +08:00
parent df4439e9f6
commit 5d3333ca8c
4 changed files with 7 additions and 7 deletions
+1 -5
View File
@@ -1,6 +1,5 @@
// Utils
import { createNamespace, addUnit } from '../utils';
import { BLUE } from '../utils/constant';
import { switchProps } from './shared';
// Mixins
@@ -42,10 +41,7 @@ export default createComponent({
genLoading() {
if (this.loading) {
const color = this.checked
? this.activeColor || BLUE
: this.inactiveColor || '';
const color = this.checked ? this.activeColor : this.inactiveColor;
return <Loading class={bem('loading')} color={color} />;
}
},