fix: usage percent style

This commit is contained in:
dongchengjie
2024-07-07 18:08:02 +08:00
parent 18196c4a77
commit ee56080af0
2 changed files with 8 additions and 3 deletions

View File

@@ -73,7 +73,10 @@ export const ProfileItem = (props: Props) => {
const from = parseUrl(itemData.url);
const description = itemData.desc;
const expire = parseExpire(extra?.expire);
const progress = Math.round(((download + upload) * 100) / (total + 0.01) + 1);
const progress = Math.min(
Math.round(((download + upload) * 100) / (total + 0.01)) + 1,
100
);
const loading = loadingCache[itemData.uid] ?? false;