2013-06-18 112 views
3

我使用dijit/form/DropDownButton創建了Dojo DropDownButton,並使用dijit/MenuItem創建了MenuItems。我正在嘗試爲MenuItems創建子菜單項,以便很好地組織選項,並且用戶可以從中進行選擇。 有沒有辦法做到這一點,這樣的下拉選項是這樣的:如何使用dojo dijit/form/DropDownButton將子菜單項添加到菜單項?

Vegetables 
     Carrots 
     Potatoes 
     Tomatoes 
    Fruits 
     Apples 
     Oranges 

,而不是這個(我目前擁有):

Vegetables 
    Carrots 
    Potatoes 
    Tomatoes 
    Fruits 
    Apples 
    Oranges 

回答

相關問題