Commit cae4295a authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理左侧栏未配置icon页面异常问题

parent e7c9b70b
......@@ -41,7 +41,9 @@ function RenderComponent({type, ...props}: {type: keyof typeof iconMap}){
}
const CustomIcon: FC<IconComponentProps> = ({type, ...props}: {type: keyof typeof iconMap}) => {
return <Icon component={() => <RenderComponent type={type} {...props}/>}/>
// return <Icon component={() => <RenderComponent type={type} {...props}/>}/>
// @处理未配置icon报错
return type ? <Icon component={() => <RenderComponent type={type} {...props}/>}/> : null
}
export default CustomIcon
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment