Commit 85155e04e4e18ff1c32f758b26e1f2ecd7dfb3ec
1 parent
2e56c112
fix: DEFECT-912 camera manage prview video style error
Showing
3 changed files
with
18 additions
and
1 deletions
| ... | ... | @@ -34,6 +34,7 @@ |
| 34 | 34 | let { width = 300, height = 150 } = unref(getOptions); |
| 35 | 35 | width = isNumber(width) ? (`${width}px` as unknown as number) : width; |
| 36 | 36 | height = isNumber(height) ? (`${height}px` as unknown as number) : height; |
| 37 | + console.log({ getOptions }); | |
| 37 | 38 | return { width, height } as CSSProperties; |
| 38 | 39 | }); |
| 39 | 40 | ... | ... |
| ... | ... | @@ -10,7 +10,9 @@ |
| 10 | 10 | :showOkBtn="false" |
| 11 | 11 | @cancel="handleCancel" |
| 12 | 12 | > |
| 13 | - <div class="flex items-center justify-center bg-dark-900 w-full h-full min-h-52"> | |
| 13 | + <div | |
| 14 | + class="flex items-center justify-center bg-dark-900 w-full h-full min-h-52 video-container" | |
| 15 | + > | |
| 14 | 16 | <BasicVideoPlay v-if="showVideo" :options="options" /> |
| 15 | 17 | </div> |
| 16 | 18 | </BasicModal> |
| ... | ... | @@ -63,3 +65,13 @@ |
| 63 | 65 | showVideo.value = false; |
| 64 | 66 | }; |
| 65 | 67 | </script> |
| 68 | + | |
| 69 | +<style lang="less" scoped> | |
| 70 | + .video-container:deep(.vben-basic-video-play) { | |
| 71 | + min-height: 13rem; | |
| 72 | + } | |
| 73 | + | |
| 74 | + .video-container:deep(.video-js) { | |
| 75 | + min-height: 13rem; | |
| 76 | + } | |
| 77 | +</style> | ... | ... |
| ... | ... | @@ -61,6 +61,9 @@ |
| 61 | 61 | |
| 62 | 62 | for (const item of items) { |
| 63 | 63 | (item as CameraRecordItem).isTransform = false; |
| 64 | + (item as CameraRecordItem).videoPlayerOptions = { | |
| 65 | + ...basicVideoPlayOptions, | |
| 66 | + }; | |
| 64 | 67 | beforeVideoPlay(item); |
| 65 | 68 | } |
| 66 | 69 | if (items.length < pagination.pageSize) { |
| ... | ... | @@ -117,6 +120,7 @@ |
| 117 | 120 | const index = unref(cameraList).findIndex((item) => item.id === record.id); |
| 118 | 121 | if (~index) unref(cameraList)[index].isTransform = true; |
| 119 | 122 | } |
| 123 | + console.log(unref(cameraList)); | |
| 120 | 124 | } |
| 121 | 125 | }; |
| 122 | 126 | ... | ... |