您的位置:首页 > Web前端 > JavaScript

extjs-添加对应的组件

2017-08-16 13:54 260 查看
1.添加按钮:
                           margin: '10 20 0 80',
                            xtype: 'button',
                           text: '搜索',
                            width: 80,
                            itemId:'queryItemId',
                            // enableToggle:true,
                            handler:dciGlobeCoordinate.StartQuery
 
2.添加文本框:
                           xtype: 'textfield',
                            margin: '10 0 0 5',
                           fieldLabel: 'x坐标',
                            editable: false,
                            width: 220,
                            labelWidth: 40,
                            allowBlank:false,        //不允许为空
                           blankText: '请输入x坐标',
                            regex:/^\d+(\.\d{1,20})?$/,//允许出现小数点后20位
                           regexText: '请输入数字',
                            shadow: false,
                            listeners: {
                                change:function (textfield, value) {
}
}
 
添加时间field
                            xtype: 'datefield',
                            margin: '3 0 0 5',
                            itemId:'dateItemId',
                           fieldLabel: '日期',
                            minDate:'1/1/1800',
                            format: 'Y/m/d',
                           invalidText: '日期格式无效',
                            editable: false,
                            width: 235,
                            labelWidth: 60,
                            shadow:false,
                            listeners: {
                                //'change':'onAnalysisParamChange'
                            }
 
添加数字field
                         
 xtype: 'timefield',
                            margin: '3 0 0 5',
                            itemId:'timeItemId',
                           fieldLabel: '时间',
                           invalidText: '时间格式无效',
                            format: 'H:i:s',
                            increment: 30,
                            editable: false,
                            width: 235,
                            labelWidth: 60,
                            shadow: false,
                            listeners: {
                                //'change':'onAnalysisParamChange'
                            }
 
 
3.添加checkbox
                                   xtype: 'checkbox',
                                     //padding:10,
                                     margins:'0 0 0 10',
                                     itemId:'openUndergroundModeItemId',
                                     //bind: {
                                     //    checked: '{isCirculation}'
                                     //},
                                     checked:true,
                                    boxLabel: '地下模式',
                                     handler:dciGlobeUnderGround.openUndergroundMode
 
4.添加进度条
 
                                     xtype:'slider',
                                     itemId:'sliderId',
                                     margin:'10 5 10 5',
                                    fieldLabel: '透明度',
                                    minvalue:0,
                                    maxvalue:255,
                                     width:211,
                                    labelWidth: 60,
                                     shadow:false,
                                     listeners:{
                                       
                                        'change': function (slider, value) {
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: