Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
400b7b8a
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,发现更多精彩内容 >>
提交
400b7b8a
编写于
3月 07, 2016
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add notFountContent for transfer, close #1142
上级
dea88ba3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
5 deletion
+11
-5
components/transfer/demo/search.md
components/transfer/demo/search.md
+1
-0
components/transfer/index.jsx
components/transfer/index.jsx
+5
-2
components/transfer/index.md
components/transfer/index.md
+1
-0
components/transfer/list.jsx
components/transfer/list.jsx
+2
-2
style/components/transfer.less
style/components/transfer.less
+2
-1
未找到文件。
components/transfer/demo/search.md
浏览文件 @
400b7b8a
...
@@ -44,6 +44,7 @@ const App = React.createClass({
...
@@ -44,6 +44,7 @@ const App = React.createClass({
<
Transfer
<
Transfer
dataSource
=
{
this
.
state
.
mockData
}
dataSource
=
{
this
.
state
.
mockData
}
showSearch
showSearch
notFoundContent
=
"xxxxxx"
targetKeys
=
{
this
.
state
.
targetKeys
}
targetKeys
=
{
this
.
state
.
targetKeys
}
onChange
=
{
this
.
handleChange
}
onChange
=
{
this
.
handleChange
}
render
=
{
item
=>
item
.
title
}
/>
render
=
{
item
=>
item
.
title
}
/>
...
...
components/transfer/index.jsx
浏览文件 @
400b7b8a
...
@@ -147,7 +147,7 @@ class Transfer extends Component {
...
@@ -147,7 +147,7 @@ class Transfer extends Component {
render
()
{
render
()
{
const
{
const
{
prefixCls
,
titles
,
operations
,
showSearch
,
prefixCls
,
titles
,
operations
,
showSearch
,
notFoundContent
,
searchPlaceholder
,
body
,
footer
,
listStyle
,
className
,
searchPlaceholder
,
body
,
footer
,
listStyle
,
className
,
}
=
this
.
props
;
}
=
this
.
props
;
const
{
leftFilter
,
rightFilter
,
leftCheckedKeys
,
rightCheckedKeys
}
=
this
.
state
;
const
{
leftFilter
,
rightFilter
,
leftCheckedKeys
,
rightCheckedKeys
}
=
this
.
state
;
...
@@ -180,6 +180,7 @@ class Transfer extends Component {
...
@@ -180,6 +180,7 @@ class Transfer extends Component {
render
=
{
this
.
props
.
render
}
render
=
{
this
.
props
.
render
}
showSearch
=
{
showSearch
}
showSearch
=
{
showSearch
}
searchPlaceholder
=
{
searchPlaceholder
}
searchPlaceholder
=
{
searchPlaceholder
}
notFoundContent
=
{
notFoundContent
}
body
=
{
body
}
body
=
{
body
}
footer
=
{
footer
}
footer
=
{
footer
}
prefixCls
=
{
`
${
prefixCls
}
-list`
}
/>
prefixCls
=
{
`
${
prefixCls
}
-list`
}
/>
...
@@ -204,6 +205,7 @@ class Transfer extends Component {
...
@@ -204,6 +205,7 @@ class Transfer extends Component {
render
=
{
this
.
props
.
render
}
render
=
{
this
.
props
.
render
}
showSearch
=
{
showSearch
}
showSearch
=
{
showSearch
}
searchPlaceholder
=
{
searchPlaceholder
}
searchPlaceholder
=
{
searchPlaceholder
}
notFoundContent
=
{
notFoundContent
}
body
=
{
body
}
body
=
{
body
}
footer
=
{
footer
}
footer
=
{
footer
}
prefixCls
=
{
`
${
prefixCls
}
-list`
}
/>
prefixCls
=
{
`
${
prefixCls
}
-list`
}
/>
...
@@ -222,7 +224,7 @@ Transfer.defaultProps = {
...
@@ -222,7 +224,7 @@ Transfer.defaultProps = {
operations
:
[],
operations
:
[],
showSearch
:
false
,
showSearch
:
false
,
searchPlaceholder
:
'
请输入搜索内容
'
,
searchPlaceholder
:
'
请输入搜索内容
'
,
notFoundContent
:
'
请输入搜索内容
'
,
notFoundContent
:
'
Not Found
'
,
body
:
noop
,
body
:
noop
,
footer
:
noop
,
footer
:
noop
,
};
};
...
@@ -240,6 +242,7 @@ Transfer.propTypes = {
...
@@ -240,6 +242,7 @@ Transfer.propTypes = {
operations
:
PropTypes
.
array
,
operations
:
PropTypes
.
array
,
showSearch
:
PropTypes
.
bool
,
showSearch
:
PropTypes
.
bool
,
searchPlaceholder
:
PropTypes
.
string
,
searchPlaceholder
:
PropTypes
.
string
,
notFoundContent
:
PropTypes
.
node
,
body
:
PropTypes
.
func
,
body
:
PropTypes
.
func
,
footer
:
PropTypes
.
func
,
footer
:
PropTypes
.
func
,
};
};
...
...
components/transfer/index.md
浏览文件 @
400b7b8a
...
@@ -28,4 +28,5 @@
...
@@ -28,4 +28,5 @@
| operations | 操作文案集合,顺序从上至下 | Array | [] |
| operations | 操作文案集合,顺序从上至下 | Array | [] |
| showSearch | 是否显示搜索框 | Boolean | false |
| showSearch | 是否显示搜索框 | Boolean | false |
| searchPlaceholder | 搜索框的默认值 | String | 请输入搜索的内容 |
| searchPlaceholder | 搜索框的默认值 | String | 请输入搜索的内容 |
| notFoundContent | 当列表为空时显示的内容 | React.node | 'Not Found' |
| footer | 底部渲染函数 | Function(props) | | |
| footer | 底部渲染函数 | Function(props) | | |
components/transfer/list.jsx
浏览文件 @
400b7b8a
...
@@ -69,7 +69,7 @@ class TransferList extends Component {
...
@@ -69,7 +69,7 @@ class TransferList extends Component {
}
}
render
()
{
render
()
{
const
{
prefixCls
,
dataSource
,
titleText
,
filter
,
checkedKeys
,
const
{
prefixCls
,
dataSource
,
titleText
,
filter
,
checkedKeys
,
notFoundContent
,
checkStatus
,
body
,
footer
,
showSearch
,
searchPlaceholder
}
=
this
.
props
;
checkStatus
,
body
,
footer
,
showSearch
,
searchPlaceholder
}
=
this
.
props
;
// Custom Layout
// Custom Layout
...
@@ -118,7 +118,7 @@ class TransferList extends Component {
...
@@ -118,7 +118,7 @@ class TransferList extends Component {
<
Animate
component
=
"ul"
<
Animate
component
=
"ul"
transitionName
=
{
this
.
state
.
mounted
?
`
${
prefixCls
}
-highlight`
:
''
}
transitionName
=
{
this
.
state
.
mounted
?
`
${
prefixCls
}
-highlight`
:
''
}
transitionLeave
=
{
false
}
>
transitionLeave
=
{
false
}
>
{
showItems
.
length
>
0
?
showItems
:
<
div
className
=
{
`
${
prefixCls
}
-body-not-found`
}
>
Not Found
</
div
>
}
{
showItems
.
length
>
0
?
showItems
:
<
div
className
=
{
`
${
prefixCls
}
-body-not-found`
}
>
{
notFoundContent
}
</
div
>
}
</
Animate
>
</
Animate
>
</
div
>
}
</
div
>
}
{
footerDom
?
<
div
className
=
{
`
${
prefixCls
}
-footer`
}
>
{
footerDom
?
<
div
className
=
{
`
${
prefixCls
}
-footer`
}
>
...
...
style/components/transfer.less
浏览文件 @
400b7b8a
...
@@ -66,9 +66,10 @@
...
@@ -66,9 +66,10 @@
}
}
&-not-found {
&-not-found {
margin
-top: 24px;
padding
-top: 24px;
color: #ccc;
color: #ccc;
text-align: center;
text-align: center;
height: 100%;
}
}
ul {
ul {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录