From dc1e05f9e9c1ded51fa16ede41a3e24394ee307c Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 27 Jan 2016 14:48:25 +0800 Subject: [PATCH] fix(tag): Add enter animation --- components/tag/index.jsx | 9 +++++---- style/components/tag.less | 7 ++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/components/tag/index.jsx b/components/tag/index.jsx index 3e9f3ab8ff..d7356b1353 100644 --- a/components/tag/index.jsx +++ b/components/tag/index.jsx @@ -44,10 +44,11 @@ class AntTag extends React.Component { [prefixCls + '-close']: this.state.closing, }); return ( - + {this.state.closed ? null : (
diff --git a/style/components/tag.less b/style/components/tag.less index 598d5b046d..f187d431a4 100644 --- a/style/components/tag.less +++ b/style/components/tag.less @@ -12,7 +12,6 @@ margin-right: 4px; margin-bottom: 8px; transition: all 0.3s @ease-in-out-circ; - transform-origin: 100% 50%; vertical-align: middle; opacity: 0.85; overflow: hidden; @@ -84,6 +83,12 @@ margin: 0; } + &-zoom-enter, + &-zoom-appear { + animation: antZoomIn .2s @ease-in-out-circ; + animation-fill-mode: both; + } + &-zoom-leave { animation: antZoomOut .2s @ease-in-out-circ; animation-fill-mode: both;