diff --git a/src/layouts/index.less b/src/layouts/index.less index 5e4df4c7..01730bfa 100644 --- a/src/layouts/index.less +++ b/src/layouts/index.less @@ -33,8 +33,13 @@ body { } } -.log-select { - width: 300px; +.log-wrapper { + .log-select { + width: 300px; + } + .ant-page-header-heading-left { + min-width: 100px; + } } @media (max-width: 768px) { @@ -45,18 +50,20 @@ body { } } .ql-container-wrapper { - &.crontab-wrapper { + &.crontab-wrapper, + &.log-wrapper { .ant-pro-grid-content.wide .ant-pro-page-container-children-content { height: calc(100vh - 184px); height: calc(100vh - var(--vh-offset, 0px) - 184px); } + .CodeMirror { + height: calc(100vh - 216px); + height: calc(100vh - var(--vh-offset, 0px) - 216px); + } } .CodeMirror { height: calc(100vh - 176px); height: calc(100vh - var(--vh-offset, 0px) - 176px); } } - .log-select { - width: 200px; - } } diff --git a/src/pages/log/index.tsx b/src/pages/log/index.tsx index 89318bcb..ff65a8a2 100644 --- a/src/pages/log/index.tsx +++ b/src/pages/log/index.tsx @@ -8,7 +8,7 @@ const Log = () => { const [width, setWdith] = useState('100%'); const [marginLeft, setMarginLeft] = useState(0); const [marginTop, setMarginTop] = useState(-72); - const [title, setTitle] = useState('log'); + const [title, setTitle] = useState('请选择日志文件'); const [value, setValue] = useState('请选择日志文件'); const [select, setSelect] = useState(); const [data, setData] = useState(); @@ -47,7 +47,7 @@ const Log = () => { const onSelect = (value: any, node: any) => { setSelect(value); - setTitle(node.parent); + setTitle(node.parent || node.value); getLog(node); }; @@ -66,7 +66,7 @@ const Log = () => { return (