Commit 623765320da16d7d68bea7a6655f0ca4f201edf4
Merge remote-tracking branch 'origin/v1.0' into publish
# Conflicts: # src/utils/common.tsx
Showing
2 changed files
with
23 additions
and
8 deletions
| @@ -86,13 +86,19 @@ const ProductionDetail: React.FC = () => { | @@ -86,13 +86,19 @@ const ProductionDetail: React.FC = () => { | ||
| 86 | }}} | 86 | }}} |
| 87 | /> | 87 | /> |
| 88 | { | 88 | { |
| 89 | - filePathItem?.type === 'mp4' ? <div className={'production-detail-video-box'}> | ||
| 90 | - <VideoPlay | ||
| 91 | - key={filePathItem?.url || ''} | ||
| 92 | - url={filePathItem?.url || ''} | ||
| 93 | - className={'production-detail-video'} | ||
| 94 | - /> | ||
| 95 | - </div> : filePathItem?.type === 'pdf' ? <PdfPreview url={filePathItem?.url || ''}/> : '' | 89 | + filePathItem ? sxPreViewList?.map((item: any) => { |
| 90 | + return <div key={item?.url} className={`production-detail-item ${item?.url !== filePathItem?.url ? 'hidden' : ''}`}> | ||
| 91 | + { | ||
| 92 | + item?.type === 'mp4' ? <div className={'production-detail-video-box'}> | ||
| 93 | + <VideoPlay | ||
| 94 | + key={item?.url || ''} | ||
| 95 | + url={item?.url || ''} | ||
| 96 | + className={'production-detail-video'} | ||
| 97 | + /> | ||
| 98 | + </div> : item?.type === 'pdf' ? <PdfPreview url={item?.url || ''}/> : '' | ||
| 99 | + } | ||
| 100 | + </div> | ||
| 101 | + }) : '' | ||
| 96 | } | 102 | } |
| 97 | </div> | 103 | </div> |
| 98 | </div> | 104 | </div> |
| @@ -5,6 +5,15 @@ | @@ -5,6 +5,15 @@ | ||
| 5 | position: relative; | 5 | position: relative; |
| 6 | width: 100%; | 6 | width: 100%; |
| 7 | height: calc(100vh - 88px); | 7 | height: calc(100vh - 88px); |
| 8 | + &-item { | ||
| 9 | + position: relative; | ||
| 10 | + width: 100%; | ||
| 11 | + height: calc(100vh - 88px); | ||
| 12 | + &.hidden { | ||
| 13 | + display: none; | ||
| 14 | + } | ||
| 15 | + } | ||
| 16 | + | ||
| 8 | &-video-box { | 17 | &-video-box { |
| 9 | position: absolute; | 18 | position: absolute; |
| 10 | top: 0; | 19 | top: 0; |
| @@ -21,4 +30,4 @@ | @@ -21,4 +30,4 @@ | ||
| 21 | max-height: 100%; | 30 | max-height: 100%; |
| 22 | height: auto; | 31 | height: auto; |
| 23 | } | 32 | } |
| 24 | -} | ||
| 33 | +} |