|
@@ -20,7 +20,7 @@ class BaseController extends Controller {
|
|
|
const menuList = ctx.isProjectController
|
|
|
? JSON.parse(JSON.stringify(this.app.menu.projectMenu))
|
|
|
: JSON.parse(JSON.stringify(this.app.menu.menu));
|
|
|
- ctx.menu = menuList[ctx.controllerName] || {};
|
|
|
+ ctx.menu = menuList[ctx.controllerName] || Object.values(menuList).find(menu => menu.controllers && menu.controllers.indexOf(ctx.controllerName) >= 0) || {};
|
|
|
ctx.title = ctx.menu.name || '';
|
|
|
if (ctx.menu && ctx.menu.children) {
|
|
|
if (ctx.menu.children[ctx.actionName]) ctx.title = ctx.menu.children[ctx.actionName].name;
|