|
|
|
@ -120,23 +120,35 @@
|
|
|
|
|
<label class="overflowText" style="font-weight: 550;">素材库</label> |
|
|
|
|
</div> |
|
|
|
|
<div style="flex: 1;overflow-y: auto;" [hidden]="!toggleMaterialBank"> |
|
|
|
|
<mat-accordion *ngFor="let item of allLibrary" id="panelLibrary"> |
|
|
|
|
<mat-expansion-panel (opened)='opened(item)'> |
|
|
|
|
<mat-expansion-panel-header> |
|
|
|
|
<label class="text">{{item.name}}</label> |
|
|
|
|
</mat-expansion-panel-header> |
|
|
|
|
|
|
|
|
|
<div class="panelLibraryFlex"> |
|
|
|
|
<div class="imgBox" *ngFor="let items of item.images;let key = index" [title]="items.name" |
|
|
|
|
(click)='selectImg(item,items,key)' |
|
|
|
|
[ngClass]="{'selectImg': selectLibrary==item.name && selectImageIndex==key}"> |
|
|
|
|
<img [src]="items.imageUrl" onerror="javascript:this.src='../../../assets/images/noImg.png'"> |
|
|
|
|
<p class="overflowText">{{items.name}}</p> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<input type="text" class="searchLibrary" [(ngModel)]="searchInput" (ngModelChange)="libraryChange()"> |
|
|
|
|
<div class="panelLibraryFlex" *ngIf="searchLibrary.length"> |
|
|
|
|
<div class="imgBox" *ngFor="let items of searchLibrary;let key = index" [title]="items.name" |
|
|
|
|
[ngClass]="{'selectImg': selectLibrary=='搜索' && selectImageIndex==key}" (click)='selectImg({name:"搜索"},items,key)'> |
|
|
|
|
<img [src]="items.imageUrl" onerror="javascript:this.src='../../../assets/images/noImg.png'"> |
|
|
|
|
<p class="overflowText">{{items.name}}</p> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</mat-expansion-panel> |
|
|
|
|
</mat-accordion> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<ng-container *ngIf="!searchLibrary.length"> |
|
|
|
|
<mat-accordion *ngFor="let item of allLibrary" id="panelLibrary"> |
|
|
|
|
<mat-expansion-panel (opened)='opened(item)'> |
|
|
|
|
<mat-expansion-panel-header> |
|
|
|
|
<label class="text">{{item.name}}</label> |
|
|
|
|
</mat-expansion-panel-header> |
|
|
|
|
|
|
|
|
|
<div class="panelLibraryFlex"> |
|
|
|
|
<div class="imgBox" *ngFor="let items of item.images;let key = index" [title]="items.name" |
|
|
|
|
(click)='selectImg(item,items,key)' |
|
|
|
|
[ngClass]="{'selectImg': selectLibrary==item.name && selectImageIndex==key}"> |
|
|
|
|
<img [src]="items.imageUrl" onerror="javascript:this.src='../../../assets/images/noImg.png'"> |
|
|
|
|
<p class="overflowText">{{items.name}}</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</mat-expansion-panel> |
|
|
|
|
</mat-accordion> |
|
|
|
|
</ng-container> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|