Skip to content

Commit 3f7db33

Browse files
committed
style: 固定日志弹窗头部
1 parent 8573195 commit 3f7db33

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/components/features/LogsPreview/KeyLogModal.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const KeyLogModal = () => {
175175

176176
return (
177177
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center" style={{ zIndex: 10000 }} onClick={handleClose}>
178-
<div className="card-base log-modal-content max-w-2xl overflow-y-auto m-md" onClick={(e) => e.stopPropagation()}>
178+
<div className="card-base log-modal-content max-w-2xl m-md" onClick={(e) => e.stopPropagation()}>
179179
<div className="flex items-center justify-between p-lg border-b">
180180
<div>
181181
<h3 className="text-lg font-semibold text-primary">{t('logViewer.title') || '日志详情'}</h3>
@@ -190,7 +190,7 @@ const KeyLogModal = () => {
190190
</button>
191191
</div>
192192

193-
<div className="p-lg space-y-lg">
193+
<div className="log-modal-body p-lg space-y-lg">
194194
{isLoading ? (
195195
<div className="empty-state">
196196
<div className="empty-state-text">{t('loading') || '加载中...'}</div>
@@ -293,3 +293,4 @@ const KeyLogModal = () => {
293293
export default KeyLogModal;
294294

295295

296+

src/styles/globals.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,15 @@ body {
10221022
max-width: 672px;
10231023
max-height: 90vh;
10241024
margin: var(--spacing-md);
1025+
display: flex;
1026+
flex-direction: column;
1027+
}
1028+
1029+
.log-modal-body {
1030+
flex: 1;
1031+
min-height: 0;
1032+
overflow-y: auto;
1033+
-webkit-overflow-scrolling: touch;
10251034
}
10261035

10271036
@media (max-width: 640px) {
@@ -1032,3 +1041,4 @@ body {
10321041
margin: var(--spacing-sm) auto;
10331042
}
10341043
}
1044+

0 commit comments

Comments
 (0)