|
|
@ -6,13 +6,13 @@ const AntSpin = React.createClass({ |
|
|
|
getDefaultProps() { |
|
|
|
return { |
|
|
|
prefixCls: 'ant-spin', |
|
|
|
spining: true |
|
|
|
spining: true, |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
propTypes: { |
|
|
|
className: React.PropTypes.string, |
|
|
|
size: React.PropTypes.oneOf(['small', 'default', 'large']) |
|
|
|
size: React.PropTypes.oneOf(['small', 'default', 'large']), |
|
|
|
}, |
|
|
|
|
|
|
|
isNestedPattern() { |
|
|
@ -31,13 +31,12 @@ const AntSpin = React.createClass({ |
|
|
|
}); |
|
|
|
|
|
|
|
let spinElement; |
|
|
|
if (!isCssAnimationSupported) { |
|
|
|
if (!isCssAnimationSupported || 'tip' in this.props) { |
|
|
|
// not support for animation, just use text instead |
|
|
|
spinElement = <div className={spinClassName}>{tip || '加载中...'}</div>; |
|
|
|
} else { |
|
|
|
spinElement = ( |
|
|
|
<div className={spinClassName}> |
|
|
|
<div className={`${prefixCls}-tip`}>{tip}</div> |
|
|
|
<div className={`${prefixCls}-dots`}> |
|
|
|
<span className={`${prefixCls}-dot ${prefixCls}-dot-first`} /> |
|
|
|
<span className={`${prefixCls}-dot ${prefixCls}-dot-second`} /> |
|
|
|