如何在数值类型为

在类似下面的代码段的情况下,我应该如何处理状态类型为NaN的{​​{1}}。

服务器发送对象数组:

number

因此,此处的空输入将产生interface MyInterface {id:number,amount:number,score:number} // The received data is of type MyInterface[] NaNWarning: Received NaN for the

如果我检查情况 attribute. If this is expected,cast the value to a string.应该更新什么状态?通常,在这种情况下,我怎么能有空的isnaN(parseInt(e.target.value))

input
zhaozhixuan 回答:如何在数值类型为

这真的很烦人。我们自己解决了这个问题,我能想出的唯一解决方案是禁止向用户显示此特定错误。

本文链接:https://www.f2er.com/2876957.html

大家都在问