import styles from './index.module.less';
import classNames from 'classnames';
// 递归组件用于渲染mindMap中的节点
const MindMapItem = ({ item, isEnd }: any) => {
// 递归渲染子节点
const renderChildren = () => {
if (item.children && item.children.length > 0) {
return (
{item.children.map((child: any) => (
))}
);
}
return null;
};
return (
{item.name}
{item.state === 1 && }
{item.id !== 0 && }
{item.children.length > 0 && renderChildren()}
{
isEnd && item.children?.length === 0 &&
}
);
};
export default MindMapItem;