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