Merge branch 'develop-0.11.0' of github.com:ant-design/ant-design into develop-0.11.0

This commit is contained in:
afc163 2015-12-16 15:48:02 +08:00
commit 55315649bc
16 changed files with 19 additions and 32 deletions

View File

@ -8,7 +8,6 @@
````jsx
import { Checkbox } from 'antd';
const container = document.getElementById('components-checkbox-demo-basic');
function onChange(e) {
console.log('checked = ' + e.target.checked);
@ -17,5 +16,5 @@ function onChange(e) {
ReactDOM.render(<label>
<Checkbox defaultChecked={false} onChange={onChange} />
Checkbox
</label>, container);
</label>, document.getElementById('components-checkbox-demo-basic'));
````

View File

@ -8,7 +8,6 @@
````jsx
import { Checkbox, Button } from 'antd';
const container = document.getElementById('components-checkbox-demo-controller');
const App = React.createClass({
getInitialState() {
@ -56,5 +55,5 @@ const App = React.createClass({
}
});
ReactDOM.render(<App />, container);
ReactDOM.render(<App />, document.getElementById('components-checkbox-demo-controller'));
````

View File

@ -8,11 +8,10 @@ checkbox 不可用。
````jsx
import { Checkbox } from 'antd';
const container = document.getElementById('components-checkbox-demo-disable');
ReactDOM.render(<div>
<Checkbox defaultChecked={false} disabled />
<br />
<Checkbox defaultChecked disabled />
</div>, container);
</div>, document.getElementById('components-checkbox-demo-disable'));
````

View File

@ -9,11 +9,10 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-icon');
ReactDOM.render(<Steps>
<Step status="finish" title="步骤1" icon="cloud" />
<Step status="process" title="步骤2" icon="apple" />
<Step status="wait" title="步骤3" icon="github" />
</Steps>, container);
</Steps>, document.getElementById('components-steps-demo-icon'));
````

View File

@ -9,7 +9,6 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-simple');
const steps = [{
title: '已完成',
@ -29,5 +28,5 @@ const steps = [{
);
});
ReactDOM.render(<Steps current={1}>{steps}</Steps>, container);
ReactDOM.render(<Steps current={1}>{steps}</Steps>, document.getElementById('components-steps-demo-simple'));
````

View File

@ -9,7 +9,6 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-small-size');
const steps = [{
status: 'finish',
@ -29,5 +28,5 @@ const steps = [{
);
});
ReactDOM.render(<Steps size="small" current={1}>{steps}</Steps>, container);
ReactDOM.render(<Steps size="small" current={1}>{steps}</Steps>, document.getElementById('components-steps-demo-small-size'));
````

View File

@ -9,7 +9,6 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-status');
const steps = [{
status: 'finish',
@ -33,5 +32,5 @@ const steps = [{
);
});
ReactDOM.render(<Steps>{steps}</Steps>, container);
ReactDOM.render(<Steps>{steps}</Steps>, document.getElementById('components-steps-demo-status'));
````

View File

@ -15,7 +15,6 @@
````jsx
import { Steps, Button } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-step-next');
const array = Array.apply(null, Array(Math.floor(Math.random() * 3) + 3));
const steps = array.map(function(item, i) {
return {
@ -54,5 +53,5 @@ const App = React.createClass({
}
});
ReactDOM.render(<App />, container);
ReactDOM.render(<App />, document.getElementById('components-steps-demo-step-next'));
````

View File

@ -9,7 +9,6 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-vertical-small');
const steps = [{
title: '已完成',
@ -26,5 +25,6 @@ const steps = [{
);
});
ReactDOM.render(<Steps size="small" direction="vertical" current={1}>{steps}</Steps>, container);
ReactDOM.render(<Steps size="small" direction="vertical" current={1}>{steps}</Steps>,
document.getElementById('components-steps-demo-vertical-small'));
````

View File

@ -9,7 +9,6 @@
````jsx
import { Steps } from 'antd';
const Step = Steps.Step;
const container = document.getElementById('components-steps-demo-vertical');
const steps = [{
title: '已完成',
@ -29,5 +28,6 @@ const steps = [{
);
});
ReactDOM.render(<Steps direction="vertical" current={1}>{steps}</Steps>, container);
ReactDOM.render(<Steps direction="vertical" current={1}>{steps}</Steps>,
document.getElementById('components-steps-demo-vertical'));
````

View File

@ -8,11 +8,11 @@
````jsx
import { Switch } from 'antd';
const container = document.getElementById('components-switch-demo-basic');
function onChange(checked){
console.log('switch to ' + checked);
}
ReactDOM.render(<Switch defaultChecked={false} onChange={onChange} />, container);
ReactDOM.render(<Switch defaultChecked={false} onChange={onChange} />,
document.getElementById('components-switch-demo-basic'));
````

View File

@ -8,7 +8,6 @@ Switch 失效状态。
````jsx
import { Switch, Button } from 'antd';
const container = document.getElementById('components-switch-demo-disabled');
const Test = React.createClass({
getInitialState() {
@ -31,5 +30,5 @@ const Test = React.createClass({
}
});
ReactDOM.render(<Test />, container);
ReactDOM.render(<Test />, document.getElementById('components-switch-demo-disabled'));
````

View File

@ -8,11 +8,10 @@
````jsx
import { Switch, Icon } from 'antd';
const container = document.getElementById('components-switch-demo-text');
ReactDOM.render(<div>
<Switch checkedChildren="开" unCheckedChildren="关" />
<span> </span>
<Switch checkedChildren={<Icon type="check" />} unCheckedChildren={<Icon type="cross" />} />
</div>, container);
</div>, document.getElementById('components-switch-demo-text'));
````

View File

@ -8,7 +8,6 @@
````jsx
import { Timeline } from 'antd';
const container = document.getElementById('components-timeline-demo-basic');
ReactDOM.render(
<Timeline>
@ -17,5 +16,5 @@ ReactDOM.render(
<Timeline.Item>技术测试异常 2015-09-01</Timeline.Item>
<Timeline.Item>网络异常正在修复 2015-09-01</Timeline.Item>
</Timeline>
, container);
, document.getElementById('components-timeline-demo-basic'));
````

View File

@ -8,7 +8,6 @@
````jsx
import { Timeline } from 'antd';
const container = document.getElementById('components-timeline-demo-color');
ReactDOM.render(
<Timeline>
@ -25,5 +24,5 @@ ReactDOM.render(
<p>技术测试异常3 2015-09-01</p>
</Timeline.Item>
</Timeline>
, container);
, document.getElementById('components-timeline-demo-color'));
````

View File

@ -8,7 +8,6 @@
````jsx
import { Timeline } from 'antd';
const container = document.getElementById('components-timeline-demo-pending');
ReactDOM.render(
<Timeline pending>
@ -16,5 +15,5 @@ ReactDOM.render(
<Timeline.Item>初步排除网络异常 2015-09-01</Timeline.Item>
<Timeline.Item>技术测试异常 2015-09-01</Timeline.Item>
</Timeline>
, container);
, document.getElementById('components-timeline-demo-pending'));
````