Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
8a99d0bc
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8a99d0bc
编写于
8月 27, 2015
作者:
Z
zhujun24
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add vertical steps
上级
f664275a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
125 addition
and
30 deletion
+125
-30
components/steps/demo/vertical-small.md
components/steps/demo/vertical-small.md
+40
-0
components/steps/demo/vertical.md
components/steps/demo/vertical.md
+2
-2
components/steps/index.jsx
components/steps/index.jsx
+2
-1
components/steps/index.md
components/steps/index.md
+1
-0
style/components/steps.less
style/components/steps.less
+80
-27
未找到文件。
components/steps/demo/vertical-small.md
0 → 100644
浏览文件 @
8a99d0bc
# 竖直方向的小型步骤条
-
order: 5
简单的竖直方向的小型步骤条。
---
````
jsx
var
Steps
=
antd
.
Steps
;
var
Step
=
Steps
.
Step
;
var
container
=
document
.
getElementById
(
'
components-steps-demo-vertical-small
'
);
var
steps
=
[{
status
:
'
finish
'
,
title
:
'
已完成
'
,
description
:
'
这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊这里是多信息的描述啊
'
},
{
status
:
'
process
'
,
title
:
'
进行中
'
,
description
:
'
描述啊描述啊描述啊描述啊描述啊描述啊
'
},
{
status
:
'
wait
'
,
title
:
'
又一个待运行
'
,
description
:
'
描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊述啊描述描述述描述啊描述啊描述啊描述啊描述啊
'
},
{
status
:
'
wait
'
,
title
:
'
待运行
'
,
description
:
'
描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊描述啊
'
}].
map
(
function
(
s
,
i
)
{
return
(<
Step
key
=
{
i
}
status
=
{
s
.
status
}
title
=
{
s
.
title
}
description
=
{
s
.
description
}
></
Step
>
);
});
React
.
render
(<
Steps
size
=
'small'
direction
=
'vertical'
maxDescriptionWidth
=
'400'
>
{
steps
}
</
Steps
>,
container
);
````
components/steps/demo/vertical.md
浏览文件 @
8a99d0bc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
-
order: 4
-
order: 4
简单的步骤条。
简单的
竖直方向的
步骤条。
---
---
...
@@ -36,5 +36,5 @@ var steps = [{
...
@@ -36,5 +36,5 @@ var steps = [{
);
);
});
});
React
.
render
(<
Steps
direction
=
{
'
vertical
'
}
maxDescriptionWidth
=
{
'
300
'
}
>
{
steps
}
</
Steps
>,
container
);
React
.
render
(<
Steps
direction
=
'vertical'
maxDescriptionWidth
=
'400'
>
{
steps
}
</
Steps
>,
container
);
````
````
components/steps/index.jsx
浏览文件 @
8a99d0bc
...
@@ -11,10 +11,11 @@ const AntSteps = React.createClass({
...
@@ -11,10 +11,11 @@ const AntSteps = React.createClass({
};
};
},
},
render
()
{
render
()
{
let
stepsCls
=
this
.
props
.
direction
===
'
vertical
'
?
(
this
.
props
.
size
===
'
small
'
?
'
ant-steps-vertical-small ant-steps
'
:
'
ant-steps-vertical ant-steps
'
)
:
'
ant-steps
'
;
return
(<
Steps
size
=
{
this
.
props
.
size
}
return
(<
Steps
size
=
{
this
.
props
.
size
}
iconPrefix
=
{
this
.
props
.
iconPrefix
}
iconPrefix
=
{
this
.
props
.
iconPrefix
}
maxDescriptionWidth
=
{
this
.
props
.
maxDescriptionWidth
}
maxDescriptionWidth
=
{
this
.
props
.
maxDescriptionWidth
}
prefixCls
=
{
this
.
props
.
direction
===
'
vertical
'
?
'
ant-steps-vertical ant-steps
'
:
'
ant-steps
'
}
>
prefixCls
=
{
stepsCls
}
>
{
this
.
props
.
children
}
{
this
.
props
.
children
}
</
Steps
>);
</
Steps
>);
}
}
...
...
components/steps/index.md
浏览文件 @
8a99d0bc
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
| 参数 | 说明 | 类型 | 可选值 |默认值 |
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|-----------|------------------------------------------|------------|-------|--------|
|-----------|------------------------------------------|------------|-------|--------|
| size | 可选参数,指定大小(目前只支持普通和迷你两种大小)。 | string | small, default | default |
| size | 可选参数,指定大小(目前只支持普通和迷你两种大小)。 | string | small, default | default |
| direction | 可选参数,指定步骤条方向(目前支持水平和竖直两种方向,默认水平方向)。 | string | vertical, default | default |
| maxDescriptionWidth | 可选参数,指定步骤的详细描述文字的最大宽度。 | number | 无 | 100 |
| maxDescriptionWidth | 可选参数,指定步骤的详细描述文字的最大宽度。 | number | 无 | 100 |
### Steps.Step
### Steps.Step
...
...
style/components/steps.less
浏览文件 @
8a99d0bc
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
@steps-prefix-cls: ~"@{css-prefix}steps";
@steps-prefix-cls: ~"@{css-prefix}steps";
@steps-vertical-prefix-cls: ~"@{css-prefix}steps-vertical";
@steps-vertical-prefix-cls: ~"@{css-prefix}steps-vertical";
@steps-vertical-small-prefix-cls: ~"@{css-prefix}steps-vertical-small";
@process-icon-color: @primary-color;
@process-icon-color: @primary-color;
@process-title-color: #666;
@process-title-color: #666;
...
@@ -246,34 +247,86 @@
...
@@ -246,34 +247,86 @@
width: 1px;
width: 1px;
}
}
}
}
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-main {
min-height: 47px;
}
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-head-inner {
.@{steps-vertical-prefix-cls}.@{steps-prefix-cls}-head-inner {
margin-right: 16px;
margin-right: 16px;
}
}
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
// display: block;
.@{steps-prefix-cls}-item.@{steps-vertical-small-prefix-cls} {
//}
display: block;
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
}
// display: block;
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail {
//}
left: 7px;
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
height: 100%;
// display: block;
width: 2px;
//}
top: 0;
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
padding: 0;
// display: block;
> i {
//}
height: 100%;
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
width: 0px;
// display: block;
}
//}
}
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-wait {
// display: block;
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail {
//}
> i {
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
background-color: #fff;
// display: block;
border-left: 2px dotted @wait-tail-color;
//}
}
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
}
// display: block;
}
//}
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-process {
//.@{steps-prefix-cls}-item.@{steps-vertical-prefix-cls} {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail {
// display: block;
> i {
//}
background-color: #fff;
border-left: 2px dotted @process-tail-color;
}
}
}
.@{steps-prefix-cls}-item.@{steps-prefix-cls}-status-finish {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-tail {
> i {
background-color: #fff;
border-left: 2px solid @finish-tail-color;
}
}
}
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-main {
min-height: 47px;
}
.@{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-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner {
text-indent: 1000px;
display: inline-block;
background-color: #fff;
}
}
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner {
width: 16px;
height: 16px;
border-width: 2px;
}
.@{steps-prefix-cls}-status-finish {
.@{steps-vertical-small-prefix-cls}.@{steps-prefix-cls}-head-inner {
background-color: @finish-tail-color;
}
}
.@{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;
font-weight: 700;
position: relative;
top: -3px;
}
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录