UI优化
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-23 14:24:05
|
||||
@ -11,10 +11,10 @@
|
||||
<div class="imgBox">
|
||||
<ng-container *ngFor="let item of imgList; let i = index">
|
||||
<ng-container *ngIf="item;">
|
||||
<img nz-image [nzSrc]="item" />
|
||||
<img [style]="style" nz-image [nzSrc]="item" />
|
||||
</ng-container>
|
||||
<ng-template #elseTemplate>
|
||||
<div style="background-color: darkgrey;border-radius: 5px;width: 200px;height: 160px;" class="mr-sm"></div>
|
||||
<div style="background-color: darkgrey;border-radius: 5px;width: 120px;height: 120px;" class="mr-sm"></div>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -19,15 +19,16 @@ import { ImageViewComponent } from './imageview/imageview.component';
|
||||
})
|
||||
export class ImageListComponent implements OnInit {
|
||||
@Input() imgList: any = [];
|
||||
@Input() style = '';
|
||||
constructor(
|
||||
private modal: ModalHelper,
|
||||
public msgSrv: NzMessageService,
|
||||
public http: _HttpClient,
|
||||
private nzImageService: NzImageService
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.style = this.style || '';
|
||||
}
|
||||
showImg(index: any) {
|
||||
const params = {
|
||||
@ -35,7 +36,7 @@ export class ImageListComponent implements OnInit {
|
||||
index
|
||||
};
|
||||
const images = this.imgList.map((url: string) => {
|
||||
if(url) {
|
||||
if (url) {
|
||||
console.log(url);
|
||||
({ src: url })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user