Browse Source

Removed redundant dot accesses in example

The `current` variable is defined on the top of the method.
pull/11004/merge
Thomas Billicsich 7 years ago
committed by 偏右
parent
commit
ff70654ffe
  1. 8
      components/steps/demo/step-next.md

8
components/steps/demo/step-next.md

@ -50,20 +50,20 @@ class App extends React.Component {
<Steps current={current}>
{steps.map(item => <Step key={item.title} title={item.title} />)}
</Steps>
<div className="steps-content">{steps[this.state.current].content}</div>
<div className="steps-content">{steps[current].content}</div>
<div className="steps-action">
{
this.state.current < steps.length - 1
current < steps.length - 1
&&
<Button type="primary" onClick={() => this.next()}>Next</Button>
}
{
this.state.current === steps.length - 1
current === steps.length - 1
&&
<Button type="primary" onClick={() => message.success('Processing complete!')}>Done</Button>
}
{
this.state.current > 0
current > 0
&&
<Button style={{ marginLeft: 8 }} onClick={() => this.prev()}>
Previous

Loading…
Cancel
Save