feat: 进度条百分比保留两位小数

This commit is contained in:
2026-06-12 09:51:42 +08:00
parent 6dee56e17f
commit 795de5ff62
3 changed files with 15 additions and 5 deletions
+5 -1
View File
@@ -18,7 +18,7 @@
class="progress"
:style="{ width: `${calcProgressPercent(v)}%` }"
></view>
<view class="progress-percent">{{ Math.round(calcProgressPercent(v)) }}%</view>
<view class="progress-percent">{{ formatProgressPercent(v) }}%</view>
</view>
</view>
<view class="first-time"
@@ -75,6 +75,10 @@
return Math.max(0, Math.min(100, pct));
};
const formatProgressPercent = (item) => {
return calcProgressPercent(item).toFixed(2);
};
const toListRecord = (item) => {
const skuId = item?.skuId ?? '';
const url =