Browse Source

Fix badge style in Maxthon, close #5477

pull/5480/head
afc163 8 years ago
parent
commit
b090dec8e0
  1. 9
      components/badge/ScrollNumber.tsx
  2. 11
      components/badge/style/index.less

9
components/badge/ScrollNumber.tsx

@ -1,7 +1,5 @@
import React from 'react';
import { createElement, Component } from 'react';
import { findDOMNode } from 'react-dom';
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
import assign from 'object-assign';
import omit from 'omit.js';
@ -40,12 +38,6 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
};
}
componentDidMount() {
if (!isCssAnimationSupported()) {
findDOMNode(this).className += ' not-support-css-animation';
}
}
getPositionByNum(num, i) {
if (this.state.animateStarted) {
return 10 + num;
@ -109,6 +101,7 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
className: `${this.props.prefixCls}-only`,
style: {
transition: removeTransition && 'none',
msTransform: `translateY(${-position * 100}%)`,
WebkitTransform: `translateY(${-position * 100}%)`,
transform: `translateY(${-position * 100}%)`,
},

11
components/badge/style/index.less

@ -123,21 +123,12 @@
overflow: hidden;
&-only {
display: inline-block;
transition: transform .3s @ease-in-out;
transition: all .3s @ease-in-out;
height: @badge-height;
> p {
height: @badge-height;
}
}
// for IE8/9 display
&.not-support-css-animation &-only {
> p {
display: none;
&.current {
display: block;
}
}
}
}
@keyframes antZoomBadgeIn {

Loading…
Cancel
Save