优化log显示效果

This commit is contained in:
liuwei
2025-05-28 17:32:08 +08:00
parent 029d1a4589
commit ae540be597

View File

@@ -74,6 +74,7 @@
const logDiv = this.$el.querySelector('.log-content');
if (logDiv) {
logDiv.scrollTop = logDiv.scrollHeight;
console.log('log-content scrollHeight:', logDiv.scrollHeight, 'clientHeight:', logDiv.clientHeight);
}
});
} else {
@@ -118,23 +119,32 @@
display: flex;
flex-direction: column;
margin: 0;
height: 100%;
}
.el-card__body {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.log-content-wrapper {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
overflow: hidden;
}
.log-content {
flex: 1;
overflow-y: auto;
overflow-x: auto;
overflow-y: auto !important;
overflow-x: auto !important;
background-color: #f5f5f5;
padding: 10px;
border-radius: 4px;
box-sizing: border-box;
min-height: 0;
}
.log-content pre {
@@ -142,6 +152,7 @@
white-space: pre-wrap;
word-break: break-all;
font-family: monospace;
line-height: 1.5;
}
.empty-log {
@@ -149,16 +160,7 @@
display: flex;
align-items: center;
justify-content: center;
}
.el-card {
height: 100% !important;
}
.el-card__body {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
</style>
{% endblock %}