diff --git a/packages/amis/src/renderers/Form/InputNumber.tsx b/packages/amis/src/renderers/Form/InputNumber.tsx index 42dbdcadcec..4dbd63bef64 100644 --- a/packages/amis/src/renderers/Form/InputNumber.tsx +++ b/packages/amis/src/renderers/Form/InputNumber.tsx @@ -499,7 +499,7 @@ export default class NumberControl extends React.Component< ) => { // 增加千分分隔 if (kilobitSeparator && value) { - if (userTyping) { + if (userTyping || this.input === document.activeElement) { // 如果是用户输入状态,则只进行千分隔处理,避免光标乱跳 let parts = value.toString().split('.'); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');