vboot 添加菜单的错误处理方法 错误提示为: Invalid route component 请正确配置路由:Ass的component属性

vboot 添加菜单的错误处理方法  错误提示为:Invalid route component 请正确配置路由:Ass的component属性

1、原因:添加类型为目录(D)时,属性comp没有赋值,应为“LAYOUT”

2、处理方法:修改SysAuthMenuApi.cs 的两个方法如下

        public async Task Post(SysAuthMenu menu)
        {
            menu.id = YitIdHelper.NextId() + "";
            if (menu.type == "D")
            {
                menu.comp = "LAYOUT";
            }
            await _service.InsertAsync(menu);
        }

        public async Task Put(SysAuthMenu menu)
        {
            if (menu.type == "D")
            {
                menu.comp = "LAYOUT";
            }
            await _service.UpdateAsync(menu);
        }

 

posted @ 2022-05-01 08:42  中国结  阅读(1726)  评论(0编辑  收藏  举报