提交代码

master
胡锐 7 months ago
parent 9d8ed38e5c
commit 2901e848c4
  1. 2
      src/app/pages/body/index/index.component.html
  2. 4
      src/app/pages/body/index/index.component.ts

@ -46,7 +46,7 @@
<li nz-submenu nzOpen *ngFor="let item of leftMenuData" nzTitle="{{item.menuName}}" nzIcon="{{item.menuUrlImg}}" >
<ul>
<li nz-menu-item nzMatchRouter *ngFor="let childMenu of item['childMenuList']">
<a [routerLink]="[item['menuUrl'], childMenu['menuUrl']]" [queryParams]="{title: childMenu['menuName']}">{{childMenu['menuName']}}</a>
<a [routerLink]="[currentParentMenu['menuUrl'], childMenu['menuUrl']]" [queryParams]="{title: childMenu['menuName']}">{{childMenu['menuName']}}</a>
</li>
</ul>
</li>

@ -66,6 +66,9 @@ export class IndexComponent {
// 侧边菜单展示开关
isCollapse = true;
// 当前顶级菜单
currentParentMenu: any = {};
constructor(
private storage: BrowserStorageService,
private message: NzMessageService,
@ -87,6 +90,7 @@ export class IndexComponent {
this.router.navigateByUrl('/admin/index').finally();
}
this.currentParentMenu = item;
this.leftMenuData = item['childMenuList'];
this.isCollapse = item['menuName'] === '首页';

Loading…
Cancel
Save