How to customize the background color of Antd React directory tree node?
P粉825079798
2023-09-03 12:09:15
<p>How to change the default background color of an antd directory tree node when the mouse is hovering over the tree node using less style? </p>
<pre class="brush:php;toolbar:false;"><Tree.DirectoryTree>
{data.map((item) => {
return (
<Tree.TreeNode
// @ts-ignore
item={item}
icon={<></>}
key={item.user_folder_id}
title={item.title}
>
{item?.data.map((node) => {
return (
<Tree.TreeNode
node={node}
key={node.node_id}
title={node.title}
></Tree.TreeNode>
);
})}
</Tree.TreeNode>
);
})}
</Tree.DirectoryTree></pre></p>
styles.less