feat: header mixed layout (#5263)
* feat: new layout header-mixed * fix: header-mixed layout update * feat: layout preference update * fix: extra menus follow layout setting
This commit is contained in:
@@ -21,9 +21,9 @@ function findMenuByPath(
|
||||
* @param menus
|
||||
* @param path
|
||||
*/
|
||||
function findRootMenuByPath(menus: MenuRecordRaw[], path?: string) {
|
||||
function findRootMenuByPath(menus: MenuRecordRaw[], path?: string, level = 0) {
|
||||
const findMenu = findMenuByPath(menus, path);
|
||||
const rootMenuPath = findMenu?.parents?.[0];
|
||||
const rootMenuPath = findMenu?.parents?.[level];
|
||||
const rootMenu = rootMenuPath
|
||||
? menus.find((item) => item.path === rootMenuPath)
|
||||
: undefined;
|
||||
|
Reference in New Issue
Block a user