mirror of https://github.com/abpframework/abp.git
committed by
GitHub
17 changed files with 192 additions and 158 deletions
@ -1,31 +1,29 @@ |
|||||
<div class="row justify-content-end mx-0 gap-2" id="AbpContentToolbar"> |
<div class="row justify-content-end mx-0 gap-2" id="AbpContentToolbar"> |
||||
<div |
@for (action of actionList; track action.component || action.action; let last = $last) { |
||||
class="col-auto px-0 pt-0 " |
<div class="col-auto px-0 pt-0" [class.pe-0]="last"> |
||||
[class.pe-0]="last" |
@if (action.visible(data)) { |
||||
*ngFor="let action of actionList; trackBy: trackByFn; let last = last" |
<ng-container *abpPermission="action.permission; runChangeDetection: false"> |
||||
> |
@if (action.component; as component) { |
||||
<ng-container *ngIf="action.visible(data)"> |
<ng-container |
||||
<ng-container *abpPermission="action.permission;runChangeDetection: false"> |
*ngComponentOutlet="component; injector: record | createInjector: action:this" |
||||
<ng-container *ngIf="action.component as component; else button"> |
></ng-container> |
||||
<ng-container |
|
||||
*ngComponentOutlet="component; injector: record | createInjector: action:this" |
|
||||
></ng-container> |
|
||||
</ng-container> |
|
||||
|
|
||||
<ng-template #button> |
}@else { |
||||
<ng-container *ngIf="asToolbarAction(action).value as toolbarAction"> |
@if (asToolbarAction(action).value; as toolbarAction ) { |
||||
<button |
<button |
||||
(click)="action.action(data)" |
(click)="action.action(data)" |
||||
type="button" |
type="button" |
||||
[ngClass]="toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass" |
[ngClass]="toolbarAction?.btnClass ? toolbarAction?.btnClass : defaultBtnClass" |
||||
class="d-inline-flex align-items-center gap-1" |
class="d-inline-flex align-items-center gap-1" |
||||
> |
> |
||||
<i [ngClass]="toolbarAction.icon" [class.me-1]="toolbarAction.icon"></i> |
<i [ngClass]="toolbarAction?.icon" [class.me-1]="toolbarAction?.icon"></i> |
||||
{{ toolbarAction.text | abpLocalization }} |
{{ toolbarAction?.text | abpLocalization }} |
||||
</button> |
</button> |
||||
</ng-container> |
} |
||||
</ng-template> |
} |
||||
</ng-container> |
|
||||
</ng-container> |
</ng-container> |
||||
|
} |
||||
</div> |
</div> |
||||
|
} |
||||
</div> |
</div> |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue