mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
修复日志手机的样式
This commit is contained in:
parent
2538595ef2
commit
e6acbbfd3f
|
@ -12,7 +12,7 @@ body {
|
|||
position: absolute;
|
||||
height: calc(100vh - 128px);
|
||||
height: calc(100vh - var(--vh-offset, 0px) - 128px);
|
||||
width: calc(100% - 32px - @tree-width);
|
||||
width: calc(100% - 32px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,10 +56,13 @@ body {
|
|||
.ant-pro-grid-content.wide .ant-pro-page-container-children-content {
|
||||
height: calc(100vh - 184px);
|
||||
height: calc(100vh - var(--vh-offset, 0px) - 184px);
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
.CodeMirror {
|
||||
height: calc(100vh - 216px);
|
||||
height: calc(100vh - var(--vh-offset, 0px) - 216px);
|
||||
width: calc(100vw - 32px);
|
||||
}
|
||||
}
|
||||
.CodeMirror {
|
||||
|
|
|
@ -35,5 +35,9 @@
|
|||
padding: 0;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
width: calc(100% - 32px - @tree-width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ const Log = () => {
|
|||
const [data, setData] = useState<any[]>([]);
|
||||
const [filterData, setFilterData] = useState<any[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [isPhone, setIsPhone] = useState(false);
|
||||
|
||||
const getConfig = () => {
|
||||
request.get(`${config.apiPrefix}logs`).then((data) => {
|
||||
|
@ -105,10 +106,12 @@ const Log = () => {
|
|||
setWdith('auto');
|
||||
setMarginLeft(0);
|
||||
setMarginTop(0);
|
||||
setIsPhone(true);
|
||||
} else {
|
||||
setWdith('100%');
|
||||
setMarginLeft(0);
|
||||
setMarginTop(-72);
|
||||
setIsPhone(false);
|
||||
}
|
||||
getConfig();
|
||||
}, []);
|
||||
|
@ -117,7 +120,8 @@ const Log = () => {
|
|||
<PageContainer
|
||||
className="ql-container-wrapper log-wrapper"
|
||||
title={title}
|
||||
extra={[
|
||||
extra={
|
||||
isPhone && [
|
||||
<TreeSelect
|
||||
className="log-select"
|
||||
value={select}
|
||||
|
@ -128,7 +132,8 @@ const Log = () => {
|
|||
key="value"
|
||||
onSelect={onSelect}
|
||||
/>,
|
||||
]}
|
||||
]
|
||||
}
|
||||
header={{
|
||||
style: {
|
||||
padding: '4px 16px 4px 15px',
|
||||
|
@ -142,7 +147,8 @@ const Log = () => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
<div className={styles['log-container']}>
|
||||
<div className={`${styles['log-container']}`}>
|
||||
{!isPhone && (
|
||||
<div className={styles['left-tree-container']}>
|
||||
<Input.Search
|
||||
className={styles['left-tree-search']}
|
||||
|
@ -156,6 +162,7 @@ const Log = () => {
|
|||
></Tree>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<CodeMirror
|
||||
value={value}
|
||||
options={{
|
||||
|
|
Loading…
Reference in New Issue
Block a user