Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
d4a65d14
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,发现更多精彩内容 >>
提交
d4a65d14
编写于
1月 13, 2016
作者:
A
afc163
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into new-design-spec
上级
b14c5820
033acfd0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
109 addition
and
97 deletion
+109
-97
CHANGELOG.md
CHANGELOG.md
+2
-0
components/icon/index.md
components/icon/index.md
+1
-1
components/modal/Modal.jsx
components/modal/Modal.jsx
+76
-0
components/modal/confirm.jsx
components/modal/confirm.jsx
+1
-1
components/modal/index.jsx
components/modal/index.jsx
+1
-74
components/transfer/list.jsx
components/transfer/list.jsx
+17
-18
components/transfer/search.jsx
components/transfer/search.jsx
+9
-2
style/core/iconfont.less
style/core/iconfont.less
+1
-0
style/themes/default/custom.less
style/themes/default/custom.less
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
d4a65d14
...
...
@@ -9,6 +9,8 @@
-
修复 TimePicker 受控模式点选即关闭面板的问题。
[
#818
](
https://github.com/ant-design/ant-design/issues/818
)
-
修复一个两栏的 TimePicker 点击右边空白处无法关闭面板的问题。
[
#826
](
https://github.com/ant-design/ant-design/issues/826
)
-
修复 Table
`pagination.onChange`
指定无效的问题。
[
#824
](
https://github.com/ant-design/ant-design/issues/824
)
-
修复 Transfer 搜索功能失效的问题。
-
修复二维码图标,新增一个扫描图标。
[
#772
](
https://github.com/ant-design/ant-design/issues/772
)
## 0.11.2
...
...
components/icon/index.md
浏览文件 @
d4a65d14
...
...
@@ -151,7 +151,7 @@ const icons1 = ['step-backward', 'step-forward', 'fast-backward', 'fast-forward'
const
icons2
=
[
'
question
'
,
'
question-circle-o
'
,
'
question-circle
'
,
'
plus
'
,
'
plus-circle-o
'
,
'
plus-circle
'
,
'
pause
'
,
'
pause-circle-o
'
,
'
pause-circle
'
,
'
minus
'
,
'
minus-circle-o
'
,
'
minus-circle
'
,
'
plus-square
'
,
'
minus-square
'
,
'
info
'
,
'
info-circle-o
'
,
'
info-circle
'
,
'
exclamation
'
,
'
exclamation-circle-o
'
,
'
exclamation-circle
'
,
'
cross
'
,
'
cross-circle-o
'
,
'
cross-circle
'
,
'
check
'
,
'
check-circle-o
'
,
'
check-circle
'
,
'
clock-circle-o
'
,
'
clock-circle
'
];
const
icons3
=
[
'
lock
'
,
'
unlock
'
,
'
android
'
,
'
apple
'
,
'
area-chart
'
,
'
bar-chart
'
,
'
bars
'
,
'
book
'
,
'
calendar
'
,
'
cloud
'
,
'
cloud-download
'
,
'
code
'
,
'
copy
'
,
'
credit-card
'
,
'
delete
'
,
'
desktop
'
,
'
download
'
,
'
edit
'
,
'
ellipsis
'
,
'
file
'
,
'
file-text
'
,
'
file-unknown
'
,
'
folder
'
,
'
folder-open
'
,
'
github
'
,
'
hdd
'
,
'
frown
'
,
'
meh
'
,
'
inbox
'
,
'
laptop
'
,
'
appstore
'
,
'
line-chart
'
,
'
link
'
,
'
logout
'
,
'
mail
'
,
'
menu-fold
'
,
'
menu-unfold
'
,
'
mobile
'
,
'
notification
'
,
'
paper-clip
'
,
'
picture
'
,
'
pie-chart
'
,
'
poweroff
'
,
'
reload
'
,
'
search
'
,
'
setting
'
,
'
share-alt
'
,
'
shopping-cart
'
,
'
smile
'
,
'
tablet
'
,
'
tag
'
,
'
tags
'
,
'
to-top
'
,
'
upload
'
,
'
user
'
,
'
video-camera
'
,
'
windows
'
,
'
ie
'
,
'
chrome
'
,
'
home
'
,
'
loading
'
,
'
smile-circle
'
,
'
meh-circle
'
,
'
frown-circle
'
,
'
tags-o
'
,
'
tag-o
'
,
'
cloud-upload-o
'
,
'
cloud-download-o
'
,
'
cloud-upload
'
,
'
cloud-o
'
,
'
star-o
'
,
'
star
'
,
'
environment
'
,
'
environment-o
'
,
'
eye
'
,
'
eye-o
'
,
'
camera
'
,
'
camera-o
'
,
'
aliwangwang
'
,
'
aliwangwang-o
'
,
'
save
'
,
'
team
'
,
'
solution
'
,
'
phone
'
,
'
filter
'
,
'
exception
'
,
'
export
'
,
'
customerservice
'
,
'
qrcode
'
,
'
like
'
,
'
dislike
'
,
'
message
'
,
'
pay-circle
'
,
'
pay-circle-o
'
];
const
icons3
=
[
'
lock
'
,
'
unlock
'
,
'
android
'
,
'
apple
'
,
'
area-chart
'
,
'
bar-chart
'
,
'
bars
'
,
'
book
'
,
'
calendar
'
,
'
cloud
'
,
'
cloud-download
'
,
'
code
'
,
'
copy
'
,
'
credit-card
'
,
'
delete
'
,
'
desktop
'
,
'
download
'
,
'
edit
'
,
'
ellipsis
'
,
'
file
'
,
'
file-text
'
,
'
file-unknown
'
,
'
folder
'
,
'
folder-open
'
,
'
github
'
,
'
hdd
'
,
'
frown
'
,
'
meh
'
,
'
inbox
'
,
'
laptop
'
,
'
appstore
'
,
'
line-chart
'
,
'
link
'
,
'
logout
'
,
'
mail
'
,
'
menu-fold
'
,
'
menu-unfold
'
,
'
mobile
'
,
'
notification
'
,
'
paper-clip
'
,
'
picture
'
,
'
pie-chart
'
,
'
poweroff
'
,
'
reload
'
,
'
search
'
,
'
setting
'
,
'
share-alt
'
,
'
shopping-cart
'
,
'
smile
'
,
'
tablet
'
,
'
tag
'
,
'
tags
'
,
'
to-top
'
,
'
upload
'
,
'
user
'
,
'
video-camera
'
,
'
windows
'
,
'
ie
'
,
'
chrome
'
,
'
home
'
,
'
loading
'
,
'
smile-circle
'
,
'
meh-circle
'
,
'
frown-circle
'
,
'
tags-o
'
,
'
tag-o
'
,
'
cloud-upload-o
'
,
'
cloud-download-o
'
,
'
cloud-upload
'
,
'
cloud-o
'
,
'
star-o
'
,
'
star
'
,
'
environment
'
,
'
environment-o
'
,
'
eye
'
,
'
eye-o
'
,
'
camera
'
,
'
camera-o
'
,
'
aliwangwang
'
,
'
aliwangwang-o
'
,
'
save
'
,
'
team
'
,
'
solution
'
,
'
phone
'
,
'
filter
'
,
'
exception
'
,
'
export
'
,
'
customerservice
'
,
'
qrcode
'
,
'
scan
'
,
'
like
'
,
'
dislike
'
,
'
message
'
,
'
pay-circle
'
,
'
pay-circle-o
'
];
ReactDOM
.
render
(<
IconSet
icons
=
{
icons1
}
/>,
document
.
getElementById
(
'
iconset-direction
'
));
...
...
components/modal/Modal.jsx
0 → 100644
浏览文件 @
d4a65d14
import
React
from
'
react
'
;
import
Dialog
from
'
rc-dialog
'
;
import
{
Dom
}
from
'
rc-util
'
;
import
Button
from
'
../button
'
;
function
noop
()
{}
let
mousePosition
;
let
mousePositionEventBinded
;
let
AntModal
=
React
.
createClass
({
getDefaultProps
()
{
return
{
prefixCls
:
'
ant-modal
'
,
onOk
:
noop
,
onCancel
:
noop
,
okText
:
'
确定
'
,
cancelText
:
'
取消
'
,
width
:
520
,
transitionName
:
'
zoom
'
,
maskAnimation
:
'
fade
'
,
confirmLoading
:
false
,
visible
:
false
};
},
handleCancel
()
{
this
.
props
.
onCancel
();
},
handleOk
()
{
this
.
props
.
onOk
();
},
componentDidMount
()
{
if
(
mousePositionEventBinded
)
{
return
;
}
// 只有点击事件支持从鼠标位置动画展开
Dom
.
addEventListener
(
document
.
body
,
'
click
'
,
function
onDocumentMousemove
(
e
)
{
mousePosition
=
{
x
:
e
.
pageX
,
y
:
e
.
pageY
};
// 20ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout
(()
=>
mousePosition
=
null
,
20
);
});
mousePositionEventBinded
=
true
;
},
render
()
{
let
props
=
this
.
props
;
let
defaultFooter
=
[
<
Button
key
=
"cancel"
type
=
"ghost"
size
=
"large"
onClick
=
{
this
.
handleCancel
}
>
{
props
.
cancelText
}
</
Button
>,
<
Button
key
=
"confirm"
type
=
"primary"
size
=
"large"
loading
=
{
props
.
confirmLoading
}
onClick
=
{
this
.
handleOk
}
>
{
props
.
okText
}
</
Button
>
];
let
footer
=
props
.
footer
||
defaultFooter
;
return
<
Dialog
onClose
=
{
this
.
handleCancel
}
footer
=
{
footer
}
{
...
props
}
visible
=
{
props
.
visible
}
mousePosition
=
{
mousePosition
}
/>;
}
});
export
default
AntModal
;
components/modal/confirm.jsx
浏览文件 @
d4a65d14
import
React
from
'
react
'
;
import
ReactDOM
from
'
react-dom
'
;
import
Dialog
from
'
./
index
'
;
import
Dialog
from
'
./
modal
'
;
import
Icon
from
'
../icon
'
;
import
Button
from
'
../button
'
;
...
...
components/modal/index.jsx
浏览文件 @
d4a65d14
import
React
from
'
react
'
;
import
Dialog
from
'
rc-dialog
'
;
import
{
Dom
}
from
'
rc-util
'
;
import
AntModal
from
'
./Modal
'
;
import
confirm
from
'
./confirm
'
;
import
Button
from
'
../button
'
;
function
noop
()
{}
let
mousePosition
;
let
mousePositionEventBinded
;
let
AntModal
=
React
.
createClass
({
getDefaultProps
()
{
return
{
prefixCls
:
'
ant-modal
'
,
onOk
:
noop
,
onCancel
:
noop
,
okText
:
'
确定
'
,
cancelText
:
'
取消
'
,
width
:
520
,
transitionName
:
'
zoom
'
,
maskAnimation
:
'
fade
'
,
confirmLoading
:
false
,
visible
:
false
};
},
handleCancel
()
{
this
.
props
.
onCancel
();
},
handleOk
()
{
this
.
props
.
onOk
();
},
componentDidMount
()
{
if
(
mousePositionEventBinded
)
{
return
;
}
// 只有点击事件支持从鼠标位置动画展开
Dom
.
addEventListener
(
document
.
body
,
'
click
'
,
function
onDocumentMousemove
(
e
)
{
mousePosition
=
{
x
:
e
.
pageX
,
y
:
e
.
pageY
};
// 20ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout
(()
=>
mousePosition
=
null
,
20
);
});
mousePositionEventBinded
=
true
;
},
render
()
{
let
props
=
this
.
props
;
let
defaultFooter
=
[
<
Button
key
=
"cancel"
type
=
"ghost"
size
=
"large"
onClick
=
{
this
.
handleCancel
}
>
{
props
.
cancelText
}
</
Button
>,
<
Button
key
=
"confirm"
type
=
"primary"
size
=
"large"
loading
=
{
props
.
confirmLoading
}
onClick
=
{
this
.
handleOk
}
>
{
props
.
okText
}
</
Button
>
];
let
footer
=
props
.
footer
||
defaultFooter
;
return
<
Dialog
onClose
=
{
this
.
handleCancel
}
footer
=
{
footer
}
{
...
props
}
visible
=
{
props
.
visible
}
mousePosition
=
{
mousePosition
}
/>;
}
});
AntModal
.
info
=
function
(
props
)
{
props
.
iconClassName
=
'
info-circle
'
;
...
...
components/transfer/list.jsx
浏览文件 @
d4a65d14
...
...
@@ -78,6 +78,22 @@ class TransferList extends Component {
[
prefixCls
+
'
-with-footer
'
]:
!!
footerDom
,
});
const
showItems
=
dataSource
.
map
((
item
)
=>
{
// apply filter
const
itemText
=
this
.
props
.
render
(
item
);
const
filterResult
=
this
.
matchFilter
(
itemText
,
filter
);
const
renderedText
=
this
.
props
.
render
(
item
);
if
(
filterResult
)
{
return
(
<
li
onClick
=
{
this
.
handleSelect
.
bind
(
this
,
item
)
}
key
=
{
item
.
key
}
title
=
{
renderedText
}
>
<
Checkbox
checked
=
{
checkedKeys
.
some
(
key
=>
key
===
item
.
key
)
}
/>
{
renderedText
}
</
li
>
);
}
}).
filter
(
item
=>
!!
item
);
return
<
div
className
=
{
listCls
}
{
...
this
.
props
}
>
<
div
className
=
{
`
${
prefixCls
}
-header`
}
>
{
this
.
renderCheckbox
({
...
...
@@ -96,24 +112,7 @@ class TransferList extends Component {
<
Animate
component
=
"ul"
transitionName
=
{
this
.
state
.
mounted
?
`
${
prefixCls
}
-highlight`
:
''
}
transitionLeave
=
{
false
}
>
{
dataSource
.
length
>
0
?
dataSource
.
map
((
item
)
=>
{
// apply filter
const
itemText
=
this
.
props
.
render
(
item
);
const
filterResult
=
this
.
matchFilter
(
itemText
,
filter
);
const
renderedText
=
this
.
props
.
render
(
item
);
if
(
filterResult
)
{
return
(
<
li
onClick
=
{
this
.
handleSelect
.
bind
(
this
,
item
)
}
key
=
{
item
.
key
}
title
=
{
renderedText
}
>
<
Checkbox
checked
=
{
checkedKeys
.
some
(
key
=>
key
===
item
.
key
)
}
/>
{
renderedText
}
</
li
>
);
}
})
:
<
div
className
=
{
`
${
prefixCls
}
-body-not-found`
}
>
Not Found
</
div
>
}
{
showItems
.
length
>
0
?
showItems
:
<
div
className
=
{
`
${
prefixCls
}
-body-not-found`
}
>
Not Found
</
div
>
}
</
Animate
>
</
div
>
}
{
footerDom
?
<
div
className
=
{
`
${
prefixCls
}
-footer`
}
>
...
...
components/transfer/search.jsx
浏览文件 @
d4a65d14
...
...
@@ -12,13 +12,18 @@ class Search extends Component {
this
.
props
.
onChange
(
e
);
}
handleClear
(
e
)
{
e
.
preventDefault
();
this
.
props
.
handleClear
(
e
);
}
render
()
{
const
{
placeholder
,
value
,
prefixCls
}
=
this
.
props
;
return
<
div
>
<
input
placeholder
=
{
placeholder
}
className
=
{
prefixCls
+
'
ant-input
'
}
value
=
{
value
}
ref
=
"input"
onChange
=
{
this
.
handleChange
.
bind
(
this
)
}
/>
{
value
&&
value
.
length
>
0
?
<
a
href
=
"
javascirpt:;"
className
=
{
prefixCls
+
'
-action
'
}
onClick
=
{
this
.
props
.
handleClear
}
>
<
a
href
=
"
#"
className
=
{
prefixCls
+
'
-action
'
}
onClick
=
{
this
.
handleClear
.
bind
(
this
)
}
>
<
Icon
type
=
"cross-circle"
/>
</
a
>
:
<
span
className
=
{
prefixCls
+
'
-action
'
}
><
Icon
type
=
"search"
/></
span
>
...
...
@@ -30,12 +35,14 @@ class Search extends Component {
Search
.
defaultProps
=
{
placeholder
:
'
请输入搜索内容
'
,
onChange
:
noop
,
handleClear
:
noop
,
};
Search
.
propTypes
=
{
prefixCls
:
PropTypes
.
string
,
placeholder
:
PropTypes
.
string
,
onChange
:
PropTypes
.
func
onChange
:
PropTypes
.
func
,
handleClear
:
PropTypes
.
func
,
};
export
default
Search
;
style/core/iconfont.less
浏览文件 @
d4a65d14
...
...
@@ -179,6 +179,7 @@
.@{iconfont-css-prefix}-caret-circle-up:before {content:"\e606";}
.@{iconfont-css-prefix}-caret-circle-down:before {content:"\e607";}
.@{iconfont-css-prefix}-qrcode:before {content:"\e6a5";}
.@{iconfont-css-prefix}-scan:before {content:"\e6af";}
.@{iconfont-css-prefix}-like:before {content:"\e6a3";}
.@{iconfont-css-prefix}-dislike:before {content:"\e6a2";}
.@{iconfont-css-prefix}-pay-circle:before {content:"\e6a8";}
...
...
style/themes/default/custom.less
浏览文件 @
d4a65d14
...
...
@@ -20,7 +20,7 @@
// ICONFONT
@iconfont-css-prefix : anticon;
@icon-url : "//at.alicdn.com/t/font_145
0842624_7594283
";
@icon-url : "//at.alicdn.com/t/font_145
2596235_7047422
";
// LINK
@link-color : #2db7f5;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录