mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Switch: loading color use active-color
This commit is contained in:
parent
5cd810d480
commit
4e27ecbd99
@ -1,7 +1,8 @@
|
|||||||
import { use } from '../utils';
|
import { use } from '../utils';
|
||||||
import Loading from '../loading';
|
import { BLUE } from '../utils/color';
|
||||||
import { switchProps, SharedSwitchProps } from './shared';
|
import { switchProps, SharedSwitchProps } from './shared';
|
||||||
import { emit, inherit } from '../utils/functional';
|
import { emit, inherit } from '../utils/functional';
|
||||||
|
import Loading from '../loading';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { CreateElement, RenderContext } from 'vue/types';
|
import { CreateElement, RenderContext } from 'vue/types';
|
||||||
@ -45,7 +46,7 @@ function Switch(
|
|||||||
{...inherit(ctx)}
|
{...inherit(ctx)}
|
||||||
>
|
>
|
||||||
<div class={bem('node')}>
|
<div class={bem('node')}>
|
||||||
{loading && <Loading class={bem('loading')} />}
|
{loading && <Loading class={bem('loading')} color={props.activeColor || BLUE} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user