Browse Source

[完善]误报平台切换图片视频bug

master
邵佳豪 2 years ago
parent
commit
76f49a727a
  1. 6
      src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html
  2. 28
      src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss

6
src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html

@ -26,7 +26,7 @@
<button nz-button nzType="primary" (click)="downImg()">导出图片</button>
</div>
<div class="content">
<div *ngIf="selectedType == 'img'" class="imgbox" [ngClass]="{'imgboxAX': isAnxin}">
<div [hidden]="!(selectedType == 'img')" class="imgbox" [ngClass]="{'imgboxAX': isAnxin}">
<ng-container *ngIf="imgUrl; else elseTemplate">
<img id="img" [src]="imgUrl" alt="" (error)="imgErr()">
<canvas *ngIf="isAnxin" [width]="canvasWidth" [height]="canvasHeight"
@ -39,9 +39,9 @@
<span class="SrcError">暂无图片</span>
</ng-template>
</div>
<div *ngIf="selectedType == 'video'" class="vediobox">
<div [hidden]="!(selectedType == 'video')" class="vediobox">
<ng-container *ngIf="vedioUrl; else elseTemplate2">
<video controls style="width: 100%;height: 100%;" [src]="vedioUrl"></video>
<video controls [src]="vedioUrl"></video>
</ng-container>
<ng-template #elseTemplate2>
暂无视频

28
src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss

@ -1,7 +1,5 @@
.box {
width: 100%;
min-height: 715px;
// overflow-y: auto;
color: #fff;
display: flex;
flex-direction: column;
@ -66,20 +64,22 @@
box-sizing: border-box;
padding: 0 12px;
margin-bottom: 6px;
label {
color: #fff;
}
}
.content {
flex: 1;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
min-height: 550px;
max-height: 550px;
.imgbox {
box-sizing: border-box;
padding: 0 12px;
@ -99,10 +99,9 @@
}
img {
max-width: 100%;
max-height: 100%;
height: 550px;
width: auto;
}
.SrcError {
position: absolute;
left: 50%;
@ -111,23 +110,20 @@
}
}
.imgboxAX {
img {
width: 100%;
height: auto;
}
}
.vediobox {
width: 100%;
height: 100%;
min-height: 550px;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 12px;
margin-bottom: 12px;
video {
max-width: 100%;
max-height: 100%;
height: 550px;
width: auto;
}
}
}

Loading…
Cancel
Save