@@ -53,7 +52,7 @@ class AntTag extends React.Component {
}
AntTag.defaultProps = {
- prefixCls: prefixCls,
+ prefixCls: 'ant-tag',
closable: false,
onClose: function() {}
};
diff --git a/style/components/badge.less b/style/components/badge.less
index 3a868f176a..0a99910403 100644
--- a/style/components/badge.less
+++ b/style/components/badge.less
@@ -40,6 +40,17 @@
z-index: 10;
box-shadow: 0 0 0 1px #fff;
}
+
+ &-zoom-appear,
+ &-zoom-enter {
+ animation: antZoomBadgeIn .3s @ease-out-back;
+ animation-fill-mode: both;
+ }
+
+ &-zoom-leave {
+ animation: antZoomBadgeOut .3s @ease-in-back;
+ animation-fill-mode: both;
+ }
}
a .@{badge-prefix-cls} {
@@ -51,3 +62,22 @@ a .@{badge-prefix-cls} {
}
}
+@keyframes antZoomBadgeIn {
+ 0% {
+ opacity: 0;
+ transform: scale(0) translateX(-50%);
+ }
+ 100% {
+ transform: scale(1) translateX(-50%);
+ }
+}
+
+@keyframes antZoomBadgeOut {
+ 0% {
+ transform: scale(1) translateX(-50%);
+ }
+ 100% {
+ opacity: 0;
+ transform: scale(0) translateX(-50%);
+ }
+}
diff --git a/style/components/tag.less b/style/components/tag.less
index c915dd3713..1fb932597d 100644
--- a/style/components/tag.less
+++ b/style/components/tag.less
@@ -71,9 +71,13 @@
}
&-close {
-
width: 0 !important;
padding: 0;
margin-right: 0;
}
+
+ &-zoom-leave {
+ animation: antZoomOut .3s @ease-in-out-circ;
+ animation-fill-mode: both;
+ }
}
diff --git a/style/core/motion/zoom.less b/style/core/motion/zoom.less
index 1428600d89..24227f5cba 100644
--- a/style/core/motion/zoom.less
+++ b/style/core/motion/zoom.less
@@ -16,41 +16,6 @@
.zoom-motion(zoom-left, antZoomLeft);
.zoom-motion(zoom-right, antZoomRight);
-.zoom-badge-appear,.zoom-badge-enter {
- animation: antZoomBadgeIn .3s @ease-out-back;
- animation-fill-mode: both;
-}
-
-.zoom-badge-leave {
- animation: antZoomBadgeOut .3s @ease-in-back;
- animation-fill-mode: both;
-}
-
-.zoom-tag-leave {
- animation: antZoomOut .3s @ease-in-out-circ;
- animation-fill-mode: both;
-}
-
-@keyframes antZoomBadgeIn {
- 0% {
- opacity: 0;
- transform: scale(0) translateX(-50%);
- }
- 100% {
- transform: scale(1) translateX(-50%);
- }
-}
-
-@keyframes antZoomBadgeOut {
- 0% {
- transform: scale(1) translateX(-50%);
- }
- 100% {
- opacity: 0;
- transform: scale(0) translateX(-50%);
- }
-}
-
@keyframes antZoomIn {
0% {
opacity: 0;