extjs常用的items

1、改为密码框:

    {

       fieldlable:'密码',

       xtype:'textfield',

       inputType:'password'

    }

2、不可修改

   {

    fieldlable:'不可修改',

    xtype:'textfield',

   readOnly:true   

}

3、日期

{

fieldlable:'日期',

xtype:'datefield',

format:'Y/m/d'

}

4、下拉框

{

fieldlable:'选择',

xtype:'combo',

forceSelection:true,//输入值是否严格为待选列表中存在的值

editable:false,

queryMode:'local',

store:liststore  //[['gk1','国控一企'],['gk2','国控二企'],['gk3','国控三企']]

}

var listStore = Ext.create('Ext.data.Store', {
    model: 'RCP.model.customer', // Model 名
    proxy: {
        type: 'ajax',
        url: 'customer/listAction.action',
        reader: {
            type: 'json',
            root: 'list',   // Anction 中的变量
            successProperty: 'success'
        }
    },

    autoLoad: true
});
this.listStore = listStore;

5、单选
 
 
{
        xtype: 'radiogroup',
        fieldLabel: 'Two Columns',
        // Arrange radio buttons into two columns, distributed vertically
        columns: 2,
        vertical: true,
        items: [
            { boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
            { boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
            { boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
            { boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
            { boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
            { boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
        ] , 
        listeners:{
            //通过change触发
            change: function(g , newValue , oldValue){
                console.log(newValue , oldValue);
            }
        }
    }
6、多选
{
xtype:'checkboxgroup',
fieldLabel:'类型',
allowBlank:false,
items:[{
boxLabel:'贵阳',
name:'gy',
inputValue:'1',
                id:'checkbox1',
                checked:true
},{
boxLabel:'安顺',
name:'as',
inputValue:'2',
                id:'checkbox2'
}]
}
7 nunberfield
{
xtype:'numberfield',
         name:'jd',
         fieldLabel:'经度',
         allowBlank:false,
         allowDecimals:true,
         allowNegative:false,
         maxLength:7,
         decimalPrecision:4,
         decimalSeparator:'.'
}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值