mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 15:43:24 +08:00
修复ant-tree高度获取
This commit is contained in:
parent
dcea231249
commit
c36450f436
|
@ -131,7 +131,7 @@
|
||||||
"react-dnd": "^14.0.2",
|
"react-dnd": "^14.0.2",
|
||||||
"react-dnd-html5-backend": "^14.0.0",
|
"react-dnd-html5-backend": "^14.0.0",
|
||||||
"react-dom": "18.x",
|
"react-dom": "18.x",
|
||||||
"react-split-pane": "^0.1.92",
|
"react-split-pane": "git+https://github.com/tomkp/react-split-pane.git#master",
|
||||||
"sockjs-client": "^1.6.0",
|
"sockjs-client": "^1.6.0",
|
||||||
"ts-node": "^10.6.0",
|
"ts-node": "^10.6.0",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
|
|
|
@ -195,10 +195,13 @@ const Log = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getLogs();
|
getLogs();
|
||||||
if (treeDom && treeDom.current) {
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (treeDom.current) {
|
||||||
setHeight(treeDom.current.clientHeight);
|
setHeight(treeDom.current.clientHeight);
|
||||||
}
|
}
|
||||||
}, []);
|
}, [treeDom.current, data]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer
|
<PageContainer
|
||||||
|
|
|
@ -375,10 +375,13 @@ const Script = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getScripts();
|
getScripts();
|
||||||
if (treeDom && treeDom.current) {
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (treeDom.current) {
|
||||||
setHeight(treeDom.current.clientHeight);
|
setHeight(treeDom.current.clientHeight);
|
||||||
}
|
}
|
||||||
}, []);
|
}, [treeDom.current, data]);
|
||||||
|
|
||||||
const action = (key: string | number) => {
|
const action = (key: string | number) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user