chore: fix Array(x).key() cannot works in codesandbox/codepen

Co-authored-by: weiwei <weiwei0814@theduapp.com>
This commit is contained in:
prettyboyweiwei 2020-09-16 23:25:43 +08:00 committed by zombiej
parent d5954af85e
commit 6882fa9498

View File

@ -40,7 +40,7 @@ class SlidingTabsDemo extends React.Component {
<Radio.Button value="left">Vertical</Radio.Button>
</Radio.Group>
<Tabs defaultActiveKey="1" tabPosition={mode} style={{ height: 220 }}>
{[...Array(30).keys()].map(i => (
{[...Array.from({ length: 30 }, (v, i) => i)].map(i => (
<TabPane tab={`Tab-${i}`} key={i} disabled={i === 28}>
Content of tab {i}
</TabPane>