Merge branch 'develop-1.0.0' of https://github.com/wizawu/ant-design into wizawu-develop-1.0.0

This commit is contained in:
afc163 2016-04-15 11:37:50 +08:00
commit 28a3e706ee
4 changed files with 8 additions and 5 deletions

View File

@ -27,7 +27,7 @@ const Card = React.createClass({
);
return (
<div>
<Spin spining={this.state.loading}>{container}</Spin>
<Spin spinning={this.state.loading}>{container}</Spin>
切换加载状态:<Switch checked={this.state.loading} onChange={this.toggle} />
</div>
);

View File

@ -6,6 +6,8 @@ import { isCssAnimationSupported } from 'css-animation';
export default class Spin extends React.Component {
static defaultProps = {
prefixCls: 'ant-spin',
spinning: true,
// Backwards support
spining: true,
}
@ -27,13 +29,14 @@ export default class Spin extends React.Component {
render() {
const { className, size, prefixCls, tip } = this.props;
const spinning = this.props.spinning && this.props.spining;
let spinClassName = classNames({
[prefixCls]: true,
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-lg`]: size === 'large',
[className]: !!className,
[`${prefixCls}-spining`]: this.props.spining,
[`${prefixCls}-spinning`]: spinning,
[`${prefixCls}-show-text`]: !!this.props.tip,
});
@ -48,7 +51,7 @@ export default class Spin extends React.Component {
if (this.isNestedPattern()) {
return (
<div className={this.props.spining ? (`${prefixCls}-nested-loading`) : ''}>
<div className={spinning ? (`${prefixCls}-nested-loading`) : ''}>
{spinElement}
<div className={`${prefixCls}-container`}>
{this.props.children}

View File

@ -18,5 +18,5 @@ english: Spin
| 参数 | 类型 | 默认值 | 说明 |
|------------|----------------|-------------|--------------|
| size | enum | default | spin组件中点的大小可选值为 small default large |
| spining | boolean | true | 用于内嵌其他组件的模式,可以关闭 loading 效果 |
| spinning | boolean | true | 用于内嵌其他组件的模式,可以关闭 loading 效果 |
| tip | string | 无 | 自定义描述文案 |

View File

@ -18,7 +18,7 @@
transition: opacity 0.3s @ease-in-out-circ;
font-size: @font-size-base;
&-spining {
&-spinning {
opacity: 1;
position: static;
visibility: visible;