fix(projects): 修复vertical sider自适应主题

This commit is contained in:
Soybean
2021-10-15 12:02:53 +08:00
parent e1e5579e8f
commit 9097fa3866
19 changed files with 227 additions and 143 deletions

View File

@ -23,3 +23,12 @@ export function shallowColor(color: string, alpha: number = 0.5) {
export function darkenColor(color: string) {
return chroma(color).darken(0.5).hex();
}
/**
* 给颜色加透明度
* @param color - 颜色
* @param alpha - 透明度
*/
export function addColorAlpha(color: string, alpha: number) {
return chroma(color).alpha(alpha).hex();
}

View File

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

View File

@ -24,6 +24,7 @@ export {
brightenColor,
shallowColor,
darkenColor,
addColorAlpha,
dynamicIconRender
} from './common';