我想添加一个只能接受整数而不是小数的字段。
我尝试使用 numberfield 作为
{
xtype : 'numberfield',
fieldLabel : 'number',
}
我不想使其不可编辑
有什么办法可以做到吗?
最佳答案
请尝试设置allowDecimals在数字字段上进行配置,使其看起来像:
{
xtype : 'numberfield',
fieldLabel : 'number',
allowDecimals: false
}
关于javascript - Extjs : Validation for Integers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30374656/