您好,我正在尝试有一个菜单打开时,我右击任何树列表项。基于我右键单击的元素,我需要显示一个带有选项的动态菜单。我如何才能做到这一点。我刚接触Ext7的现代工具包,正在将我的代码从Ext5迁移到Ext7。请帮助。
发布于 2019-12-10 20:14:53
元素上的contextmenu事件有效。我自己就能弄明白。
下面的代码很有帮助
{
xtype: 'treelist',
reference: 'projectMenu',
highlightPath: true,
bind: {
store: '{navItems}'
},
listeners: {
'contextmenu': {
element: 'element', //bind to the underlying element property on the panel
fn: 'onContextMenu'
}
}
}https://stackoverflow.com/questions/59261916
复制相似问题