mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
修复ant-tree高度获取
This commit is contained in:
@@ -195,10 +195,13 @@ const Log = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getLogs();
|
||||
if (treeDom && treeDom.current) {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (treeDom.current) {
|
||||
setHeight(treeDom.current.clientHeight);
|
||||
}
|
||||
}, []);
|
||||
}, [treeDom.current, data]);
|
||||
|
||||
return (
|
||||
<PageContainer
|
||||
|
||||
@@ -375,10 +375,13 @@ const Script = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getScripts();
|
||||
if (treeDom && treeDom.current) {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (treeDom.current) {
|
||||
setHeight(treeDom.current.clientHeight);
|
||||
}
|
||||
}, []);
|
||||
}, [treeDom.current, data]);
|
||||
|
||||
const action = (key: string | number) => {
|
||||
switch (key) {
|
||||
|
||||
Reference in New Issue
Block a user