feat(Badge): max support string type

This commit is contained in:
chenjiahan
2020-10-02 17:05:08 +08:00
parent 56c50666ce
commit 839b8654ee
7 changed files with 24 additions and 23 deletions
+1 -2
View File
@@ -6,8 +6,7 @@ export function addUnit(value?: string | number): string | undefined {
return undefined;
}
value = String(value);
return isNumeric(value) ? `${value}px` : value;
return isNumeric(value) ? `${value}px` : String(value);
}
export function getSizeStyle(originSize?: string | number) {