perf: enable strict ts type checking (#4045)

This commit is contained in:
Vben
2024-08-05 21:12:22 +08:00
committed by GitHub
parent e5ec8e6b51
commit 4f5783d00b
41 changed files with 124 additions and 76 deletions

View File

@@ -22,17 +22,19 @@ function generatorColorVariables(colorItems: ColorItem[]) {
colorKeys.forEach((key) => {
const colorValue = colorsMap[key];
const hslColor = convertToHslCssVar(colorValue);
colorVariables[`--${name}-${key}`] = hslColor;
if (alias) {
colorVariables[`--${alias}-${key}`] = hslColor;
}
if (colorValue) {
const hslColor = convertToHslCssVar(colorValue);
colorVariables[`--${name}-${key}`] = hslColor;
if (alias) {
colorVariables[`--${alias}-${key}`] = hslColor;
}
if (key === '500') {
mainColor = hslColor;
if (key === '500') {
mainColor = hslColor;
}
}
});
if (alias) {
if (alias && mainColor) {
colorVariables[`--${alias}`] = mainColor;
}
}