This commit is contained in:
Taric Xin
2022-03-02 14:30:37 +08:00
parent 62e15f69ea
commit ab6f1c6865
13 changed files with 232 additions and 243 deletions

View File

@ -318,7 +318,7 @@
</ng-container>
<div *ngIf="data[key]" (mouseover)="data[hover]=true" (mouseleave)="data[hover]=false"
(click)="$event.cancelBubble=true" class="image-hover">
<img [src]="data[key]" style="width: 200px;height: 160px;" (click)="showImg(data[key])" />
<img nz-image [nzSrc]="data[key]" style="width: 200px;height: 160px;" />
<div class="mask" *ngIf="data[hover] && status"></div>
<div class="mask-over" *ngIf="data[hover] && status">
<i nz-icon nzType="close-circle" nzTheme="fill" class="delete-icon" (click)="deleteImg(data,key,key2)"></i>

View File

@ -5,6 +5,7 @@ import { apiConf } from '@conf/api.conf';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFTagWidgetSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzImageService } from 'ng-zorro-antd/image';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
@ -65,7 +66,8 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
private nzModalService: NzModalService,
public service: UsermanageService,
public route: ActivatedRoute,
private datePipe: DatePipe
private datePipe: DatePipe,
private nzImageService: NzImageService
) {}
ngOnInit() {
@ -423,11 +425,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
}
showImg(url: any) {
const params = {
imgList: [url],
index: 0
};
this.nzModalService.create({ nzContent: ImageViewComponent, nzComponentParams: { params } });
this.nzImageService.preview([{ src: url }]);
}
deleteImg(data: any, key: string, key2: string) {