extjs numberfield 不允许输入负数

allowExponential: false

Ext.application({ name : 'Fiddle', launch : function() { Ext.create('Ext.form.Panel', { title: 'On The Wall', width: 300, bodyPadding: 10, renderTo: Ext.getBody(), items: [{ xtype: 'numberfield', anchor: '100%', name: 'bottles', fieldLabel: 'Bottles of Beer', value: 99, maxValue: 99, minValue: 0, allowExponential: false, allowDecimals: true }], buttons: [{ text: 'Take one down, pass it around', handler: function() { this.up('form').down('[name=bottles]').spinDown(); } }] }); } });
posted on 2022-07-26 17:02  wakaka_wka  阅读(204)  评论(0编辑  收藏  举报