dotnetcore / osharp

OSharp是一个基于.Net6.0的快速开发框架,框架对 AspNetCore 的配置、依赖注入、日志、缓存、实体框架、Mvc(WebApi)、身份认证、功能权限、数据权限等模块进行更高一级的自动化封装,并规范了一套业务实现的代码结构与操作流程,使 .Net 框架更易于应用到实际项目开发中。
Apache License 2.0
2.78k stars 752 forks source link

新加的Area不能生成中文权限列表,只是默认的Area名称 #92

Closed s641135196 closed 5 years ago

s641135196 commented 5 years ago

新加个area名称WorkOrder不能设置为中文 image

再加了个控制器,生成的权限菜单, image

如果要让WorkOrder变成中文“工单模块”, 得在源代码增加红色框代码。 image

gmf520 commented 5 years ago

https://github.com/i66soft/osharp-docs-samples/blob/master/samples/Liuliu.Blogs/src/Liuliu.Blogs.Web/Areas/Admin/Controllers/Blogs/BlogController.cs#L26

s641135196 commented 5 years ago

这样有试的, 不行的了, 在默认的Admin area下是没问题的。 因为我是新加的area. 这个area名称不能自定义为中文。

gmf520 commented 5 years ago

添加一个 AreaInfoAttribute 特性类,用于代替 AreaAttribute 添加区域信息,支持区域的Display中文显示

    [AreaInfo("Admin", Display = "管理")]
    [RoleLimit]
    public abstract class AdminApiController : AreaApiController
    { }
qinqoushui commented 4 years ago

物理新增Area的话,会涉及到很多修改。