edit
This commit is contained in:
@ -8,25 +8,32 @@
|
||||
*/
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzImageService } from 'ng-zorro-antd/image';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { ImageViewComponent } from './imageview/imageview.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-imagelist',
|
||||
templateUrl: './imagelist.component.html',
|
||||
styleUrls: ['./imagelist.less'],
|
||||
styleUrls: ['./imagelist.less']
|
||||
})
|
||||
export class ImageListComponent implements OnInit {
|
||||
@Input() imgList: any = [];
|
||||
constructor(private modal: ModalHelper, public msgSrv: NzMessageService, public http: _HttpClient) {}
|
||||
constructor(
|
||||
private modal: ModalHelper,
|
||||
public msgSrv: NzMessageService,
|
||||
public http: _HttpClient,
|
||||
private nzImageService: NzImageService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
ngOnInit(): void {}
|
||||
showImg(index: any) {
|
||||
const params = {
|
||||
imgList: this.imgList,
|
||||
index,
|
||||
index
|
||||
};
|
||||
this.modal.create(ImageViewComponent, { params }).subscribe((res) => {});
|
||||
const images = this.imgList.map((url: string) => ({ src: url }));
|
||||
this.nzImageService.preview(images);
|
||||
// this.modal.create(ImageViewComponent, { params }).subscribe(res => {});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user