Ext js numberfield 科学计数法 解决方案
//单纯numberfield
Ext.create('Ext.form.Panel', { title: 'On The Wall', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'numberfield', anchor: '100%', name: 'bottles', fieldLabel: '科学计数法', minValue: 0, decimalPrecision:12, setValue:function(v){return Number(v).toFixed(12)} }] });
//grid列输入
Ext.create('Ext.grid.Panel', { title: 'Simpsons', store: Ext.data.StoreManager.lookup('simpsonsStore'), columns: [ {text: 'Name', dataIndex: 'name',renderer:function(value){return Number(value).toFixed(12)}, field:{xtype: 'numberfield',decimalPrecision:12,setValue:function(v){return Number(v).toFixed(12)}}} ], height: 200, width: 400,
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1})], renderTo: Ext.getBody() });