Tabs逻辑微调

This commit is contained in:
tangly1024
2022-02-18 11:06:40 +08:00
parent 79b7aa4a37
commit 342c42f42d

View File

@@ -41,12 +41,14 @@ const Tabs = ({ children }) => {
</li>
})}
</ul>
{children.map((item, index) => {
return <section key={index}
className={`${currentTab === index ? 'block animate__animated animate__fadeIn animate__faster' : 'hidden'}`}>
{item}
</section>
})}
<div>
{children.map((item, index) => {
return <section key={index}
className={`${currentTab === index ? 'block animate__animated animate__fadeIn animate__faster' : 'hidden'}`}>
{item}
</section>
})}
</div>
</div>
}