File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 8
8
} from './utils' ;
9
9
export default {
10
10
name : 'TabContent' ,
11
+ inheritAttrs : false ,
11
12
props : {
12
13
animated : PropTypes . bool . def ( true ) ,
13
14
animatedWithMargin : PropTypes . bool . def ( true ) ,
@@ -21,7 +22,9 @@ export default {
21
22
computed : {
22
23
classes ( ) {
23
24
const { animated, prefixCls } = this ;
25
+ const { class : className } = this . $attrs ;
24
26
return {
27
+ [ className ] : ! ! className ,
25
28
[ `${ prefixCls } -content` ] : true ,
26
29
[ animated ? `${ prefixCls } -content-animated` : `${ prefixCls } -content-no-animated` ] : true ,
27
30
} ;
@@ -68,9 +71,13 @@ export default {
68
71
const animatedStyle = animatedWithMargin
69
72
? getMarginStyle ( activeIndex , tabBarPosition )
70
73
: getTransformPropValue ( getTransformByIndex ( activeIndex , tabBarPosition , direction ) ) ;
71
- style = animatedStyle ;
74
+ style = {
75
+ ...this . $attrs . style ,
76
+ ...animatedStyle ,
77
+ } ;
72
78
} else {
73
79
style = {
80
+ ...this . $attrs . style ,
74
81
display : 'none' ,
75
82
} ;
76
83
}
You can’t perform that action at this time.
0 commit comments