以下是我们尝试做的一个示例:
pMenu = new dijit.Menu({ targetNodeIds: ["NEW_APP"],leftClickToOpen: true }); pMenu.popupDelay = 100; pMenu.addChild(new dijit.PopupMenuItem({ label: "clocks",iconSrc: "image/clocks.png",onClick: dojo.hitch(core.editor,core.editor.createNewApp) }));
myMenuItem.iconNode.style.cssText =“background-image:url(…); width:16px,height:16px”;