ExtJS NumberField小数自动截最后0问题,不显示最后0问题, 如:102.90, 显示为:102.9问题。
使用这个覆盖:
Ext.override(Ext.form.NumberField, {
setValue : function(v){
v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, "."));
v = isNaN(v) ? '' : v.toFixed(this.decimalPrecision).replace(".", this.decimalSeparator);
return Ext.form.NumberField.superclass.setValue.call(this, v);
}
});

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-07-03
  • 2021-06-20
  • 2021-10-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-12-27
  • 2021-06-16
  • 2021-04-05
  • 2021-10-21
相关资源
相似解决方案