Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
2c523d72
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,发现更多精彩内容 >>
提交
2c523d72
编写于
11月 06, 2015
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add spining for better transition effect, ref #315
上级
01dd1971
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
7 deletion
+18
-7
components/spin/demo/nested.md
components/spin/demo/nested.md
+1
-1
components/spin/index.jsx
components/spin/index.jsx
+5
-3
components/spin/index.md
components/spin/index.md
+3
-2
style/components/spin.less
style/components/spin.less
+9
-1
未找到文件。
components/spin/demo/nested.md
浏览文件 @
2c523d72
...
...
@@ -25,7 +25,7 @@ const Card = React.createClass({
description
=
"消息提示的辅助性文字介绍消息提示的辅助性文字介绍消息提示的辅助性文字介绍"
type
=
"info"
/>;
return
<
div
>
{
this
.
state
.
loading
?
<
Spin
>
{
container
}
</
Spin
>
:
container
}
<
Spin
spining
=
{
this
.
state
.
loading
}
>
{
container
}
</
Spin
>
切换加载状态:
<
Switch
checked
=
{
this
.
state
.
loading
}
onChange
=
{
this
.
toggle
}
/>
</
div
>;
}
...
...
components/spin/index.jsx
浏览文件 @
2c523d72
...
...
@@ -5,7 +5,8 @@ import { isCssAnimationSupported } from 'css-animation';
const
AntSpin
=
React
.
createClass
({
getDefaultProps
()
{
return
{
size
:
'
default
'
size
:
'
default
'
,
spining
:
true
};
},
...
...
@@ -24,7 +25,8 @@ const AntSpin = React.createClass({
let
spinClassName
=
classSet
({
'
ant-spin
'
:
true
,
[
`ant-spin-
${
size
}
`
]:
size
,
[
className
]:
!!
className
[
className
]:
!!
className
,
'
ant-spin-spining
'
:
this
.
props
.
spining
,
});
let
spinElement
;
...
...
@@ -43,7 +45,7 @@ const AntSpin = React.createClass({
if
(
this
.
isNestedPattern
())
{
return
(
<
div
className
=
"ant-spin-nested-loading"
>
<
div
className
=
{
this
.
props
.
spining
?
'
ant-spin-nested-loading
'
:
''
}
>
{
spinElement
}
<
div
className
=
"ant-spin-container"
>
{
this
.
props
.
children
}
...
...
components/spin/index.md
浏览文件 @
2c523d72
...
...
@@ -16,6 +16,7 @@
## API
| 参数 | 类型 | 默认值 | 说明 |
| 参数 | 类型 | 默认值 | 说明
|
|------------|----------------|-------------|--------------|
| size | enum | default | spin组件中点的大小,可选值为 small default large
| size | enum | default | spin组件中点的大小,可选值为 small default large |
| spining | boolean | true | 用于内嵌其他组件的模式,可以关闭 loading 效果 |
style/components/spin.less
浏览文件 @
2c523d72
...
...
@@ -10,6 +10,14 @@
display: inline-block;
font-size: 1em;
text-align: center;
opacity: 0;
position: absolute;
transition: opacity 0.3s @ease-in-out-circ;
&-spining {
opacity: 1;
position: static;
}
&-nested-loading {
position: relative;
...
...
@@ -25,7 +33,7 @@
}
&-container {
transition: all 0.
5s ease
;
transition: all 0.
3s @ease-in-out-circ
;
}
&-nested-loading > &-container {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录