Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
5b86a4be
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,体验更适合开发者的 AI 搜索 >>
提交
5b86a4be
编写于
10月 08, 2015
作者:
B
Benjy Cui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: replace `button` tag with `Button` component
上级
67a40273
变更
52
隐藏空白更改
内联
并排
Showing
52 changed file
with
173 addition
and
140 deletion
+173
-140
components/affix/demo/basic.md
components/affix/demo/basic.md
+2
-1
components/affix/demo/offset.md
components/affix/demo/offset.md
+2
-1
components/button/demo/menu.md
components/button/demo/menu.md
+0
-25
components/checkbox/demo/controller.md
components/checkbox/demo/controller.md
+6
-5
components/dropdown/demo/basic.md
components/dropdown/demo/basic.md
+3
-2
components/dropdown/demo/event.md
components/dropdown/demo/event.md
+3
-2
components/dropdown/demo/item.md
components/dropdown/demo/item.md
+3
-2
components/dropdown/demo/trigger.md
components/dropdown/demo/trigger.md
+5
-4
components/enter-animation/demo/basic.md
components/enter-animation/demo/basic.md
+2
-1
components/enter-animation/demo/enter-data.md
components/enter-animation/demo/enter-data.md
+2
-1
components/enter-animation/demo/enter-leave.md
components/enter-animation/demo/enter-leave.md
+2
-1
components/enter-animation/demo/form.md
components/enter-animation/demo/form.md
+3
-2
components/enter-animation/demo/page.md
components/enter-animation/demo/page.md
+2
-1
components/enter-animation/demo/style.md
components/enter-animation/demo/style.md
+2
-1
components/form/demo/horizontal-form.md
components/form/demo/horizontal-form.md
+2
-1
components/form/demo/inline-form.md
components/form/demo/inline-form.md
+2
-1
components/input-number/demo/disabled.md
components/input-number/demo/disabled.md
+2
-1
components/message/demo/duration.md
components/message/demo/duration.md
+2
-1
components/message/demo/error.md
components/message/demo/error.md
+2
-1
components/message/demo/info.md
components/message/demo/info.md
+2
-1
components/message/demo/loading.md
components/message/demo/loading.md
+3
-2
components/message/demo/success.md
components/message/demo/success.md
+3
-2
components/modal/confirm.jsx
components/modal/confirm.jsx
+6
-5
components/modal/demo/basic.md
components/modal/demo/basic.md
+2
-1
components/modal/demo/confirm-promise.md
components/modal/demo/confirm-promise.md
+3
-2
components/modal/demo/confirm.md
components/modal/demo/confirm.md
+3
-2
components/modal/demo/custom.md
components/modal/demo/custom.md
+3
-1
components/modal/demo/footer.md
components/modal/demo/footer.md
+6
-5
components/modal/demo/info.md
components/modal/demo/info.md
+4
-3
components/modal/index.jsx
components/modal/index.jsx
+7
-6
components/notification/demo/basic.md
components/notification/demo/basic.md
+2
-1
components/notification/demo/duration.md
components/notification/demo/duration.md
+2
-1
components/notification/demo/onclose.md
components/notification/demo/onclose.md
+2
-1
components/notification/demo/with-btn.md
components/notification/demo/with-btn.md
+4
-3
components/notification/demo/with-icon.md
components/notification/demo/with-icon.md
+5
-4
components/popconfirm/index.jsx
components/popconfirm/index.jsx
+3
-2
components/popover/demo/basic.md
components/popover/demo/basic.md
+3
-1
components/popover/demo/placement.md
components/popover/demo/placement.md
+6
-4
components/popover/demo/triggerType.md
components/popover/demo/triggerType.md
+5
-3
components/progress/demo/circle-dynamic.md
components/progress/demo/circle-dynamic.md
+8
-6
components/progress/demo/dynamic.md
components/progress/demo/dynamic.md
+8
-6
components/radio/demo/disable.md
components/radio/demo/disable.md
+3
-2
components/steps/demo/step-next.md
components/steps/demo/step-next.md
+2
-1
components/switch/demo/disabled.md
components/switch/demo/disabled.md
+2
-1
components/table/demo/ajax.md
components/table/demo/ajax.md
+5
-4
components/table/demo/local-data.md
components/table/demo/local-data.md
+4
-2
components/upload/demo/basic.md
components/upload/demo/basic.md
+3
-2
components/upload/demo/defaultFileList.md
components/upload/demo/defaultFileList.md
+3
-2
components/upload/demo/fileList.md
components/upload/demo/fileList.md
+3
-2
components/upload/demo/multiple.md
components/upload/demo/multiple.md
+3
-2
components/validation/demo/basic.md
components/validation/demo/basic.md
+4
-3
components/validation/demo/customize.md
components/validation/demo/customize.md
+4
-3
未找到文件。
components/affix/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -8,10 +8,11 @@
````
jsx
var
Affix
=
antd
.
Affix
;
var
Button
=
antd
.
Button
;
React
.
render
(
<
Affix
>
<
button
className
=
"ant-btn ant-btn-primary"
>
固定在顶部
</
b
utton
>
<
Button
type
=
"primary"
>
固定在顶部
</
B
utton
>
</
Affix
>
,
document
.
getElementById
(
'
components-affix-demo-basic
'
));
````
components/affix/demo/offset.md
浏览文件 @
5b86a4be
...
...
@@ -8,10 +8,11 @@
````
jsx
var
Affix
=
antd
.
Affix
;
var
Button
=
antd
.
Button
;
React
.
render
(
<
Affix
offset
=
{
75
}
>
<
button
className
=
"ant-btn ant-btn-primary"
>
固定在距离顶部 75px 的位置
</
b
utton
>
<
Button
type
=
"primary"
>
固定在距离顶部 75px 的位置
</
B
utton
>
</
Affix
>
,
document
.
getElementById
(
'
components-affix-demo-offset
'
));
````
components/button/demo/menu.md
已删除
100644 → 0
浏览文件 @
67a40273
# 菜单按钮
-
order: 5
**注**
: 下拉按钮的 icon 大小统一成
**10px**
。
> 更多交互,详见 [Dropdown 下拉菜单](http://ant.design/components/dropdown/)。
---
````
jsx
var
Icon
=
antd
.
Icon
;
React
.
render
(
<
div
className
=
"nico-insert-code"
>
<
button
className
=
"ant-btn ant-btn-primary ant-btn-menu"
>
<
span
>
菜单按钮
</
span
>
<
Icon
type
=
"down"
/>
</
button
>
<
button
className
=
"ant-btn ant-btn-ghost ant-btn-circle ant-btn-menu"
>
<
Icon
type
=
"down"
/>
</
button
>
</
div
>
,
document
.
getElementById
(
'
components-button-demo-menu
'
));
````
components/checkbox/demo/controller.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Checkbox
=
antd
.
Checkbox
;
var
Button
=
antd
.
Button
;
var
container
=
document
.
getElementById
(
'
components-checkbox-demo-controller
'
);
var
App
=
React
.
createClass
({
...
...
@@ -30,15 +31,15 @@ var App = React.createClass({
</
label
>
</
p
>
<
p
>
<
button
className
=
"ant-btn ant-btn-primary ant-btn-
sm"
<
Button
type
=
"primary"
size
=
"
sm"
onClick
=
{
this
.
toggleChecked
}
>
{
!
this
.
state
.
checked
?
"
选中
"
:
"
取消
"
}
</
b
utton
>
<
b
utton
style
=
{
{
'
marginLeft
'
:
'
10px
'
}
}
className
=
"ant-btn ant-btn-primary ant-btn-
sm"
</
B
utton
>
<
B
utton
style
=
{
{
'
marginLeft
'
:
'
10px
'
}
}
type
=
"primary"
size
=
"
sm"
onClick
=
{
this
.
toggleDisable
}
>
{
!
this
.
state
.
disabled
?
"
不可用
"
:
"
可用
"
}
</
b
utton
>
</
B
utton
>
</
p
>
</
div
>;
},
...
...
components/dropdown/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Menu
=
antd
.
Menu
;
var
Dropdown
=
antd
.
Dropdown
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
menu
=
<
Menu
>
...
...
@@ -25,9 +26,9 @@ var menu = <Menu>
React
.
render
(
<
Dropdown
overlay
=
{
menu
}
>
<
button
className
=
"ant-btn ant-btn-menu"
>
<
Button
>
某按钮
<
Icon
type
=
"down"
/>
</
b
utton
>
</
B
utton
>
</
Dropdown
>
,
document
.
getElementById
(
'
components-dropdown-demo-basic
'
));
````
...
...
components/dropdown/demo/event.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Menu
=
antd
.
Menu
;
var
Dropdown
=
antd
.
Dropdown
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
onSelect
=
function
({
key
}){
alert
(
'
选中了菜单
'
+
key
);
...
...
@@ -22,9 +23,9 @@ var menu = <Menu onSelect={onSelect}>
React
.
render
(
<
Dropdown
overlay
=
{
menu
}
>
<
button
className
=
"ant-btn ant-btn-menu"
>
<
Button
>
鼠标移入,点击菜单
<
Icon
type
=
"down"
/>
</
b
utton
>
</
B
utton
>
</
Dropdown
>
,
document
.
getElementById
(
'
components-dropdown-demo-event
'
));
````
components/dropdown/demo/item.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Menu
=
antd
.
Menu
;
var
Dropdown
=
antd
.
Dropdown
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
menu
=
<
Menu
>
...
...
@@ -24,9 +25,9 @@ var menu = <Menu>
React
.
render
(
<
Dropdown
overlay
=
{
menu
}
>
<
button
className
=
"ant-btn ant-btn-menu"
>
<
Button
>
鼠标移入
<
Icon
type
=
"down"
/>
</
b
utton
>
</
B
utton
>
</
Dropdown
>
,
document
.
getElementById
(
'
components-dropdown-demo-item
'
));
````
components/dropdown/demo/trigger.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Menu
=
antd
.
Menu
;
var
Dropdown
=
antd
.
Dropdown
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
menu
=
<
Menu
>
...
...
@@ -24,14 +25,14 @@ var menu = <Menu>
React
.
render
(<
div
>
<
Dropdown
overlay
=
{
menu
}
trigger
=
"click"
>
<
button
className
=
"ant-btn ant-btn-primary ant-btn-menu
"
>
<
Button
type
=
"primary
"
>
点击触发
<
Icon
type
=
"down"
/>
</
b
utton
>
</
B
utton
>
</
Dropdown
>
<
Dropdown
overlay
=
{
menu
}
>
<
button
className
=
"ant-btn ant-btn-menu"
>
<
Button
>
鼠标移入
<
Icon
type
=
"down"
/>
</
b
utton
>
</
B
utton
>
</
Dropdown
>
</
div
>,
document
.
getElementById
(
'
components-dropdown-demo-trigger
'
));
````
components/enter-animation/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
EnterAnimation
=
antd
.
EnterAnimation
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -24,7 +25,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
>
{
this
.
state
.
show
?
...
...
components/enter-animation/demo/enter-data.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
EnterAnimation
=
antd
.
EnterAnimation
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -33,7 +34,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
enter
=
{
this
.
state
.
enter
}
leave
=
{
this
.
state
.
leave
}
>
{
this
.
state
.
show
?
<
div
key
=
'enter-data'
>
...
...
components/enter-animation/demo/enter-leave.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
EnterAnimation
=
antd
.
EnterAnimation
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -40,7 +41,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
enter
=
{
this
.
state
.
enter
}
leave
=
{
this
.
state
.
leave
}
>
{
this
.
state
.
show
?
...
...
components/enter-animation/demo/form.md
浏览文件 @
5b86a4be
...
...
@@ -13,6 +13,7 @@ var Option = Select.Option;
var
Checkbox
=
antd
.
Checkbox
;
var
Radio
=
antd
.
Radio
;
var
RadioGroup
=
antd
.
Radio
.
Group
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -43,7 +44,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
,
textAlign
:
'
center
'
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
enter
=
{
this
.
state
.
enter
}
leave
=
{
this
.
state
.
leave
}
component
=
'form'
className
=
"ant-form-horizontal"
>
{
this
.
state
.
show
?
<
div
key
=
'from'
>
...
...
@@ -85,7 +86,7 @@ var Test = React.createClass({
</
div
>
<
div
className
=
"row"
>
<
div
className
=
"col-16 col-offset-6"
>
<
input
type
=
"submit"
className
=
"ant-btn ant-btn-primary"
value
=
"确 定"
/
>
<
Button
type
=
"primary"
>
确定
</
Button
>
</
div
>
</
div
>
</
div
>
:
null
}
...
...
components/enter-animation/demo/page.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
EnterAnimation
=
antd
.
EnterAnimation
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -34,7 +35,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
enter
=
{
this
.
state
.
enter
}
leave
=
{
this
.
state
.
leave
}
>
{
this
.
state
.
show
?
<
div
key
=
'a'
>
...
...
components/enter-animation/demo/style.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
EnterAnimation
=
antd
.
EnterAnimation
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -35,7 +36,7 @@ var Test = React.createClass({
return
(
<
div
>
<
div
style
=
{
{
marginBottom
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
onClick
}
>
切换
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
onClick
}
>
切换
</
B
utton
>
</
div
>
<
EnterAnimation
enter
=
{
this
.
state
.
enter
}
leave
=
{
this
.
state
.
leave
}
>
{
this
.
state
.
show
?
<
div
key
=
'enter-data'
>
...
...
components/form/demo/horizontal-form.md
浏览文件 @
5b86a4be
...
...
@@ -16,6 +16,7 @@
var
Checkbox
=
antd
.
Checkbox
;
var
Radio
=
antd
.
Radio
;
var
RadioGroup
=
antd
.
Radio
.
Group
;
var
Button
=
antd
.
Button
;
React
.
render
(
<
form
className
=
"ant-form-horizontal"
>
...
...
@@ -56,7 +57,7 @@ React.render(
</
div
>
<
div
className
=
"row"
>
<
div
className
=
"col-16 col-offset-6"
>
<
input
type
=
"submit"
className
=
"ant-btn ant-btn-primary"
value
=
"确 定"
/
>
<
Button
type
=
"primary"
>
确定
</
Button
>
</
div
>
</
div
>
</
form
>
...
...
components/form/demo/inline-form.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Checkbox
=
antd
.
Checkbox
;
var
Button
=
antd
.
Button
;
React
.
render
(
<
form
className
=
"ant-form-inline"
>
...
...
@@ -24,7 +25,7 @@ React.render(
<
Checkbox
/>
记住我
</
label
>
</
div
>
<
input
type
=
"submit"
className
=
"ant-btn ant-btn-primary"
value
=
"登 录"
/
>
<
Button
type
=
"primary"
>
登录
</
Button
>
</
form
>
,
document
.
getElementById
(
'
components-form-demo-inline-form
'
));
````
components/input-number/demo/disabled.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
InputNumber
=
antd
.
InputNumber
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -24,7 +25,7 @@ var Test = React.createClass({
return
<
div
>
<
InputNumber
min
=
{
1
}
max
=
{
10
}
disabled
=
{
this
.
state
.
disabled
}
defaultValue
=
{
3
}
/>
<
div
style
=
{
{
marginTop
:
20
}
}
>
<
button
onClick
=
{
this
.
toggle
}
className
=
"ant-btn ant-btn-primary"
>
Toggle disabled
</
b
utton
>
<
Button
onClick
=
{
this
.
toggle
}
type
=
"primary"
>
Toggle disabled
</
B
utton
>
</
div
>
</
div
>;
}
...
...
components/message/demo/duration.md
浏览文件 @
5b86a4be
...
...
@@ -7,13 +7,14 @@
---
````
jsx
var
Button
=
antd
.
Button
;
var
message
=
antd
.
message
;
var
success
=
function
()
{
message
.
success
(
'
这是一条成功的提示,并将于10秒后消失
'
,
10
);
};
React
.
render
(<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
success
}
>
自定义时长提示
</
b
utton
>
React
.
render
(<
Button
type
=
"primary"
onClick
=
{
success
}
>
自定义时长提示
</
B
utton
>
,
document
.
getElementById
(
'
components-message-demo-duration
'
));
````
components/message/demo/error.md
浏览文件 @
5b86a4be
...
...
@@ -7,12 +7,13 @@
---
````
jsx
var
Button
=
antd
.
Button
;
var
message
=
antd
.
message
;
var
error
=
function
()
{
message
.
error
(
'
这是一条失败的提示这是一条失败的提示这是一条失败的提示
'
);
};
React
.
render
(<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
error
}
>
显示失败提示
</
b
utton
>
React
.
render
(<
Button
type
=
"primary"
onClick
=
{
error
}
>
显示失败提示
</
B
utton
>
,
document
.
getElementById
(
'
components-message-demo-error
'
));
````
components/message/demo/info.md
浏览文件 @
5b86a4be
...
...
@@ -7,12 +7,13 @@
---
````
jsx
var
Button
=
antd
.
Button
;
var
message
=
antd
.
message
;
var
info
=
function
()
{
message
.
info
(
'
这是一条普通的提醒
'
);
};
React
.
render
(<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
info
}
>
显示普通提醒
</
b
utton
>
React
.
render
(<
Button
type
=
"primary"
onClick
=
{
info
}
>
显示普通提醒
</
B
utton
>
,
document
.
getElementById
(
'
components-message-demo-info
'
));
````
components/message/demo/loading.md
浏览文件 @
5b86a4be
...
...
@@ -7,14 +7,15 @@
---
````
jsx
var
message
=
antd
.
message
;
var
Button
=
antd
.
Button
;
var
message
=
antd
.
message
;
var
success
=
function
()
{
var
hide
=
message
.
loading
(
'
正在执行中...
'
,
0
);
// 异步手动移除
setTimeout
(
hide
,
2500
);
};
React
.
render
(<
button
className
=
"ant-btn"
onClick
=
{
success
}
>
显示加载中...
</
b
utton
>
React
.
render
(<
Button
onClick
=
{
success
}
>
显示加载中...
</
B
utton
>
,
document
.
getElementById
(
'
components-message-demo-loading
'
));
````
components/message/demo/success.md
浏览文件 @
5b86a4be
...
...
@@ -7,13 +7,14 @@
---
````
jsx
var
message
=
antd
.
message
;
var
Button
=
antd
.
Button
;
var
message
=
antd
.
message
;
var
success
=
function
()
{
message
.
success
(
'
这是一条成功的提示
'
);
};
React
.
render
(<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
success
}
>
显示成功提示
</
b
utton
>
React
.
render
(<
Button
type
=
"primary"
onClick
=
{
success
}
>
显示成功提示
</
B
utton
>
,
document
.
getElementById
(
'
components-message-demo-success
'
));
````
components/modal/confirm.jsx
浏览文件 @
5b86a4be
import
React
from
'
react
'
;
import
Dialog
from
'
./index
'
;
import
Icon
from
'
../iconfont
'
;
import
{
Button
}
from
'
../button
'
;
export
default
function
(
props
)
{
let
div
=
document
.
createElement
(
'
div
'
);
...
...
@@ -71,18 +72,18 @@ export default function (props) {
<
div
className
=
"ant-confirm-content"
>
{
props
.
content
}
</
div
>
</
div
>;
let
footer
=
<
div
className
=
"ant-confirm-btns"
>
<
button
type
=
"button"
className
=
"ant-btn-default ant-btn ant-btn-lg"
onClick
=
{
onCancel
}
>
取 消
</
b
utton
>
<
button
type
=
"button"
className
=
"ant-btn-primary ant-btn ant-btn-lg"
onClick
=
{
onOk
}
>
确 定
</
b
utton
>
<
Button
size
=
"lg"
onClick
=
{
onCancel
}
>
取 消
</
B
utton
>
<
Button
type
=
"primary"
size
=
"lg"
onClick
=
{
onOk
}
>
确 定
</
B
utton
>
</
div
>;
if
(
props
.
okCancel
)
{
footer
=
<
div
className
=
"ant-confirm-btns"
>
<
button
type
=
"button"
className
=
"ant-btn-default ant-btn ant-btn-lg"
onClick
=
{
onCancel
}
>
取 消
</
b
utton
>
<
button
type
=
"button"
className
=
"ant-btn-primary ant-btn ant-btn-lg"
onClick
=
{
onOk
}
>
确 定
</
b
utton
>
<
Button
size
=
"lg"
onClick
=
{
onCancel
}
>
取 消
</
B
utton
>
<
Button
type
=
"primary"
size
=
"lg"
onClick
=
{
onOk
}
>
确 定
</
B
utton
>
</
div
>;
}
else
{
footer
=
<
div
className
=
"ant-confirm-btns"
>
<
button
type
=
"button"
className
=
"ant-btn-primary ant-btn ant-btn-lg"
onClick
=
{
onOk
}
>
知道了
</
b
utton
>
<
Button
type
=
"primary"
size
=
"lg"
onClick
=
{
onOk
}
>
知道了
</
B
utton
>
</
div
>;
}
...
...
components/modal/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Modal
=
antd
.
Modal
;
var
Button
=
antd
.
Button
;
var
App
=
React
.
createClass
({
getInitialState
()
{
...
...
@@ -32,7 +33,7 @@ var App = React.createClass({
},
render
()
{
return
<
div
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
showModal
}
>
显示对话框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
showModal
}
>
显示对话框
</
B
utton
>
<
Modal
title
=
"第一个 Modal"
visible
=
{
this
.
state
.
visible
}
confirmLoading
=
{
this
.
state
.
confirmLoading
}
onOk
=
{
this
.
handleOk
}
onCancel
=
{
this
.
handleCancel
}
>
<
p
>
对话框的内容
</
p
>
...
...
components/modal/demo/confirm-promise.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
confirm
=
antd
.
Modal
.
confirm
;
var
Button
=
antd
.
Button
;
function
showConfirm
(){
confirm
({
...
...
@@ -24,7 +25,7 @@ function showConfirm(){
}
React
.
render
(
<
button
className
=
"ant-btn"
onClick
=
{
showConfirm
}
>
<
Button
onClick
=
{
showConfirm
}
>
确认对话框
</
b
utton
>,
document
.
getElementById
(
'
components-modal-demo-confirm-promise
'
));
</
B
utton
>,
document
.
getElementById
(
'
components-modal-demo-confirm-promise
'
));
````
components/modal/demo/confirm.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
confirm
=
antd
.
Modal
.
confirm
;
var
Button
=
antd
.
Button
;
function
showConfirm
(){
confirm
({
...
...
@@ -21,7 +22,7 @@ function showConfirm(){
}
React
.
render
(
<
button
className
=
"ant-btn"
onClick
=
{
showConfirm
}
>
<
Button
onClick
=
{
showConfirm
}
>
确认对话框
</
b
utton
>,
document
.
getElementById
(
'
components-modal-demo-confirm
'
));
</
B
utton
>,
document
.
getElementById
(
'
components-modal-demo-confirm
'
));
````
components/modal/demo/custom.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Modal
=
antd
.
Modal
;
var
Button
=
antd
.
Button
;
var
ModalText
=
'
对话框的内容
'
;
var
Test
=
React
.
createClass
({
...
...
@@ -40,7 +42,7 @@ var Test = React.createClass({
},
render
()
{
return
<
div
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
showModal
}
>
显示对话框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
showModal
}
>
显示对话框
</
B
utton
>
<
Modal
title
=
"对话框标题"
visible
=
{
this
.
state
.
visible
}
onOk
=
{
this
.
handleOk
}
...
...
components/modal/demo/footer.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Modal
=
antd
.
Modal
;
var
Button
=
antd
.
Button
;
var
Test
=
React
.
createClass
({
getInitialState
:
function
()
{
...
...
@@ -32,17 +33,17 @@ var Test = React.createClass({
},
render
()
{
return
<
div
>
<
button
className
=
"ant-btn ant-btn-
primary"
onClick
=
{
this
.
showModal
}
>
<
Button
type
=
"
primary"
onClick
=
{
this
.
showModal
}
>
显示对话框
</
b
utton
>
</
B
utton
>
<
Modal
ref
=
"modal"
visible
=
{
this
.
state
.
visible
}
title
=
"对话框标题"
onOk
=
{
this
.
handleOk
}
onCancel
=
{
this
.
handleCancel
}
footer
=
{
[
<
button
key
=
"back"
className
=
"ant-btn ant-btn-lg"
onClick
=
{
this
.
handleCancel
}
>
返 回
</
b
utton
>,
<
button
key
=
"submit"
className
=
{
'
ant-btn ant-btn-primary ant-btn-lg
'
+
(
this
.
state
.
loading
?
'
ant-btn-loading
'
:
''
)
}
onClick
=
{
this
.
handleOk
}
>
<
Button
key
=
"back"
size
=
"lg"
onClick
=
{
this
.
handleCancel
}
>
返 回
</
B
utton
>,
<
Button
key
=
"submit"
type
=
"primary"
size
=
"lg"
loading
=
{
this
.
state
.
loading
}
onClick
=
{
this
.
handleOk
}
>
提 交
</
b
utton
>
</
B
utton
>
]
}
>
<
p
>
对话框的内容
</
p
>
<
p
>
对话框的内容
</
p
>
...
...
components/modal/demo/info.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Modal
=
antd
.
Modal
;
var
Button
=
antd
.
Button
;
function
info
()
{
Modal
.
info
({
...
...
@@ -37,9 +38,9 @@ function error() {
}
React
.
render
(<
div
>
<
button
className
=
"ant-btn"
onClick
=
{
info
}
>
信息提示
</
b
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
success
}
>
成功提示
</
b
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
error
}
>
失败提示
</
b
utton
>
<
Button
onClick
=
{
info
}
>
信息提示
</
B
utton
>
<
Button
onClick
=
{
success
}
>
成功提示
</
B
utton
>
<
Button
onClick
=
{
error
}
>
失败提示
</
B
utton
>
</
div
>,
document
.
getElementById
(
'
components-modal-demo-info
'
));
````
components/modal/index.jsx
浏览文件 @
5b86a4be
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
Dialog
from
'
rc-dialog
'
;
import
{
Dom
}
from
'
rc-util
'
;
import
confirm
from
'
./confirm
'
;
import
{
Button
}
from
'
../button
'
;
function
noop
()
{
}
...
...
@@ -73,16 +74,16 @@ let AntModal = React.createClass({
},
render
()
{
let
loadingClass
=
this
.
state
.
confirmLoading
?
'
ant-btn-loading
'
:
''
;
let
props
=
this
.
props
;
let
defaultFooter
=
[
<
button
key
=
"cancel"
type
=
"button"
className
=
"ant-btn ant-btn-lg"
onClick
=
{
this
.
handleCancel
}
>
取 消
</
button
>,
<
button
key
=
"confirm"
type
=
"button"
className
=
{
'
ant-btn ant-btn-primary ant-btn-lg
'
+
loadingClass
}
<
Button
key
=
"cancel"
size
=
"lg"
onClick
=
{
this
.
handleCancel
}
>
取 消
</
Button
>,
<
Button
key
=
"confirm"
type
=
"primary"
size
=
"lg"
loading
=
{
this
.
state
.
confirmLoading
}
onClick
=
{
this
.
handleOk
}
>
确 定
</
b
utton
>
</
B
utton
>
];
let
footer
=
props
.
footer
||
defaultFooter
;
let
visible
=
this
.
state
.
visible
;
...
...
components/notification/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
notification
=
antd
.
Notification
;
var
Button
=
antd
.
Button
;
var
openNotification
=
function
()
{
notification
.
open
({
...
...
@@ -18,7 +19,7 @@ var openNotification = function() {
React
.
render
(
<
div
>
<
button
className
=
'ant-btn ant-btn-primary'
onClick
=
{
openNotification
}
>
打开通知提醒框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
openNotification
}
>
打开通知提醒框
</
B
utton
>
</
div
>,
document
.
getElementById
(
'
components-notification-demo-basic
'
));
````
components/notification/demo/duration.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
notification
=
antd
.
Notification
;
var
Button
=
antd
.
Button
;
var
openNotification
=
function
()
{
var
args
=
{
...
...
@@ -19,6 +20,6 @@ var openNotification = function() {
};
React
.
render
(
<
button
className
=
'ant-btn ant-btn-primary'
onClick
=
{
openNotification
}
>
打开通知提醒框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
openNotification
}
>
打开通知提醒框
</
B
utton
>
,
document
.
getElementById
(
'
components-notification-demo-duration
'
));
````
components/notification/demo/onclose.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
notification
=
antd
.
Notification
;
var
Button
=
antd
.
Button
;
var
close
=
function
()
{
console
.
log
(
"
我被默认的关闭按钮关闭了!
"
);
...
...
@@ -24,7 +25,7 @@ var openNotification = function() {
React
.
render
(
<
div
>
<
button
className
=
'ant-btn ant-btn-primary'
onClick
=
{
openNotification
}
>
打开通知提醒框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
openNotification
}
>
打开通知提醒框
</
B
utton
>
</
div
>,
document
.
getElementById
(
'
components-notification-demo-onclose
'
));
````
components/notification/demo/with-btn.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
notification
=
antd
.
Notification
;
var
Button
=
antd
.
Button
;
var
close
=
function
(){
console
.
log
(
'
我被默认的关闭按钮关闭了!
'
);
...
...
@@ -19,9 +20,9 @@ var openNotification = function() {
// 隐藏提醒框
notification
.
close
(
key
);
};
var
btn
=
<
button
className
=
"ant-btn ant-btn-primary ant-btn-
sm"
onClick
=
{
btnClick
}
>
var
btn
=
<
Button
type
=
"primary"
size
=
"
sm"
onClick
=
{
btnClick
}
>
自定义关闭按钮并触发回调函数
</
b
utton
>;
</
B
utton
>;
notification
.
open
({
message
:
"
这是标题
"
,
description
:
"
这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案
"
,
...
...
@@ -33,7 +34,7 @@ var openNotification = function() {
React
.
render
(
<
div
>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
openNotification
}
>
打开通知提醒框
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
openNotification
}
>
打开通知提醒框
</
B
utton
>
</
div
>,
document
.
getElementById
(
'
components-notification-demo-with-btn
'
));
````
components/notification/demo/with-icon.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
notification
=
antd
.
Notification
;
var
Button
=
antd
.
Button
;
var
openNotificationWithIcon
=
function
(
type
)
{
return
function
(){
...
...
@@ -19,10 +20,10 @@ var openNotificationWithIcon = function(type) {
};
React
.
render
(<
div
>
<
button
className
=
"ant-btn"
onClick
=
{
openNotificationWithIcon
(
'
success
'
)
}
>
成功
</
b
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
openNotificationWithIcon
(
'
info
'
)
}
>
消息
</
b
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
openNotificationWithIcon
(
'
warn
'
)
}
>
警告
</
b
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
openNotificationWithIcon
(
'
error
'
)
}
>
错误
</
b
utton
>
<
Button
onClick
=
{
openNotificationWithIcon
(
'
success
'
)
}
>
成功
</
B
utton
>
<
Button
onClick
=
{
openNotificationWithIcon
(
'
info
'
)
}
>
消息
</
B
utton
>
<
Button
onClick
=
{
openNotificationWithIcon
(
'
warn
'
)
}
>
警告
</
B
utton
>
<
Button
onClick
=
{
openNotificationWithIcon
(
'
error
'
)
}
>
错误
</
B
utton
>
</
div
>
,
document
.
getElementById
(
'
components-notification-demo-with-icon
'
));
````
...
...
components/popconfirm/index.jsx
浏览文件 @
5b86a4be
import
React
from
'
react
'
;
import
Tooltip
from
'
rc-tooltip
'
;
import
Icon
from
'
../iconfont
'
;
import
{
Button
}
from
'
../button
'
;
const
prefixCls
=
'
ant-popover
'
;
export
default
React
.
createClass
({
...
...
@@ -47,8 +48,8 @@ export default React.createClass({
</
p
>
<
div
className
=
{
prefixCls
+
'
-buttons
'
}
>
<
button
onClick
=
{
this
.
cancel
}
className
=
"ant-btn ant-btn-sm"
>
取 消
</
b
utton
>
<
button
onClick
=
{
this
.
confirm
}
className
=
"ant-btn ant-btn-primary ant-btn-sm"
>
确 定
</
b
utton
>
<
Button
onClick
=
{
this
.
cancel
}
size
=
"sm"
>
取 消
</
B
utton
>
<
Button
onClick
=
{
this
.
confirm
}
type
=
"primary"
size
=
"sm"
>
确 定
</
B
utton
>
</
div
>
</
div
>
</
div
>;
...
...
components/popover/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Popover
=
antd
.
Popover
;
var
Button
=
antd
.
Button
;
var
content
=
<
div
>
<
p
>
内容
</
p
>
<
p
>
内容
</
p
>
...
...
@@ -15,7 +17,7 @@ var content = <div>
React
.
render
(
<
Popover
overlay
=
{
content
}
title
=
"标题"
>
<
button
className
=
"ant-btn ant-btn-primary"
>
弹出卡片
</
b
utton
>
<
Button
type
=
"primary"
>
弹出卡片
</
B
utton
>
</
Popover
>
,
document
.
getElementById
(
'
components-popover-demo-basic
'
));
````
components/popover/demo/placement.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Popover
=
antd
.
Popover
;
var
Button
=
antd
.
Button
;
var
text
=
<
span
>
标题
</
span
>;
var
content
=
<
div
>
<
p
>
内容
</
p
>
...
...
@@ -16,16 +18,16 @@ var content = <div>
React
.
render
(<
div
>
<
Popover
placement
=
"left"
title
=
{
text
}
overlay
=
{
content
}
>
<
button
className
=
"ant-btn"
>
左
</
b
utton
>
<
Button
>
左
</
B
utton
>
</
Popover
>
<
Popover
placement
=
"top"
title
=
{
text
}
overlay
=
{
content
}
>
<
button
className
=
"ant-btn"
>
上
</
b
utton
>
<
Button
>
上
</
B
utton
>
</
Popover
>
<
Popover
placement
=
"bottom"
title
=
{
text
}
overlay
=
{
content
}
>
<
button
className
=
"ant-btn"
>
下
</
b
utton
>
<
Button
>
下
</
B
utton
>
</
Popover
>
<
Popover
placement
=
"right"
title
=
{
text
}
overlay
=
{
content
}
>
<
button
className
=
"ant-btn"
>
右
</
b
utton
>
<
Button
>
右
</
B
utton
>
</
Popover
>
</
div
>,
document
.
getElementById
(
'
components-popover-demo-placement
'
));
````
...
...
components/popover/demo/triggerType.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Popover
=
antd
.
Popover
;
var
Button
=
antd
.
Button
;
var
content
=
<
div
>
<
p
>
内容
</
p
>
<
p
>
内容
</
p
>
...
...
@@ -15,13 +17,13 @@ var content = <div>
React
.
render
(<
div
>
<
Popover
overlay
=
{
content
}
title
=
"标题"
trigger
=
"hover"
>
<
button
className
=
"ant-btn"
>
移入
</
b
utton
>
<
Button
>
移入
</
B
utton
>
</
Popover
>
<
Popover
overlay
=
{
content
}
title
=
"标题"
trigger
=
"focus"
>
<
a
href
=
"javascript:;"
className
=
"ant-btn"
>
聚焦
</
a
>
<
Button
>
聚焦
</
Button
>
</
Popover
>
<
Popover
overlay
=
{
content
}
title
=
"标题"
trigger
=
"click"
>
<
button
className
=
"ant-btn"
>
点击
</
b
utton
>
<
Button
>
点击
</
B
utton
>
</
Popover
>
</
div
>,
document
.
getElementById
(
'
components-popover-demo-triggertype
'
));
````
components/progress/demo/circle-dynamic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
ProgressCircle
=
antd
.
Progress
.
Circle
;
var
Button
=
antd
.
Button
;
var
ButtonGroup
=
antd
.
ButtonGroup
;
var
Icon
=
antd
.
Icon
;
var
MyProgress
=
React
.
createClass
({
...
...
@@ -33,14 +35,14 @@ var MyProgress = React.createClass({
render
()
{
return
<
div
>
<
ProgressCircle
percent
=
{
this
.
state
.
percent
}
/>
<
div
className
=
"ant-btn-group"
>
<
button
className
=
"ant-btn ant-btn-
ghost"
onClick
=
{
this
.
decline
}
>
<
ButtonGroup
>
<
Button
type
=
"
ghost"
onClick
=
{
this
.
decline
}
>
<
Icon
type
=
"minus"
/>
</
b
utton
>
<
button
className
=
"ant-btn ant-btn-
ghost"
onClick
=
{
this
.
increase
}
>
</
B
utton
>
<
Button
type
=
"
ghost"
onClick
=
{
this
.
increase
}
>
<
Icon
type
=
"plus"
/>
</
b
utton
>
</
div
>
</
B
utton
>
</
ButtonGroup
>
</
div
>;
}
});
...
...
components/progress/demo/dynamic.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Progress
=
antd
.
Progress
.
Line
;
var
Button
=
antd
.
Button
;
var
ButtonGroup
=
antd
.
ButtonGroup
;
var
Icon
=
antd
.
Icon
;
var
MyProgress
=
React
.
createClass
({
...
...
@@ -33,14 +35,14 @@ var MyProgress = React.createClass({
render
()
{
return
<
div
>
<
Progress
percent
=
{
this
.
state
.
percent
}
/>
<
div
className
=
"ant-btn-group"
>
<
button
className
=
"ant-btn ant-btn-
ghost"
onClick
=
{
this
.
decline
}
>
<
ButtonGroup
>
<
Button
type
=
"
ghost"
onClick
=
{
this
.
decline
}
>
<
Icon
type
=
"minus"
/>
</
b
utton
>
<
button
className
=
"ant-btn ant-btn-
ghost"
onClick
=
{
this
.
increase
}
>
</
B
utton
>
<
Button
type
=
"
ghost"
onClick
=
{
this
.
increase
}
>
<
Icon
type
=
"plus"
/>
</
b
utton
>
</
div
>
</
B
utton
>
</
ButtonGroup
>
</
div
>;
}
});
...
...
components/radio/demo/disable.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@ Radio 不可用。
````
jsx
var
Radio
=
antd
.
Radio
;
var
Button
=
antd
.
Button
;
function
toggleDisabled
()
{
disabled
=
!
disabled
;
...
...
@@ -30,9 +31,9 @@ var App = React.createClass({
<
br
/>
<
Radio
defaultChecked
=
{
true
}
disabled
=
{
this
.
state
.
disabled
}
>
不可用
</
Radio
>
<
div
style
=
{
{
marginTop
:
20
}
}
>
<
button
className
=
"ant-btn ant-btn-
primary"
onClick
=
{
this
.
toggleDisabled
}
>
<
Button
type
=
"
primary"
onClick
=
{
this
.
toggleDisabled
}
>
Toggle disabled
</
b
utton
>
</
B
utton
>
</
div
>
</
div
>;
}
...
...
components/steps/demo/step-next.md
浏览文件 @
5b86a4be
...
...
@@ -15,6 +15,7 @@
````
jsx
var
Steps
=
antd
.
Steps
;
var
Step
=
Steps
.
Step
;
var
Button
=
antd
.
Button
;
var
container
=
document
.
getElementById
(
'
components-steps-demo-step-next
'
);
var
array
=
Array
.
apply
(
null
,
Array
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
3
));
var
steps
=
array
.
map
(
function
(
item
,
i
)
{
...
...
@@ -47,7 +48,7 @@ var App = React.createClass({
{
steps
.
map
((
s
,
i
)
=>
<
Step
key
=
{
i
}
title
=
{
s
.
title
}
description
=
{
s
.
description
}
/>)
}
</
Steps
>
<
div
>
<
button
className
=
'ant-btn'
onClick
=
{
this
.
next
}
>
下一步
</
b
utton
>
<
Button
onClick
=
{
this
.
next
}
>
下一步
</
B
utton
>
</
div
>
</
div
>
);
...
...
components/switch/demo/disabled.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@ Switch 失效状态。
````
jsx
var
Switch
=
antd
.
Switch
;
var
Button
=
antd
.
Button
;
var
container
=
document
.
getElementById
(
'
components-switch-demo-disabled
'
);
var
Test
=
React
.
createClass
({
...
...
@@ -26,7 +27,7 @@ var Test = React.createClass({
<
Switch
disabled
=
{
this
.
state
.
disabled
}
/>
<
br
/>
<
br
/>
<
button
className
=
"ant-btn ant-btn-primary"
onClick
=
{
this
.
toggle
}
>
Toggle disabled
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
toggle
}
>
Toggle disabled
</
B
utton
>
</
div
>;
}
});
...
...
components/table/demo/ajax.md
浏览文件 @
5b86a4be
...
...
@@ -10,6 +10,7 @@
````
jsx
var
Table
=
antd
.
Table
;
var
Button
=
antd
.
Button
;
var
columns
=
[{
title
:
'
姓名
'
,
...
...
@@ -85,13 +86,13 @@ var Test = React.createClass({
render
()
{
return
<
div
>
<
Table
columns
=
{
columns
}
dataSource
=
{
this
.
state
.
dataSource
}
/>
<
button
className
=
"ant-btn ant-btn-
primary"
onClick
=
{
this
.
refresh
}
>
<
Button
type
=
"
primary"
onClick
=
{
this
.
refresh
}
>
重新加载数据
</
b
utton
>
</
B
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
this
.
changeAndRefresh
}
>
<
Button
onClick
=
{
this
.
changeAndRefresh
}
>
加载 city=hz 的数据
</
b
utton
>
</
B
utton
>
</
div
>;
}
});
...
...
components/table/demo/local-data.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,8 @@
````
jsx
var
Table
=
antd
.
Table
;
var
Button
=
antd
.
Button
;
var
columns
=
[{
title
:
'
姓名
'
,
dataIndex
:
'
name
'
,
...
...
@@ -73,9 +75,9 @@ var App = React.createClass({
render
()
{
return
<
div
>
<
Table
columns
=
{
columns
}
dataSource
=
{
this
.
state
.
data
}
/>
<
button
className
=
"ant-btn"
onClick
=
{
this
.
handleClick1
}
>
加载本地数据1
</
b
utton
>
<
Button
onClick
=
{
this
.
handleClick1
}
>
加载本地数据1
</
B
utton
>
<
button
className
=
"ant-btn"
onClick
=
{
this
.
handleClick2
}
>
加载本地数据2
</
b
utton
>
<
Button
onClick
=
{
this
.
handleClick2
}
>
加载本地数据2
</
B
utton
>
</
div
>;
}
})
...
...
components/upload/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Upload
=
antd
.
Upload
;
var
message
=
antd
.
message
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
props
=
{
...
...
@@ -28,9 +29,9 @@ var props = {
React
.
render
(
<
Upload
{
...
props
}
>
<
button
type
=
"button"
className
=
"ant-btn ant-btn-
ghost"
>
<
Button
type
=
"
ghost"
>
<
Icon
type
=
"upload"
/>
点击上传
</
b
utton
>
</
B
utton
>
</
Upload
>
,
document
.
getElementById
(
'
components-upload-demo-basic
'
));
````
components/upload/demo/defaultFileList.md
浏览文件 @
5b86a4be
...
...
@@ -8,6 +8,7 @@
````
jsx
var
Upload
=
antd
.
Upload
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
props
=
{
...
...
@@ -33,9 +34,9 @@ var props = {
React
.
render
(
<
Upload
{
...
props
}
>
<
button
type
=
"button"
className
=
"ant-btn ant-btn-
ghost"
>
<
Button
type
=
"
ghost"
>
<
Icon
type
=
"upload"
/>
点击上传
</
b
utton
>
</
B
utton
>
</
Upload
>
,
document
.
getElementById
(
'
components-upload-demo-defaultfilelist
'
));
````
components/upload/demo/fileList.md
浏览文件 @
5b86a4be
...
...
@@ -14,6 +14,7 @@
````
jsx
var
Upload
=
antd
.
Upload
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
fileList
=
[{
uid
:
-
1
,
...
...
@@ -63,9 +64,9 @@ var MyUpload = React.createClass({
multiple
:
true
};
return
<
Upload
{
...
props
}
fileList
=
{
this
.
state
.
fileList
}
>
<
button
type
=
"button"
className
=
"ant-btn ant-btn-
ghost"
>
<
Button
type
=
"
ghost"
>
<
Icon
type
=
"upload"
/>
点击上传
</
b
utton
>
</
B
utton
>
</
Upload
>;
}
});
...
...
components/upload/demo/multiple.md
浏览文件 @
5b86a4be
...
...
@@ -9,6 +9,7 @@
````
jsx
var
Upload
=
antd
.
Upload
;
var
message
=
antd
.
message
;
var
Button
=
antd
.
Button
;
var
Icon
=
antd
.
Icon
;
var
props
=
{
...
...
@@ -28,9 +29,9 @@ var props = {
React
.
render
(
<
Upload
{
...
props
}
>
<
button
type
=
"button"
className
=
"ant-btn ant-btn-
ghost"
>
<
Button
type
=
"
ghost"
>
<
Icon
type
=
"upload"
/>
点击上传
</
b
utton
>
</
B
utton
>
</
Upload
>
,
document
.
getElementById
(
'
components-upload-demo-multiple
'
));
````
...
...
components/validation/demo/basic.md
浏览文件 @
5b86a4be
...
...
@@ -17,6 +17,7 @@ var Select = antd.Select;
var
Option
=
Select
.
Option
;
var
Radio
=
antd
.
Radio
;
var
RadioGroup
=
antd
.
Radio
.
Group
;
var
Button
=
antd
.
Button
;
function
cx
(
classNames
)
{
if
(
typeof
classNames
===
'
object
'
)
{
...
...
@@ -146,7 +147,7 @@ var Form = React.createClass({
var
status
=
this
.
state
.
status
;
return
(
<
form
onSubmit
=
{
this
.
handleSubmit
}
className
=
"ant-form-horizontal"
>
<
form
className
=
"ant-form-horizontal"
>
<
Validation
ref
=
"validation"
onValidate
=
{
this
.
handleValidate
}
>
<
div
className
=
"ant-form-item"
>
<
label
className
=
"col-7"
htmlFor
=
"name"
required
>
用户名:
</
label
>
...
...
@@ -249,9 +250,9 @@ var Form = React.createClass({
<
div
className
=
"ant-form-item"
>
<
div
className
=
"col-offset-7 col-12"
>
<
button
type
=
"submit"
className
=
"ant-btn ant-btn-primary"
>
确 定
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
handleSubmit
}
>
确 定
</
B
utton
>
<
a
href
=
"#"
className
=
"ant-btn"
onClick
=
{
this
.
handleReset
}
>
重 置
</
a
>
<
Button
onClick
=
{
this
.
handleReset
}
>
重 置
</
Button
>
</
div
>
</
div
>
</
Validation
>
...
...
components/validation/demo/customize.md
浏览文件 @
5b86a4be
...
...
@@ -11,6 +11,7 @@
````
jsx
var
Validation
=
antd
.
Validation
;
var
Validator
=
Validation
.
Validator
;
var
Button
=
antd
.
Button
;
function
cx
(
classNames
)
{
if
(
typeof
classNames
===
'
object
'
)
{
...
...
@@ -150,7 +151,7 @@ var Form = React.createClass({
var
status
=
this
.
state
.
status
;
return
(
<
form
onSubmit
=
{
this
.
handleSubmit
}
className
=
"ant-form-horizontal"
>
<
form
className
=
"ant-form-horizontal"
>
<
Validation
ref
=
"validation"
onValidate
=
{
this
.
handleValidate
}
>
<
div
className
=
"ant-form-item"
>
...
...
@@ -189,9 +190,9 @@ var Form = React.createClass({
<
div
className
=
"ant-form-item"
>
<
div
className
=
"col-offset-6 col-12"
>
<
button
type
=
"submit"
className
=
"ant-btn ant-btn-primary"
>
确 定
</
b
utton
>
<
Button
type
=
"primary"
onClick
=
{
this
.
handleSubmit
}
>
确 定
</
B
utton
>
<
a
href
=
"#"
className
=
"ant-btn"
onClick
=
{
this
.
handleReset
}
>
重 置
</
a
>
<
Button
onClick
=
{
this
.
handleReset
}
>
重 置
</
Button
>
</
div
>
</
div
>
</
Validation
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录