例子地址:http://www.17ext.com/demo/ext-core-3.0-beta1/examples/combo/
下面是我的解决方法:
1.修改menu.css
.ux-menu.ux-menu-horizontal-top .ux-menu-arrow {
width: 8px;
height: 6px;
top: 13px;
background: url(images/menu-arrow-top.png) no-repeat;
}
2.修改menu.js第180行
if(this.direction == 'horizontal' && item.hasClass('ux-menu-item-main')) {
y = item.getHeight()+1;
}
else
if(this.direction == 'horizontal-top' && item.hasClass('ux-menu-item-main')) {
var submenu = menu.select('>li');
var howmany =0;
var internal =false;
submenu.each(function(item) {
howmany++;
});
y = item.getHeight()*(-1)*howmany;
x = 0;
}
else {
if(this.direction == 'horizontal-top') {
var submenu = menu.select('>li');
var howmany =0;
var internal =false;
submenu.each(function(item) {
howmany++;
});
y = item.getHeight()*(-1)*(howmany-1);
}
x = item.getWidth()+1;
}
3.下面我们来调用new Ext.ux.Menu('example-horizontal-menu', {
transitionType: 'slide',
direction: 'horizontal-top', //This is what i changed
delay: 0.2, // default
autoWidth: true, // default
transitionDuration: 0.3, // default
animate: true, // default
currentClass: 'current' // default
});
效果图:

声明:本站教程文章版权为一起Ext(http://www.17ext.com/)所有,转载请注明出处