Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
943fbd3d
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,发现更多精彩内容 >>
提交
943fbd3d
编写于
7月 08, 2015
作者:
羽
羽航
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整steps的样式
上级
1b64113b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
77 addition
and
54 deletion
+77
-54
components/steps/demo/custom-icon.md
components/steps/demo/custom-icon.md
+0
-35
components/steps/demo/icon.md
components/steps/demo/icon.md
+19
-0
components/steps/index.jsx
components/steps/index.jsx
+3
-1
package.json
package.json
+1
-1
style/components/steps.less
style/components/steps.less
+54
-17
未找到文件。
components/steps/demo/custom-icon.md
已删除
100644 → 0
浏览文件 @
1b64113b
# 自定义图标步骤条
-
order: 2
通过设置
`Steps.Step`
的
`icon`
属性,可以启用自定义图标。
---
<style>
.my-step-icon {
width: 35px;
height: 35px;
font-size: 35px;
line-height: 1;
position: relative;
top: -9px;
}
.my-step-icon > img {
width: 45px;
height: 45px;
}
</style>
````
jsx
var
Steps
=
antd
.
Steps
;
var
Step
=
Steps
.
Step
;
var
container
=
document
.
getElementById
(
'
components-steps-demo-custom-icon
'
);
React
.
render
(<
Steps
>
<
Step
status
=
'finish'
title
=
'步骤1'
icon
=
{
<
div
className
=
'my-step-icon'
><
span
className
=
'anticon anticon-cloud'
></
span
></
div
>
}
></
Step
>
<
Step
status
=
'process'
title
=
'步骤2'
icon
=
{
<
div
className
=
'my-step-icon'
><
span
className
=
'anticon anticon-apple'
></
span
></
div
>
}
></
Step
>
<
Step
status
=
'wait'
title
=
'步骤3'
icon
=
{
<
div
className
=
'my-step-icon'
><
span
className
=
'anticon anticon-github'
></
span
></
div
>
}
></
Step
>
</
Steps
>,
container
);
````
components/steps/demo/icon.md
0 → 100644
浏览文件 @
943fbd3d
# 带ICON图标的步骤条
-
order: 2
通过设置
`Steps.Step`
的
`icon`
属性,可以启用自定义图标。
---
````
jsx
var
Steps
=
antd
.
Steps
;
var
Step
=
Steps
.
Step
;
var
container
=
document
.
getElementById
(
'
components-steps-demo-icon
'
);
React
.
render
(<
Steps
>
<
Step
status
=
'finish'
title
=
'步骤1'
icon
=
'cloud'
></
Step
>
<
Step
status
=
'process'
title
=
'步骤2'
icon
=
'apple'
></
Step
>
<
Step
status
=
'wait'
title
=
'步骤3'
icon
=
'github'
></
Step
>
</
Steps
>,
container
);
````
components/steps/index.jsx
浏览文件 @
943fbd3d
...
...
@@ -7,13 +7,15 @@ var AntSteps = React.createClass({
getDefaultProps
()
{
return
{
prefixCls
:
'
ant-steps
'
,
iconPrefix
:
'
ant
'
,
size
:
'
default
'
,
maxDescriptionWidth
:
100
};
},
render
()
{
return
(<
Steps
size
=
{
this
.
props
.
size
}
maxDescriptionWidth
=
{
this
.
props
.
maxDescriptionWidth
}
iconPrefix
=
{
this
.
props
.
iconPrefix
}
maxDescriptionWidth
=
{
this
.
props
.
maxDescriptionWidth
}
prefixCls
=
{
this
.
props
.
prefixCls
}
>
{
this
.
props
.
children
}
</
Steps
>);
...
...
package.json
浏览文件 @
943fbd3d
...
...
@@ -21,7 +21,7 @@
"
rc-menu
"
:
"
~3.4.0
"
,
"
rc-progress
"
:
"
~1.0.0
"
,
"
rc-select
"
:
"
~4.0.0
"
,
"
rc-steps
"
:
"
~1.1.
2
"
,
"
rc-steps
"
:
"
~1.1.
3
"
,
"
rc-tabs
"
:
"
~5.1.0
"
,
"
rc-tooltip
"
:
"
~2.2.3
"
},
...
...
style/components/steps.less
浏览文件 @
943fbd3d
@import "../mixins/index";
@stepsPrefixClass: ~"@{css-prefix}steps";
@active-color: #3fc7fa;
@wait-color: #e9e9e9;
@process-icon-color: #3fc7fa;
@process-title-color: #666;
@process-description-color: @process-title-color;
@process-tail-color: #bcbcbc;
@wait-icon-color: #bcbcbc;
@wait-title-color: #999;
@wait-description-color: @wait-title-color;
@wait-tail-color: @wait-icon-color;
@finish-icon-color: @process-icon-color;
@finish-title-color: @wait-title-color;
@finish-description-color: @finish-title-color;
@finish-tail-color: @process-icon-color;
.transition(@transition) {
transition: @transition;
-webkit-transition: @transition;
-moz-transition: @transition;
}
.@{stepsPrefixClass} {
...
...
@@ -19,34 +31,56 @@
&.@{stepsPrefixClass}-status-wait {
.@{stepsPrefixClass}-head-inner {
border-color: @wait-color;
border-color: @wait-
icon-
color;
background-color: #fff;
> .@{stepsPrefixClass}-icon {
color: @wait-color;
color: @wait-
icon-
color;
}
}
.@{stepsPrefixClass}-title {
color: @wait-title-color;
}
.@{stepsPrefixClass}-description {
color: @wait-description-color;
}
.@{stepsPrefixClass}-tail > i {
background-color: @wait-tail-color;
}
}
&.@{stepsPrefixClass}-status-process {
.@{stepsPrefixClass}-head-inner {
border-color: @active-color;
background-color: @active-color;
border-color: @process-icon-color;
background-color: @process-icon-color;
> .@{stepsPrefixClass}-icon {
color: #fff;
}
}
.@{stepsPrefixClass}-title {
color: @process-title-color;
}
.@{stepsPrefixClass}-description {
color: @process-description-color;
}
.@{stepsPrefixClass}-tail > i {
background-color: @process-tail-color;
}
}
&.@{stepsPrefixClass}-status-finish {
.@{stepsPrefixClass}-head-inner {
border-color: @
active
-color;
border-color: @
finish-icon
-color;
background-color: #fff;
> .@{stepsPrefixClass}-icon {
color: @
active
-color;
color: @
finish-icon
-color;
}
}
.@{stepsPrefixClass}-tail > i {
background-color: @active-color;
background-color: @finish-tail-color;
}
.@{stepsPrefixClass}-title {
color: @finish-title-color;
}
.@{stepsPrefixClass}-description {
color: @finish-description-color;
}
}
...
...
@@ -54,10 +88,13 @@
.@{stepsPrefixClass}-head-inner {
background: none;
border: 0;
font-size: 20px;
width: auto;
height: auto;
}
&.@{stepsPrefixClass}-status-process {
.@{stepsPrefixClass}-
title
{
color: @
active
-color;
.@{stepsPrefixClass}-
head-inner > .@{stepsPrefixClass}-icon
{
color: @
process-icon
-color;
}
}
}
...
...
@@ -75,14 +112,14 @@
.@{stepsPrefixClass}-head-inner {
display: block;
border:2px solid @wait-color;
border:2px solid @wait-
icon-
color;
width: 24px;
height: 24px;
line-height: 22px;
text-align: center;
border-radius: 24px;
font-size: 14px;
margin-right:
12
px;
margin-right:
8
px;
.transition(background-color 0.1s ease);
.transition(border-color 0.1s ease);
...
...
@@ -123,7 +160,7 @@
padding:0 10px;
> i {
display: inline-block;
background: @wait-color;
background: @wait-
tail-
color;
height: 2px;
border-radius: 1px;
width: 100%;
...
...
@@ -132,7 +169,7 @@
&.@{stepsPrefixClass}-small {
.@{stepsPrefixClass}-head-inner {
border:1px solid @wait-color;
border:1px solid @wait-
icon-
color;
width: 18px;
height: 18px;
line-height: 18px;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录