[improvement] Switch: loading color use active-color

This commit is contained in:
陈嘉涵 2019-05-10 19:53:38 +08:00
parent 5cd810d480
commit 4e27ecbd99

View File

@ -1,7 +1,8 @@
import { use } from '../utils';
import Loading from '../loading';
import { BLUE } from '../utils/color';
import { switchProps, SharedSwitchProps } from './shared';
import { emit, inherit } from '../utils/functional';
import Loading from '../loading';
// Types
import { CreateElement, RenderContext } from 'vue/types';
@ -45,7 +46,7 @@ function Switch(
{...inherit(ctx)}
>
<div class={bem('node')}>
{loading && <Loading class={bem('loading')} />}
{loading && <Loading class={bem('loading')} color={props.activeColor || BLUE} />}
</div>
</div>
);