Commit c2a1222e by Sweet Zhang

增加放大缩小图片

parent 3e29d018
...@@ -55,13 +55,14 @@ ...@@ -55,13 +55,14 @@
} }
.honorList > div { .honorList > div {
width: 100px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.honorList > div > img { .honorList > div > img {
height: 100px; height: 60px;
margin-bottom: 5px; margin-bottom: 5px;
} }
...@@ -131,6 +132,18 @@ footer { ...@@ -131,6 +132,18 @@ footer {
width: 80px; width: 80px;
} }
.markBox {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #000;
display: flex;
justify-content: center;
align-items: center;
}
@media (max-width: 767px) { @media (max-width: 767px) {
.wrapper { .wrapper {
width: 350px; width: 350px;
...@@ -151,6 +164,10 @@ footer { ...@@ -151,6 +164,10 @@ footer {
font-size: 12px; font-size: 12px;
} }
.honorList > div {
width: 80px;
}
.cerPhoto { .cerPhoto {
width: 80px; width: 80px;
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<h4>荣誉</h4> <h4>荣誉</h4>
<div class="honorList"> <div class="honorList">
<div *ngFor="let certificateItem of certificateList"> <div *ngFor="let certificateItem of certificateList">
<img src="{{certificateItem.imagePath}}" alt="{{certificateItem.certName}}"> <img src="{{certificateItem.imagePath}}" alt="{{certificateItem.certName}}" (click)="scaleImg(certificateItem.imagePath)">
<span>{{certificateItem.certName}}</span> <span>{{certificateItem.certName}}</span>
</div> </div>
</div> </div>
...@@ -92,3 +92,7 @@ ...@@ -92,3 +92,7 @@
</footer> </footer>
</div> </div>
</div> </div>
<!-- 图片放大缩小-->
<!--<div class="markBox" (click)="imgShowFlag=!imgShowFlag" *ngIf="imgShowFlag">
<img src="{{this.scaleImgPath}}" alt="" id="scaleImg">
</div>-->
import {Component, OnInit} from '@angular/core'; import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {EventBusService} from '../event-bus.service'; import {EventBusService} from '../event-bus.service';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
...@@ -12,6 +12,8 @@ export class BrokerDetailComponent implements OnInit { ...@@ -12,6 +12,8 @@ export class BrokerDetailComponent implements OnInit {
lifePhotoList: Array<any>; lifePhotoList: Array<any>;
practitionerId: any; practitionerId: any;
userPractitionerInfo: any; userPractitionerInfo: any;
imgShowFlag: boolean;
scaleImgPath: any;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) { constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
} }
...@@ -34,4 +36,8 @@ export class BrokerDetailComponent implements OnInit { ...@@ -34,4 +36,8 @@ export class BrokerDetailComponent implements OnInit {
}); });
} }
scaleImg(path) {
this.scaleImgPath = path;
this.imgShowFlag = true;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment