在默认的情况下,使用numberfield控件时只会显示两位小数,有的时候需要根据业务来确定显示小数的位数。通过设置下面的属性可以达到我们想要的目的:

 1 text : '存煤量(万吨)',
 2 dataIndex : 'amount',
 3 sortable : true,
 4 align : 'center',
 5 width : 150,
 6 editor : {
 7     xtype : 'numberfield',
 8     decimalPrecision: 5,//这里设置保留5为小数
 9     minValue : 0
10 }

 

相关文章: