横向滚动条调整

This commit is contained in:
龚皓 2024-10-22 13:54:02 +08:00
parent 7308c2f9bc
commit 6159ce3a18
1 changed files with 10 additions and 27 deletions

View File

@ -30,14 +30,8 @@
<canvas v-show="playing" ref="canvasRef" class="camera-large"></canvas>
<!-- 播放按钮 -->
<el-button
v-show="!playing || showButton"
class="play-button"
type="primary"
circle
size="large"
@click="handlePlayPause"
>
<el-button v-show="!playing || showButton" class="play-button" type="primary" circle size="large"
@click="handlePlayPause">
<el-icon>
<VideoPlay v-if="!playing" />
<VideoPause v-if="playing" />
@ -166,10 +160,15 @@ onMounted(() => {
<style scoped>
.camera-container {
display: flex;
overflow-x: auto;
/* 横向滚动条 */
min-width: 0;
/* 避免内容挤压 */
}
.camera-list {
width: 20%;
min-width: 215px;
max-height: 90vh;
/* 限制高度为一屏 */
overflow-y: auto;
@ -268,20 +267,4 @@ onMounted(() => {
.play-button:hover {
opacity: 1;
}
.camera-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 10px;
width: 80%;
height: 90vh;
}
.camera-box {
position: relative;
background-color: #1a1a1a;
}
</style>