fix(user-center): 防止大额资产金额断行
This commit is contained in:
@@ -83,6 +83,8 @@ final class AssetAmount {
|
||||
if ($this->asset === AssetType::POINTS) {
|
||||
return number_format_i18n($this->minor);
|
||||
}
|
||||
return $this->decimal();
|
||||
global $wp_locale;
|
||||
$decimal_point = isset($wp_locale->number_format['decimal_point']) ? $wp_locale->number_format['decimal_point'] : '.';
|
||||
return number_format_i18n(intdiv($this->minor, 100)) . $decimal_point . sprintf('%02d', $this->minor % 100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user