支持批量创建同名称环境变量,日志和脚本管理PC页支持宽度拖拽

This commit is contained in:
hanhh
2021-08-17 18:34:55 +08:00
parent 594e871744
commit 2d6da9ebfe
9 changed files with 114 additions and 89 deletions
+1 -1
View File
@@ -7,7 +7,6 @@
background-color: #fff;
height: calc(100vh - 128px);
height: calc(100vh - var(--vh-offset, 0px) - 128px);
width: @tree-width;
display: flex;
flex-direction: column;
}
@@ -20,4 +19,5 @@
.log-container {
display: flex;
position: relative;
}
+33 -31
View File
@@ -7,6 +7,7 @@ import { request } from '@/utils/http';
import styles from './index.module.less';
import { Controlled as CodeMirror } from 'react-codemirror2';
import { useCtx, useTheme } from '@/utils/hooks';
import SplitPane from 'react-split-pane';
function getFilterData(keyword: string, data: any) {
const expandedKeys: string[] = [];
@@ -133,24 +134,40 @@ const Log = () => {
>
<div className={`${styles['log-container']} log-container`}>
{!isPhone && (
<div className={styles['left-tree-container']}>
<Input.Search
className={styles['left-tree-search']}
onChange={onSearch}
></Input.Search>
<div className={styles['left-tree-scroller']} ref={treeDom}>
<Tree
className={styles['left-tree']}
treeData={filterData}
showIcon={true}
height={height}
showLine={{ showLeafIcon: true }}
onSelect={onTreeSelect}
></Tree>
<SplitPane split="vertical" size={200} maxSize={-100}>
<div className={styles['left-tree-container']}>
<Input.Search
className={styles['left-tree-search']}
onChange={onSearch}
></Input.Search>
<div className={styles['left-tree-scroller']} ref={treeDom}>
<Tree
className={styles['left-tree']}
treeData={filterData}
showIcon={true}
height={height}
showLine={{ showLeafIcon: true }}
onSelect={onTreeSelect}
></Tree>
</div>
</div>
</div>
<Editor
language="shell"
theme={theme}
value={value}
options={{
readOnly: true,
fontSize: 12,
lineNumbersMinChars: 3,
fontFamily: 'Source Code Pro',
folding: false,
glyphMargin: false,
wordWrap: 'on',
}}
/>
</SplitPane>
)}
{isPhone ? (
{isPhone && (
<CodeMirror
value={value}
options={{
@@ -165,21 +182,6 @@ const Log = () => {
}}
onChange={(editor, data, value) => {}}
/>
) : (
<Editor
language="shell"
theme={theme}
value={value}
options={{
readOnly: true,
fontSize: 12,
lineNumbersMinChars: 3,
fontFamily: 'Source Code Pro',
folding: false,
glyphMargin: false,
wordWrap: 'on',
}}
/>
)}
</div>
</PageContainer>