From 29638d3d3bd80d460a89393a238b4db101336b3d Mon Sep 17 00:00:00 2001 From: zhujun24 Date: Mon, 7 Sep 2015 15:26:42 +0800 Subject: [PATCH] rename pending api --- .../timeline/demo/{continue.md => pending.md} | 4 ++-- components/timeline/index.jsx | 13 ++++++------- components/timeline/index.md | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) rename components/timeline/demo/{continue.md => pending.md} (91%) diff --git a/components/timeline/demo/continue.md b/components/timeline/demo/pending.md similarity index 91% rename from components/timeline/demo/continue.md rename to components/timeline/demo/pending.md index d8955b70b8..1593584941 100644 --- a/components/timeline/demo/continue.md +++ b/components/timeline/demo/pending.md @@ -8,10 +8,10 @@ ````jsx let Timeline = antd.Timeline; -let container = document.getElementById('components-timeline-demo-continue'); +let container = document.getElementById('components-timeline-demo-pending'); React.render( - + 创建服务现场 2015-09-01 初步排除网络异常 2015-09-01 技术测试异常 2015-09-01 diff --git a/components/timeline/index.jsx b/components/timeline/index.jsx index be08b83f87..9784873638 100644 --- a/components/timeline/index.jsx +++ b/components/timeline/index.jsx @@ -8,13 +8,12 @@ let Timeline = React.createClass({ }, render() { let children = this.props.children; - let continuee = this.props.continue; return (
    {React.Children.map(children, function (ele, idx) { let np = { timelineLast: idx === children.length - 1, - continuee: continuee + pending: this.props.pending }; return React.cloneElement(ele, np); }, this)} @@ -28,18 +27,18 @@ Timeline.Item = React.createClass({ return { prefixCls: 'ant-timeline', color: 'blue', - continuee: false + pending: false }; }, render() { let props = this.props; let prefixCls = props.prefixCls; let color = props.color; - let continuee = props.continuee; + let pending = props.pending; let timelineLast = props.timelineLast; - let endCls = continuee && timelineLast ? prefixCls + '-item-last' : ''; - let last = continuee && timelineLast ?
    : null; - let lastTailShow = (timelineLast && !continuee) ? 'none' : 'block'; + let endCls = pending && timelineLast ? prefixCls + '-item-last' : ''; + let last = pending && timelineLast ?
    : null; + let lastTailShow = (timelineLast && !pending) ? 'none' : 'block'; return (
  • diff --git a/components/timeline/index.md b/components/timeline/index.md index 9a1b68dab5..cdfb8d24dd 100644 --- a/components/timeline/index.md +++ b/components/timeline/index.md @@ -30,7 +30,7 @@ | 参数 | 说明 | 类型 | 可选值 |默认值 | |-----------|------------------------------------------|------------|-------|--------| -| continue | 指定最后一个幽灵节点。 | boolean | 无 | false | +| pending | 指定最后一个幽灵节点。 | boolean | 无 | false | ### Timeline.Item