diff --git a/components/steps/demo/error.md b/components/steps/demo/error.md
index c990961ebc..a2c0b42451 100644
--- a/components/steps/demo/error.md
+++ b/components/steps/demo/error.md
@@ -9,19 +9,12 @@ title: 步骤运行错误
import { Steps } from 'antd';
const Step = Steps.Step;
-const steps = [{
- title: '已完成',
- description: '这里是多信息的描述啊',
-}, {
- title: '错误示例',
- description: '这里是多信息的耶哦耶哦哦耶哦耶',
-}, {
- title: '又一个待运行',
- description: '描述啊描述啊',
-}, {
- title: '待运行',
- description: '这里是多信息的描述啊',
-}].map((s, i) => );
-
-ReactDOM.render({steps}, mountNode);
+ReactDOM.render(
+
+
+
+
+
+
+, mountNode);
````
diff --git a/components/steps/demo/icon.md b/components/steps/demo/icon.md
index daa833219e..5284e4495e 100644
--- a/components/steps/demo/icon.md
+++ b/components/steps/demo/icon.md
@@ -9,9 +9,11 @@ title: 带图标的步骤条
import { Steps } from 'antd';
const Step = Steps.Step;
-ReactDOM.render(
-
-
-
-, mountNode);
+ReactDOM.render(
+
+
+
+
+
+, mountNode);
````
diff --git a/components/steps/demo/simple.md b/components/steps/demo/simple.md
index f482f747aa..6737714dc6 100644
--- a/components/steps/demo/simple.md
+++ b/components/steps/demo/simple.md
@@ -9,19 +9,12 @@ title: 基本用法
import { Steps } from 'antd';
const Step = Steps.Step;
-const steps = [{
- title: '已完成',
- description: '这里是多信息的描述啊',
-}, {
- title: '进行中',
- description: '这里是多信息的耶哦耶哦哦耶哦耶',
-}, {
- title: '又一个待运行',
- description: '描述啊描述啊',
-}, {
- title: '待运行',
- description: '这里是多信息的描述啊',
-}].map((s, i) => );
-
-ReactDOM.render({steps}, mountNode);
+ReactDOM.render(
+
+
+
+
+
+
+, mountNode);
````
diff --git a/components/steps/demo/small-size.md b/components/steps/demo/small-size.md
index bc97911a18..2b27fb1bae 100644
--- a/components/steps/demo/small-size.md
+++ b/components/steps/demo/small-size.md
@@ -9,19 +9,12 @@ title: 迷你版
import { Steps } from 'antd';
const Step = Steps.Step;
-const steps = [{
- status: 'finish',
- title: '已完成',
-}, {
- status: 'process',
- title: '进行中',
-}, {
- status: 'wait',
- title: '待运行',
-}, {
- status: 'wait',
- title: '待运行',
-}].map((s, i) => );
-
-ReactDOM.render({steps}, mountNode);
+ReactDOM.render(
+
+
+
+
+
+
+, mountNode);
````
diff --git a/components/steps/demo/step-next.md b/components/steps/demo/step-next.md
index 1b0f088838..7e89ac644f 100644
--- a/components/steps/demo/step-next.md
+++ b/components/steps/demo/step-next.md
@@ -5,43 +5,33 @@ title: 切换到下一步
随机生成 3~6 个步骤,初始随机进行到其中一个步骤。
-````css
-#components-steps-demo-step-next > div > div {
- margin-bottom: 30px;
-}
-````
-
````jsx
import { Steps, Button } from 'antd';
const Step = Steps.Step;
const array = Array.apply(null, Array(Math.floor(Math.random() * 3) + 3));
-const steps = array.map((item, i) => {
- return {
- title: `步骤${i + 1}`,
- };
-});
+const steps = array.map((item, i) => ({
+ title: `步骤${i + 1}`,
+}));
const App = React.createClass({
getInitialState() {
return {
- currentStep: Math.floor(Math.random() * steps.length),
+ current: Math.floor(Math.random() * steps.length),
};
},
next() {
- let s = this.state.currentStep + 1;
- if (s === steps.length) {
- s = 0;
+ let current = this.state.current + 1;
+ if (current === steps.length) {
+ current = 0;
}
- this.setState({
- currentStep: s,
- });
+ this.setState({ current });
},
render() {
- const cs = this.state.currentStep;
+ const { current } = this.state;
return (
-
当前正在执行第 {cs + 1} 步
-
+ 当前正在执行第 {current + 1} 步
+
{steps.map((s, i) => )}
diff --git a/components/steps/demo/vertical-small.md b/components/steps/demo/vertical-small.md
index 5d5e0bda39..d6a4409a67 100644
--- a/components/steps/demo/vertical-small.md
+++ b/components/steps/demo/vertical-small.md
@@ -9,17 +9,12 @@ title: 竖直方向的小型步骤条
import { Steps } from 'antd';
const Step = Steps.Step;
-const steps = [{
- title: '已完成',
- description: '这里是信息的描述',
-}, {
- title: '进行中',
- description: '这里是信息的描述',
-}, {
- title: '待运行',
- description: '这里是信息的描述',
-}].map((s, i) => );
-
-ReactDOM.render({steps},
- mountNode);
+ReactDOM.render(
+
+
+
+
+
+
+, mountNode);
````
diff --git a/components/steps/demo/vertical.md b/components/steps/demo/vertical.md
index ae9b8bfc6f..8c8c12dfb0 100644
--- a/components/steps/demo/vertical.md
+++ b/components/steps/demo/vertical.md
@@ -9,20 +9,12 @@ title: 竖直方向的步骤条
import { Steps } from 'antd';
const Step = Steps.Step;
-const steps = [{
- title: '已完成',
- description: '这里是信息的描述',
-}, {
- title: '进行中',
- description: '这里是信息的描述',
-}, {
- title: '待运行',
- description: '这里是信息的描述',
-}, {
- title: '又一个待运行',
- description: '这里是信息的描述',
-}].map((s, i) => );
-
-ReactDOM.render({steps},
- mountNode);
+ReactDOM.render(
+
+
+
+
+
+
+, mountNode);
````