我可以知道如何检测Ext.menu.Menu
何时是closed
/outfocus
吗?
我想有一些行动做时,菜单关闭或outfocus。
Ext.create( 'Ext.menu.Menu',
{ width : 100
, margin : '0 0 10 0'
, floating : false
, renderTo : Ext.getBody()
, items :
[ { text : 'regular item 1' }
, { text : 'regular item 2' }
, { text : 'regular item 3' }
]
}
);
1条答案
按热度按时间z5btuh9x1#
当一个支持的事件发生时,你可以使用监听器来执行一些逻辑。例如,要检测菜单是否被隐藏(就像上下文菜单被取消),你可以使用
hide
监听器。将此添加到菜单的
Ext.create
配置中:有关
Ext.menu.Menu
上可用侦听器的完整列表,请查看经典框架和现代框架的文档。