1
1
import React , { cloneElement } from 'react' ;
2
2
import classnames from 'classnames' ;
3
3
import warning from 'warning' ;
4
+ import pickAttrs from 'rc-util/lib/pickAttrs' ;
4
5
5
6
export default {
6
7
getDefaultProps ( ) {
@@ -12,11 +13,9 @@ export default {
12
13
this . props . onTabClick ( key ) ;
13
14
} ,
14
15
getTabs ( ) {
15
- const props = this . props ;
16
- const children = props . panels ;
17
- const activeKey = props . activeKey ;
16
+ const { panels, activeKey, prefixCls } = this . props ;
17
+ const { children } = panels ;
18
18
const rst = [ ] ;
19
- const prefixCls = props . prefixCls ;
20
19
21
20
React . Children . forEach ( children , ( child ) => {
22
21
if ( ! child ) {
@@ -58,7 +57,6 @@ export default {
58
57
getRootNode ( contents ) {
59
58
const {
60
59
prefixCls, onKeyDown, className, extraContent, style, tabBarPosition,
61
- pageSize, styles, inkBarAnimated, hammerOptions, onTabClick, panels, activeKey,
62
60
...restProps ,
63
61
} = this . props ;
64
62
const cls = classnames ( `${ prefixCls } -bar` , {
@@ -89,7 +87,7 @@ export default {
89
87
ref = "root"
90
88
onKeyDown = { onKeyDown }
91
89
style = { style }
92
- { ...restProps }
90
+ { ...pickAttrs ( restProps ) }
93
91
>
94
92
{ children }
95
93
</ div >
0 commit comments