提交 9a781439 编写于 作者: Z zhujun24

vertical re-stpes 1.2.1

上级 d720a908
...@@ -4,30 +4,22 @@ import Steps from 'rc-steps'; ...@@ -4,30 +4,22 @@ import Steps from 'rc-steps';
const AntSteps = React.createClass({ const AntSteps = React.createClass({
getDefaultProps() { getDefaultProps() {
return { return {
prefixCls: 'ant-steps',
iconPrefix: 'ant', iconPrefix: 'ant',
size: 'default', size: 'default',
maxDescriptionWidth: 100 maxDescriptionWidth: 100
}; };
}, },
render() { render() {
let stepsCls = '';
if (this.props.direction === 'vertical') {
if (this.props.size === 'small') {
stepsCls = 'ant-steps-vertical-small ant-steps';
} else {
stepsCls = 'ant-steps-vertical ant-steps';
}
} else {
stepsCls = 'ant-steps';
}
return (<Steps size={this.props.size} return (<Steps size={this.props.size}
direction={this.props.direction}
iconPrefix={this.props.iconPrefix} iconPrefix={this.props.iconPrefix}
maxDescriptionWidth={this.props.maxDescriptionWidth} maxDescriptionWidth={this.props.maxDescriptionWidth}
prefixCls={stepsCls}> prefixCls={this.props.prefixCls}>
{this.props.children} {this.props.children}
</Steps>); </Steps>);
} }
}); });
AntSteps.Step = Steps.Step; AntSteps.Step = Steps.Step;
export default AntSteps; export default AntSteps;
\ No newline at end of file
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"rc-radio": "~2.0.0", "rc-radio": "~2.0.0",
"rc-select": "~4.8.1", "rc-select": "~4.8.1",
"rc-slider": "~1.4.0", "rc-slider": "~1.4.0",
"rc-steps": "~1.1.4", "rc-steps": "~1.2.1",
"rc-switch": "~1.2.0", "rc-switch": "~1.2.0",
"rc-table": "~3.1.0", "rc-table": "~3.1.0",
"rc-tabs": "~5.3.2", "rc-tabs": "~5.3.2",
......
...@@ -231,121 +231,124 @@ ...@@ -231,121 +231,124 @@
} }
} }
.@{steps-prefix-cls} { .@{steps-prefix-cls}-vertical {
.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} { .@{steps-prefix-cls}-item {
display: block; display: block;
} }
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-tail { .@{steps-prefix-cls}-tail {
position: absolute;
left: 13px; left: 13px;
top: 0;
height: 100%; height: 100%;
width: 1px; width: 1px;
top: 0;
padding: 30px 0 4px 0; padding: 30px 0 4px 0;
> i { > i {
height: 100%; height: 100%;
width: 1px; width: 1px;
} }
} }
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-main { .@{steps-prefix-cls}-head {
min-height: 47px; float: left;
&-inner {
margin-right: 16px;
}
} }
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-head-inner { .@{steps-prefix-cls}-main {
margin-right: 16px; max-width: 100%;
min-height: 47px;
overflow: hidden;
display: block;
.@{steps-prefix-cls}-title {
line-height: 26px;
}
.@{steps-prefix-cls}-description {
padding-bottom: 12px;
}
} }
}
.@{steps-prefix-cls}-item.@{steps-vertical-small-prefix-cls} { .@{steps-prefix-cls}-vertical.@{steps-prefix-cls}-small {
.@{steps-prefix-cls}-item {
display: block; display: block;
} }
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail { .@{steps-prefix-cls}-tail {
position: absolute;
left: 6px; left: 6px;
top: 0;
height: 100%; height: 100%;
width: 2px; width: 2px;
top: 0;
padding: 0; padding: 0;
> i { > i {
height: 100%; height: 100%;
width: 0px; width: 0px;
} }
} }
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-wait { .@{steps-prefix-cls}-status-wait {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail { .@{steps-prefix-cls}-tail {
> i { > i {
background-color: #fff; background-color: #fff;
border-left: 2px dotted @wait-tail-color; border-left: 2px dotted @wait-tail-color;
} }
} }
} }
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-process { .@{steps-prefix-cls}-status-process {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail { .@{steps-prefix-cls}-tail {
> i { > i {
background-color: #fff; background-color: #fff;
border-left: 2px dotted @process-tail-color; border-left: 2px dotted @process-tail-color;
} }
} }
} }
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-finish { .@{steps-prefix-cls}-status-finish {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail { .@{steps-prefix-cls}-tail {
> i { > i {
background-color: #fff; background-color: #fff;
border-left: 2px solid @finish-tail-color; border-left: 2px solid @finish-tail-color;
} }
} }
} }
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-main { .@{steps-prefix-cls}-main {
max-width: 100%;
min-height: 47px; min-height: 47px;
display: inline; overflow: hidden;
zoom: 1; display: block;
.@{steps-prefix-cls}-description { .@{steps-prefix-cls}-title {
margin-left: 42px; line-height: 14px;
} }
}
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-main {
min-height: 47px;
display: inline;
zoom: 1;
.@{steps-prefix-cls}-description { .@{steps-prefix-cls}-description {
margin-left: 22px; padding-bottom: 12px;
} }
} }
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner {
margin-right: 8px;
background-color: #2db7f5;
}
.@{steps-prefix-cls}-status-wait, .@{steps-prefix-cls}-status-process { .@{steps-prefix-cls}-status-wait, .@{steps-prefix-cls}-status-process {
overflow: hidden; overflow: hidden;
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner { .@{steps-prefix-cls}-head-inner {
text-indent: 10000px; text-indent: 10000px;
display: inline-block; display: inline-block;
background-color: #fff; background-color: #fff;
} }
} }
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner { .@{steps-prefix-cls}-head-inner {
width: 14px; width: 14px;
height: 14px; height: 14px;
margin-right: 8px;
background-color: #2db7f5;
border-width: 2px; border-width: 2px;
} }
.@{steps-prefix-cls}-status-finish { .@{steps-prefix-cls}-status-finish {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner { .@{steps-prefix-cls}-head-inner {
background-color: @finish-tail-color; background-color: @finish-tail-color;
} .@{steps-prefix-cls}-icon:before {
}
.@{steps-prefix-cls}-status-finish {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-icon:before {
color: #fff; color: #fff;
font-weight: 700; font-weight: 700;
position: absolute; position: absolute;
...@@ -354,8 +357,4 @@ ...@@ -354,8 +357,4 @@
} }
} }
} }
}
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-description, .@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-description { \ No newline at end of file
padding-bottom: 12px;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册