+
diff --git a/src/pages/script/index.module.less b/src/pages/script/index.module.less
index b1f98948..d2dafec2 100644
--- a/src/pages/script/index.module.less
+++ b/src/pages/script/index.module.less
@@ -16,7 +16,7 @@
overflow: auto;
}
&-search {
- margin-bottom: 16px;
+ margin-bottom: 8px;
}
}
diff --git a/src/pages/script/index.tsx b/src/pages/script/index.tsx
index ca419f83..1ac87134 100644
--- a/src/pages/script/index.tsx
+++ b/src/pages/script/index.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect, useCallback, Key } from 'react';
+import { useState, useEffect, useCallback, Key, useRef } from 'react';
import { TreeSelect, Tree, Input } from 'antd';
import config from '@/utils/config';
import { PageContainer } from '@ant-design/pro-layout';
@@ -37,6 +37,8 @@ const Script = () => {
const [loading, setLoading] = useState(false);
const [isPhone, setIsPhone] = useState(false);
const [mode, setMode] = useState('');
+ const [height, setHeight] = useState
();
+ const treeDom = useRef();
const getScripts = () => {
setLoading(true);
@@ -89,6 +91,7 @@ const Script = () => {
setIsPhone(false);
}
getScripts();
+ setHeight(treeDom.current.clientHeight);
}, []);
return (
@@ -130,10 +133,13 @@ const Script = () => {
className={styles['left-tree-search']}
onChange={onSearch}
>
-