enhance: navigation optimization
This commit is contained in:
parent
04c01b6780
commit
12b1d08ea4
3 changed files with 13 additions and 4 deletions
|
@ -12,7 +12,14 @@ export async function abilityAndNavUpdate(to: any, from: any, next: any) {
|
|||
let section = to.meta.section;
|
||||
let module = to.meta.module;
|
||||
|
||||
if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
|
||||
if (to.name == "admin-default") {
|
||||
navigation.activeNavigation = "club";
|
||||
navigation.activeLink = null;
|
||||
navigation.updateTopLevel();
|
||||
navigation.updateNavigation();
|
||||
NProgress.done();
|
||||
next();
|
||||
} else if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
|
||||
NProgress.done();
|
||||
navigation.activeNavigation = to.name.split("-")[1];
|
||||
navigation.activeLink = to.name.split("-")[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue