Browse Source
Merge pull request #23857 from abpframework/auto-merge/rel-9-3/4009
Merge branch rel-10.0 with rel-9.3
pull/23859/head
Ma Liming
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
12 additions and
2 deletions
-
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts
|
|
|
@ -1,4 +1,13 @@ |
|
|
|
import { Component, inject, isDevMode, Type } from '@angular/core'; |
|
|
|
import { |
|
|
|
Component, |
|
|
|
inject, |
|
|
|
input, |
|
|
|
isDevMode, |
|
|
|
OnInit, |
|
|
|
Optional, |
|
|
|
SkipSelf, |
|
|
|
Type, |
|
|
|
} from '@angular/core'; |
|
|
|
import { ActivatedRoute, Router } from '@angular/router'; |
|
|
|
import { eLayoutType } from '../enums/common'; |
|
|
|
import { ABP } from '../models'; |
|
|
|
@ -30,6 +39,7 @@ export class DynamicLayoutComponent { |
|
|
|
layoutKey?: eLayoutType; |
|
|
|
readonly layouts = inject(DYNAMIC_LAYOUTS_TOKEN); |
|
|
|
isLayoutVisible = true; |
|
|
|
readonly defaultLayout = input<eLayoutType>(undefined); |
|
|
|
|
|
|
|
protected readonly router = inject(Router); |
|
|
|
protected readonly route = inject(ActivatedRoute); |
|
|
|
@ -89,7 +99,7 @@ export class DynamicLayoutComponent { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return expectedLayout; |
|
|
|
return expectedLayout ?? this.defaultLayout(); |
|
|
|
} |
|
|
|
|
|
|
|
showLayoutNotFoundError(layoutName: string) { |
|
|
|
|