fix(components): 修复按钮Tab自适应主题颜色

This commit is contained in:
Soybean
2021-10-14 18:21:17 +08:00
parent 8ba8a4feac
commit 3d1f41925d
9 changed files with 73 additions and 11 deletions

View File

@ -8,6 +8,14 @@ export function brightenColor(color: string) {
return chroma(color).brighten(0.5).hex();
}
/**
* 更浅的颜色
* @param color
*/
export function shallowColor(color: string, alpha: number = 0.5) {
return chroma(color).alpha(alpha).hex();
}
/**
* 更暗的颜色
* @param color

View File

@ -12,6 +12,6 @@ export {
isMap
} from './typeof';
export { brightenColor, darkenColor } from './color';
export { brightenColor, shallowColor, darkenColor } from './color';
export { dynamicIconRender } from './icon';

View File

@ -22,6 +22,7 @@ export {
isSet,
isMap,
brightenColor,
shallowColor,
darkenColor,
dynamicIconRender
} from './common';