修复ant-tree高度获取

This commit is contained in:
whyour
2022-09-25 13:38:10 +08:00
parent dcea231249
commit c36450f436
3 changed files with 11 additions and 5 deletions
+5 -2
View File
@@ -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) {