feat: 进度条百分比保留两位小数
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user