fix(workbench): 移除精度配置并优化formatter消除浮点显示问题

This commit is contained in:
小蟑螂
2026-05-16 23:39:15 +08:00
parent 621a2e5785
commit ff37e9500a
@@ -125,7 +125,7 @@ const formatTaxRate = (value: null | number | string | undefined) => {
if (value === null || value === undefined || value === '') return '';
const num = Number(value);
if (!Number.isFinite(num)) return '';
return `${num * 100}%`;
return `${Math.round(num * 100 * 1e10) / 1e10}%`;
};
const parseTaxRate = (value: string | undefined) => {
@@ -362,7 +362,6 @@ onUnmounted(() => {
:min="0"
:max="1"
:step="0.01"
:precision="2"
size="small"
class="tax-rate-input !h-8 !w-20 !rounded-lg !border-none !bg-white/30 !text-center !text-sm !font-bold dark:!bg-[hsl(240deg_3.7%_22%/30%)]"
:formatter="formatTaxRate"