ant-design-vue/components/progress/utils.ts
2020-10-17 20:52:58 +08:00

10 lines
169 B
TypeScript

export function validProgress(progress?: number) {
if (!progress || progress < 0) {
return 0;
}
if (progress > 100) {
return 100;
}
return progress;
}