Skip to content

Commit 30c76d1

Browse files
committed
feat: 添加日志模态窗口,支持实时更新日志显示及强制关闭功能
1 parent 05b48df commit 30c76d1

File tree

4 files changed

+476
-17
lines changed

4 files changed

+476
-17
lines changed

src/vue/setting/view/sdk/index.less

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,97 @@
215215
.sdk-expand-content {
216216
padding: 16px 20px;
217217
}
218+
}
219+
220+
/* 日志模态窗口样式 */
221+
.sdk-log-dialog {
222+
max-width: 1200px;
223+
224+
.el-dialog__header {
225+
padding: 0;
226+
}
227+
228+
.el-dialog__body {
229+
padding: 0;
230+
}
231+
}
232+
233+
.log-dialog-header {
234+
display: flex;
235+
justify-content: space-between;
236+
align-items: center;
237+
padding: 20px;
238+
239+
.dialog-title {
240+
font-size: 18px;
241+
font-weight: 600;
242+
color: #303133;
243+
}
244+
}
245+
246+
.log-container {
247+
background-color: #1e1e1e;
248+
border-radius: 4px;
249+
padding: 0;
250+
height: 60vh;
251+
max-height: 600px;
252+
min-height: 400px;
253+
overflow: hidden;
254+
position: relative;
255+
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
256+
}
257+
258+
.terminal-content {
259+
height: 100%;
260+
width: 100%;
261+
262+
// xterm.js 终端样式
263+
.xterm {
264+
height: 100%;
265+
padding: 10px;
266+
}
267+
268+
.xterm-viewport {
269+
overflow-y: auto !important;
270+
271+
&::-webkit-scrollbar {
272+
width: 10px;
273+
}
274+
275+
&::-webkit-scrollbar-track {
276+
background: #2d2d30;
277+
border-radius: 4px;
278+
}
279+
280+
&::-webkit-scrollbar-thumb {
281+
background: #424242;
282+
border-radius: 4px;
283+
284+
&:hover {
285+
background: #4e4e52;
286+
}
287+
}
288+
}
289+
}
290+
291+
.log-dialog-footer {
292+
display: flex;
293+
align-items: center;
294+
justify-content: center;
295+
gap: 16px;
296+
297+
.update-status {
298+
padding: 10px 20px;
299+
font-size: 14px;
300+
301+
i {
302+
margin-right: 8px;
303+
animation: rotate 1s linear infinite;
304+
}
305+
}
306+
}
307+
308+
@keyframes rotate {
309+
from { transform: rotate(0deg); }
310+
to { transform: rotate(360deg); }
218311
}

0 commit comments

Comments
 (0)