feature:菜单添加unbindParent属性支持不关联上级菜单
This commit is contained in:
@@ -86,6 +86,11 @@ namespace Ewide.Core.Service
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 不绑定上级菜单
|
||||
/// </summary>
|
||||
public int UnbindParent { get; set; }
|
||||
}
|
||||
|
||||
public class AddMenuInput : MenuInput
|
||||
|
||||
@@ -182,6 +182,7 @@ namespace Ewide.Core.Service
|
||||
var router = input.Router;
|
||||
var permission = input.Permission;
|
||||
var openType = input.OpenType;
|
||||
var isUnbindParent = input.UnbindParent==1;
|
||||
|
||||
if (type.Equals((int)MenuType.DIR))
|
||||
{
|
||||
@@ -207,6 +208,11 @@ namespace Ewide.Core.Service
|
||||
//if (!urlSet.Contains(permission.Replace(":","/")))
|
||||
// throw Oops.Oh(ErrorCode.meu1005);
|
||||
}
|
||||
//按钮可以设置未不绑定菜单
|
||||
if(isUnbindParent && type.Equals((int)MenuType.BTN))
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.D4004);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user