4
- },
},
}
@@ -355,15 +351,18 @@ export default {
}
.table-card {
- min-height: calc(100vh - 230px);
+ height: calc(100vh - 230px);
display: flex;
flex-direction: column;
+ overflow: hidden;
::v-deep .el-card__body {
padding: 20px;
display: flex;
flex-direction: column;
min-height: 0;
+ height: 100%;
+ overflow: hidden;
}
.table-header {
@@ -386,13 +385,11 @@ export default {
// 防止单行数据时占满整个高度
align-content: start;
grid-auto-rows: min-content;
-
- // 数据多时才允许滚动
- &.has-scroll {
- flex: 1;
- overflow-y: auto;
- min-height: 0;
- }
+ // 使用 flex 布局,让图片区域占据剩余空间,超出时显示滚动条
+ flex: 1;
+ overflow-y: auto;
+ min-height: 0;
+ overflow-x: hidden;
&::-webkit-scrollbar {
width: 6px;