lijianan
2 years ago
committed by
GitHub
3 changed files with 21 additions and 24 deletions
@ -1,2 +1,3 @@ |
|||||
|
// must be .js file, can't modify to be .ts file!
|
||||
// eslint-disable-next-line no-restricted-exports
|
// eslint-disable-next-line no-restricted-exports
|
||||
export { default } from './theme/common/Loading'; |
export { default } from './theme/common/Loading'; |
||||
|
@ -1,32 +1,29 @@ |
|||||
import React from 'react'; |
import React from 'react'; |
||||
import { Tabs } from 'antd'; |
import { Tabs } from 'antd'; |
||||
|
import type { TabsProps } from 'antd'; |
||||
|
|
||||
const onChange = (key: string) => { |
const onChange = (key: string) => { |
||||
console.log(key); |
console.log(key); |
||||
}; |
}; |
||||
|
|
||||
const App: React.FC = () => ( |
const items: TabsProps['items'] = [ |
||||
<Tabs |
{ |
||||
defaultActiveKey="1" |
key: '1', |
||||
onChange={onChange} |
label: `Tab 1`, |
||||
items={[ |
children: `Content of Tab Pane 1`, |
||||
{ |
}, |
||||
label: `Tab 1`, |
{ |
||||
key: '1', |
key: '2', |
||||
children: `Content of Tab Pane 1`, |
label: `Tab 2`, |
||||
}, |
children: `Content of Tab Pane 2`, |
||||
{ |
}, |
||||
label: `Tab 2`, |
{ |
||||
key: '2', |
key: '3', |
||||
children: `Content of Tab Pane 2`, |
label: `Tab 3`, |
||||
}, |
children: `Content of Tab Pane 3`, |
||||
{ |
}, |
||||
label: `Tab 3`, |
]; |
||||
key: '3', |
|
||||
children: `Content of Tab Pane 3`, |
const App: React.FC = () => <Tabs defaultActiveKey="1" items={items} onChange={onChange} />; |
||||
}, |
|
||||
]} |
|
||||
/> |
|
||||
); |
|
||||
|
|
||||
export default App; |
export default App; |
||||
|
Loading…
Reference in new issue