子传父传值 {headTitle headTitle.map((item, index) = ( div key={item.id} onClick={() = handleClick(item.id)} className='headTitle'{item.name}/div ))}
子传父传值
{headTitle && headTitle.map((item, index) => (
<div key={item.id} onClick={()
=> handleClick(item.id)} className='headTitle'>{item.name}</div>
))}