update:优化基础组件

This commit is contained in:
JaguarJack
2021-04-20 08:45:08 +08:00
parent be91cfbc4f
commit ceb5a396d8
7 changed files with 60 additions and 7 deletions

View File

@@ -100,9 +100,9 @@ declare(strict_types=1);
{
$left = $this->total - $this->current;
$empty = str_repeat(' ', $left * $this->average);
$empty = str_repeat(' ', intval($left * $this->average));
$bar = str_repeat('>', $this->current * $this->average);
$bar = str_repeat('>', intval($this->current * $this->average));
$percent = ((int)(sprintf('%.2f', $this->current/$this->total) * 100)) . '%';