Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
d2cf85b8
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,发现更多精彩内容 >>
提交
d2cf85b8
编写于
2月 26, 2016
作者:
A
afc163
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix allowClear of TreeSelect, close #1084
上级
7ea67b6e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
42 deletion
+38
-42
components/tree-select/demo/basic.md
components/tree-select/demo/basic.md
+1
-0
components/tree-select/index.jsx
components/tree-select/index.jsx
+0
-2
style/components/select.less
style/components/select.less
+33
-28
style/components/treeSelect.less
style/components/treeSelect.less
+4
-12
未找到文件。
components/tree-select/demo/basic.md
浏览文件 @
d2cf85b8
...
...
@@ -26,6 +26,7 @@ const Demo = React.createClass({
value
=
{
this
.
state
.
value
}
dropdownMenuStyle
=
{
{
maxHeight
:
400
,
overflow
:
'
auto
'
}
}
placeholder
=
"请选择"
allowClear
treeDefaultExpandAll
onChange
=
{
this
.
onChange
}
>
<
TreeNode
value
=
"parent 1"
title
=
"parent 1"
key
=
"0-1"
>
...
...
components/tree-select/index.jsx
浏览文件 @
d2cf85b8
import
React
from
'
react
'
;
import
TreeSelect
,
{
TreeNode
}
from
'
rc-tree-select
'
;
import
classNames
from
'
classnames
'
;
// import animation from '../common/openAnimation';
const
AntTreeSelect
=
React
.
createClass
({
getDefaultProps
()
{
...
...
@@ -10,7 +9,6 @@ const AntTreeSelect = React.createClass({
transitionName
:
'
slide-up
'
,
choiceTransitionName
:
'
zoom
'
,
showSearch
:
false
,
// openAnimation: animation,
};
},
render
()
{
...
...
style/components/select.less
浏览文件 @
d2cf85b8
...
...
@@ -4,6 +4,37 @@
@import "../mixins/iconfont";
.selection__clear() {
display: inline-block;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
opacity: 0;
position: absolute;
right: 8px;
z-index: 1;
background: #fff;
top: 50%;
font-size: 12px;
color: #ccc;
width: 12px;
height: 12px;
margin-top: -6px;
line-height: 12px;
cursor: pointer;
transition: color 0.3s ease, opacity 0.15s ease;
&:before {
display: block;
font-family: "anticon" !important;
content: "\E631";
}
&:hover {
color: #999;
}
}
.@{select-prefix-cls} {
box-sizing: border-box;
display: inline-block;
...
...
@@ -53,39 +84,13 @@
&:hover {
.hover;
}
&:active {
.active;
}
&__clear {
display: inline-block;
font-style: normal;
vertical-align: baseline;
text-align: center;
text-transform: none;
text-rendering: auto;
opacity: 0;
position: absolute;
right: 8px;
z-index: 1;
background: #fff;
top: 50%;
font-size: 12px;
color: #ccc;
width: 12px;
height: 12px;
margin-top: -6px;
line-height: 12px;
cursor: pointer;
transition: color 0.3s ease, opacity 0.15s ease;
&:before {
display: block;
font-family: "anticon" !important;
content: "\E631";
}
&:hover {
color: #999;
}
.selection__clear();
}
&:hover &__clear {
...
...
style/components/treeSelect.less
浏览文件 @
d2cf85b8
...
...
@@ -115,12 +115,6 @@
@duration: .3s;
@import "../mixins/iconfont";
//mixin
.selection__clear() {
cursor: pointer;
float: right;
font-weight: bold;
}
.@{tree-select-prefix-cls} {
box-sizing: border-box;
...
...
@@ -216,6 +210,10 @@
.selection__clear();
}
&:hover .@{tree-select-prefix-cls}-selection__clear {
opacity: 1;
}
.@{tree-select-prefix-cls}-selection__placeholder {
color: #ccc;
}
...
...
@@ -345,12 +343,6 @@
padding-bottom: 4px;
}
.@{tree-select-prefix-cls}-selection__clear {
.selection__clear();
margin-top: 5px;
margin-right: 10px;
}
> ul > li {
margin-top: 4px;
height: 20px;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录