Commit 21daca93 by lanyulei

fix: 保留耗时时间小数点后两位。

parent 2b85fe96
......@@ -11,7 +11,7 @@
<span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
<span>{{ item.nickname }} ({{ item.username }})</span>
<span>
{{ item.cost_duration > 60 ? item.cost_duration / 60 + ' 分' : item.cost_duration + ' 秒' }}
{{ item.cost_duration > 60 ? Number((item.cost_duration / 60).toString().match(/^\d+(?:\.\d{0,2})?/)) + ' 分' : item.cost_duration + ' 秒' }}
</span>
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment