0
我想水平顯示PopupMenuItem,但無法找到執行此操作的方法。水平顯示PopupMenuItem
我加入像這樣
var pSubMenu2 = new Menu();
pSubMenu2.addChild(new MenuItem({
iconClass: "dijitEditorIcon dijitEditorIconCopy"
}));
pSubMenu2.addChild(new MenuItem({
iconClass: "dijitEditorIcon dijitEditorIconCut"
}));
pMenu.addChild(new PopupMenuItem({
iconClass: "dijitEditorIcon dijitEditorIconPaste",
popup: pSubMenu2
}));
下面
是代碼
https://jsfiddle.net/agha_ali22/ntkhy9q3/2/
還有一個問題,我怎麼能隱藏unhover子菜單? – Haider
您可以將pSubMenu添加到小部件的作用域中,例如:this.pSubMenu。然後,您可以在mouseleave上添加一個事件並關閉彈出窗口。你可以看到下面的例子:https://jsfiddle.net/an90dr/27uo0hpo/ – AndreasH
即使將其懸停在其父菜單上,該隱藏子菜單並不再顯示 – Haider