card type Tab should not have any animation

This commit is contained in:
afc163 2017-04-15 15:26:35 +08:00
parent b9851f84c8
commit 6e147b7a3d
3 changed files with 13 additions and 3 deletions

View File

@ -107,6 +107,10 @@ export default class Tabs extends React.Component<TabsProps, any> {
inkBarAnimated: animated, tabPaneAnimated: animated,
};
if (type !== 'line') {
tabPaneAnimated = false;
}
warning(
!(type.indexOf('card') >= 0 && size === 'small'),
'Tabs[type=card|editable-card] doesn\'t have small size, it\'s by designed.',

View File

@ -28,10 +28,10 @@
transform: translateZ(0);
border-color: @border-color-base;
color: @primary-color;
}
&&-card > &-bar &-tab-active {
padding-bottom: 5px;
transform: translateZ(0);
}
&&-card > &-bar &-tab-inactive {
padding: 0;
}
&&-card > &-bar &-nav-wrap {
margin-bottom: 0;
@ -52,6 +52,11 @@
}
}
&&-card &-content > &-tabpane,
&&-editable-card &-content > &-tabpane {
transition: none!important;
}
&&-editable-card > &-bar &-tab > div {
transition: all 0.3s @ease-in-out;
}

View File

@ -202,6 +202,7 @@
> .@{tab-prefix-cls}-tabpane-inactive {
opacity: 0;
height: 0;
padding: 0!important;
}
}
> .@{tab-prefix-cls}-content-animated {