1

我有 3 个不同的控制器用于 3 个菜单项,并且我为所有 3 个指定了 SelectedActions。但它总是选择所有 3 个菜单项。您能否查看以下代码并让我知道是否需要更正任何内容?

           Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
           new Manager.MenuItem()
           {
               Name = "aaa",
               Action = "Index",
               Controller = "Media",
               Permission = "ADMIN",
               SelectedActions = "Index,Edit"                                               
           });

        Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
           new Manager.MenuItem()
           {
               Name = "bbb",
               Action = "Index",
               Controller = "Attest",
               Permission = "ADMIN",
               SelectedActions = "Index"

           });

        Piranha.WebPages.Manager.Menu.Where(m => m.InternalId == "Eagle").Single().Items.Add(
           new Manager.MenuItem()
           {                  
               Name = "ccc",
               Action =  "Index",
               Controller = "Order",
               Permission = "ADMIN",
               SelectedActions = "Index,Details"
           });

即使我将所有 3 个菜单代码移到一个控制器中,行为也没有变化!

4

0 回答 0