File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import '../../assets/index.less' ;
3
- import type { TabsProps } from '../../src' ;
4
2
import Tabs from '../../src' ;
3
+ import type { TabsProps } from '../../src' ;
4
+ import '../../assets/index.less' ;
5
5
6
6
const items : TabsProps [ 'items' ] = [ ] ;
7
7
for ( let i = 0 ; i < 50 ; i += 1 ) {
@@ -16,20 +16,22 @@ export default () => {
16
16
17
17
const extra = React . useMemo ( ( ) => {
18
18
if ( key === '0' ) {
19
- return < div > 额外内容</ div > ;
20
- }
21
- return null ;
22
- } , [ key ] ) ;
19
+ return (
20
+ < div > 额外内容</ div >
21
+ )
22
+ }
23
+ return null
24
+ } , [ key ] )
23
25
24
26
return (
25
27
< div style = { { maxWidth : 550 } } >
26
- < Tabs
28
+ < Tabs
27
29
activeKey = { key }
28
- onChange = { curKey => setKey ( curKey ) }
29
- tabBarExtraContent = { extra }
30
- defaultActiveKey = "8"
31
- items = { items }
30
+ onChange = { ( curKey ) => setKey ( curKey ) }
31
+ tabBarExtraContent = { extra }
32
+ defaultActiveKey = "8"
33
+ items = { items }
32
34
/>
33
35
</ div >
34
36
) ;
35
- } ;
37
+ } ;
You can’t perform that action at this time.
0 commit comments