修复移动端无法打开脚本管理、任务日志

This commit is contained in:
hanhh 2021-08-29 00:34:47 +08:00
parent 8cef0b6216
commit 7eed47cd8e
4 changed files with 9 additions and 18 deletions

View File

@ -51,8 +51,7 @@ body {
overflow: auto;
.ant-pro-page-container-children-content {
overflow: auto;
height: calc(100vh - 96px);
height: calc(100vh - var(--vh-offset, 0px) - 96px);
height: 100%;
background-color: #fff;
padding: 16px;
}
@ -77,7 +76,7 @@ body {
.log-wrapper {
.log-select {
width: 300px;
width: 250px;
}
.ant-page-header-heading-left {
min-width: 100px;
@ -140,7 +139,6 @@ input:-webkit-autofill:active {
flex: 1;
.ant-pro-grid-content-children {
height: calc(100% - 48px);
height: calc(100% - var(--vh-offset, 0px) - 48px);
> div,
.log-container,
.react-codemirror2,
@ -152,22 +150,11 @@ input:-webkit-autofill:active {
}
@media (max-width: 768px) {
.ant-pro-grid-content.wide {
.ant-pro-page-container-children-content {
height: calc(100vh - 144px);
height: calc(100vh - var(--vh-offset, 0px) - 144px);
}
}
.ql-container-wrapper {
&.crontab-wrapper,
&.log-wrapper,
&.env-wrapper,
&.config-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 {
width: calc(100vw - 80px);
}

View File

@ -105,7 +105,9 @@ const Log = ({ headerStyle, isPhone, theme }: any) => {
useEffect(() => {
getLogs();
if (treeDom && treeDom.current) {
setHeight(treeDom.current.clientHeight);
}
}, []);
return (

View File

@ -192,7 +192,9 @@ const Script = ({ headerStyle, isPhone, theme }: any) => {
useEffect(() => {
getScripts();
if (treeDom && treeDom.current) {
setHeight(treeDom.current.clientHeight);
}
}, []);
return (

View File

@ -9,7 +9,7 @@ export const useCtx = () => {
const { platform } = useMemo(() => browserType(), []);
useEffect(() => {
if (platform === 'mobile' || document.body.offsetWidth < 768) {
if (platform === 'mobile' && document.body.offsetWidth < 768) {
setWidth('auto');
setMarginLeft(0);
setMarginTop(0);