🔨 切换标签自适应页面.

This commit is contained in:
lijiahang
2024-03-19 19:38:01 +08:00
parent d4039501b2
commit 30349cb362
3 changed files with 19 additions and 6 deletions

View File

@@ -55,7 +55,7 @@
import type { VNodeRef } from 'vue';
import type { ExecCommandResponse } from '@/api/exec/exec';
import type { LogDomRef, ILogAppender } from '@/components/xtrem/log-appender/appender.const';
import { nextTick, ref } from 'vue';
import { nextTick, ref, watch } from 'vue';
import { formatDuration } from '@/utils';
import { execHostStatus, execHostStatusKey } from '@/views/exec/exec-log/types/const';
import { useDictStore } from '@/store';
@@ -72,6 +72,13 @@
const logRefs = ref<Array<LogDomRef>>([]);
const appender = ref<ILogAppender>();
// 切换标签自适应
watch(() => props.current, () => {
nextTick(() => {
appender.value?.fit();
});
});
// 打开
const open = () => {
nextTick(async () => {
@@ -138,7 +145,7 @@
width: 100%;
height: calc(100% - @header-height);
position: relative;
background: #212529;
background: #202020;
padding: 4px 0 0 4px;
.log-appender {