extjs 解决combox和datefield 上拉部份被其他层遮盖的有关问
题
快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题
c_a_3();
extjs 解决combox和datefield 下拉部份被其他层遮盖的问题
在我们使用combox和datefield 的时候,常遇到弹出的window或者是在页面中使用了蒙版的时候会被其他的div给遮盖住,以下就是我在项目中使用的一个办法:
1,先添加
Ext.WindowMgr.zseed=50000;
2,解决combox的问题
Ext.form.ComboBox.prototype.initComponent = Ext.form.ComboBox.prototype.initComponent.createSequence( function(){
this.on('render', function(){
var zindex = Ext.WindowMgr.zseed + 5000;
this.on('expand', function(){
this.list.setStyle( z-index , zindex.toString() );
},
this,
{single: true}
);
},
this,
{single: true}
);
});
3,解决DateField的问题
Ext.form.DateField.prototype.onTriggerClick=function(){
if(this.disabled){
return;
}
if(this.menu == null){
this.menu = new Ext.menu.DateMenu();
}
Ext.apply(this.menu.picker, {
minDate : this.minValue,
maxDate : this.maxValue,
disabledDatesRE : this.ddMatch,
disabledDatesText : this.disabledDatesText,
disabledDays : this.disabledDays,
disabledDaysText : this.disabledDaysText,
format : this.format,
showToday : this.showToday,
minText : String.format(this.minText, this.formatDate(this.minValue)),
maxText : String.format(this.maxText, this.formatDate(this.maxValue))
});
this.menu.on(Ext.apply({}, this.menuListeners, {
scope:this
}));
this.menu.picker.setValue(this.getValue() || new Date());
this.menu.show(this.el, tl-bl? );
//
var zindex = Ext.WindowMgr.zseed + 5000;
this.menu.el.setStyle( z-index , zindex.toString() );
//
}