Extjs中numberfield小数位数设置


在默认的情况下,使用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 }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM