クリックするとメニューが表示されるツールバーボタンがあります。自動にしたいです。つまり、マウス ホバー時のドロップダウン メニューです。私は次のコードでこれを行いました:
xtype : 'button',
text : 'My Button',
listeners : {
mouseover : function() {
console.log('inside mouse over');
this.showMenu();
},
menushow : function() {
console.log('menu shown');
this.mouseLeaveMonitor = this.menu.el
.monitorMouseLeave(100, this.hideMenu, this);
},
destroy : function(combo) {
combo.menu.el.un(combo.mouseLeaveMonitor);
}
},
menu : [{
text : 'menu item1'
}, {
text : 'menu item2', menu : [{text : 'text 1'}, {text : 'text 2'}]
}]
さて、私のコードはドロップダウン メニューでは正常に動作しますが、サブメニューでは失敗します。誰でもこれについて助けることができますか?