fix: when borderRaidus is a string, the component displays an exception (#4102)

This commit is contained in:
Vben
2024-08-09 23:43:32 +08:00
committed by GitHub
parent 992b9bae6c
commit 344c499462

View File

@@ -56,7 +56,9 @@ export function useAntdDesignTokens() {
tokens.colorBgBase = getCssVariableValue('--background');
tokens.borderRadius = getCssVariableValue('--radius', false);
const radius = Number.parseFloat(getCssVariableValue('--radius', false));
// 1rem = 16px
tokens.borderRadius = radius * 16;
tokens.colorBgLayout = getCssVariableValue('--background-deep');
tokens.colorBgMask = getCssVariableValue('--overlay');