修复日志页移动端样式

This commit is contained in:
whyour 2021-05-11 20:55:14 +08:00
parent 49a3662788
commit 092222b4cb
2 changed files with 16 additions and 9 deletions

View File

@ -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;
}
}

View File

@ -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 (
<PageContainer
className="ql-container-wrapper"
className="ql-container-wrapper log-wrapper"
title={title}
extra={[
<TreeSelect