mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-05 05:38:23 +08:00
fix: percent value should divide by 100 (#2781)
This commit is contained in:
parent
08d4994305
commit
79f9e04413
@ -13,10 +13,11 @@ export const Percent = connect(
|
||||
{...props}
|
||||
addonAfter="%"
|
||||
defaultValue={value ? math.round(value * 100, 9) : null}
|
||||
min={0}
|
||||
formatter={(v: any) => (v ? math.round(v * 100, 9) : null)}
|
||||
onChange={(v: any) => {
|
||||
if (onChange) {
|
||||
onChange(v);
|
||||
const val = v ? math.round(v / 100, 9) : 0;
|
||||
onChange(val);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user