Sencha touch sencha touch 2pr4-xtype:passwordfield属性仅适用于数字

Sencha touch sencha touch 2pr4-xtype:passwordfield属性仅适用于数字,sencha-touch,extjs,validation,sencha-touch-2,Sencha Touch,Extjs,Validation,Sencha Touch 2,在sencha touch 2pr4中, 是否可以为输入(xtype:passwordfield)设置一些只接受与(xtype:numberfield)相同数字的属性 因此,它不会在每次您必须填写PIN字段时将键盘设置为alpha字符 示例输入 { xtype: 'fieldset', defaults: { margin: '0 3 0 3' }, layout: 'hbox', items: [ { xtype: 'passwordfield',

在sencha touch 2pr4中, 是否可以为输入(xtype:passwordfield)设置一些只接受与(xtype:numberfield)相同数字的属性

因此,它不会在每次您必须填写PIN字段时将键盘设置为alpha字符

示例输入

    {
xtype: 'fieldset',
defaults: {
    margin: '0 3 0 3'
    },
layout: 'hbox',
items: [
    {
    xtype: 'passwordfield', 
    maxLength: 1,
    name : 'pin1',
    useClearIcon: false,
    autoCapitalize : false,
    flex: 1,
    index: 1
    }]
}
修改sencha-touch.js?

Ext.define('Ext.field.Password', {
    extend: 'Ext.field.Text',
    alias : 'widget.passwordfield',
    alternateClassName: 'Ext.form.Password',

    config: {
        // @inherit
        autoCapitalize: false,

        // @inherit
        component: {
            type: 'password' // is there alternative ? 

              // changing field onFocus to type:number and back to star* character ?
        }
    }});

看起来您可以扩展普通文本或密码字段并获得数字键盘,看看sencha论坛上提供的解决方案: