mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[improvement] extract padZero utils
This commit is contained in:
@@ -58,3 +58,7 @@ export function suffixPx(value?: string | number): string | undefined {
|
||||
value = String(value);
|
||||
return isNumber(value) ? `${value}px` : value;
|
||||
}
|
||||
|
||||
export function padZero(num: number | string): string {
|
||||
return (num < 10 ? '0' : '') + num;
|
||||
}
|
||||
|
Reference in New Issue
Block a user