File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 88} from './utils' ;
99export default {
1010 name : 'TabContent' ,
11+ inheritAttrs : false ,
1112 props : {
1213 animated : PropTypes . bool . def ( true ) ,
1314 animatedWithMargin : PropTypes . bool . def ( true ) ,
@@ -21,7 +22,9 @@ export default {
2122 computed : {
2223 classes ( ) {
2324 const { animated, prefixCls } = this ;
25+ const { class : className } = this . $attrs ;
2426 return {
27+ [ className ] : ! ! className ,
2528 [ `${ prefixCls } -content` ] : true ,
2629 [ animated ? `${ prefixCls } -content-animated` : `${ prefixCls } -content-no-animated` ] : true ,
2730 } ;
@@ -68,9 +71,13 @@ export default {
6871 const animatedStyle = animatedWithMargin
6972 ? getMarginStyle ( activeIndex , tabBarPosition )
7073 : getTransformPropValue ( getTransformByIndex ( activeIndex , tabBarPosition , direction ) ) ;
71- style = animatedStyle ;
74+ style = {
75+ ...this . $attrs . style ,
76+ ...animatedStyle ,
77+ } ;
7278 } else {
7379 style = {
80+ ...this . $attrs . style ,
7481 display : 'none' ,
7582 } ;
7683 }
You can’t perform that action at this time.
0 commit comments