update Tree

update Tree
This commit is contained in:
梁灏 2017-02-07 15:01:46 +08:00
parent 07e243ffc1
commit b566d106c5
3 changed files with 9 additions and 15 deletions

View file

@ -4,10 +4,8 @@
<span :class="arrowCls(item)" @click="setExpand(item.disabled, $index)">
<Icon type="arrow-right-b"></Icon>
</span>
<!--<span v-if="showCheckbox" :class="checkboxCls(item)" @click="setCheck(item.disabled||item.disableCheckbox,$index)">-->
<!--<span :class="[prefixCls + '-checkbox-inner']"></span>-->
<!--</span>-->
<Checkbox
v-if="showCheckbox"
:checked="item.checked && item.childrenCheckedStatus == 2"
:disabled="item.disabled || item.disableCheckbox"
:indeterminate="item.checked && item.childrenCheckedStatus == 1"
@ -116,16 +114,6 @@
}
];
},
checkboxCls (item) {
return [
`${this.prefixCls}-checkbox`,
{
[`${this.prefixCls}-checkbox-disabled`]: item.disabled || item.disableCheckbox,
[`${this.prefixCls}-checkbox-checked`]: item.checked && item.childrenCheckedStatus == 2,
[`${this.prefixCls}-checkbox-indeterminate`]: item.checked && item.childrenCheckedStatus == 1
}
];
},
titleCls (item) {
return [
{

View file

@ -6,7 +6,7 @@
font-size: @font-size-small;
li {
padding: 0;
margin: 7px 0;
margin: 8px 0;
list-style: none;
white-space: nowrap;
outline: 0;
@ -47,7 +47,7 @@
a {
display: inline-block;
margin: 0;
padding: 1px 5px;
padding: 0 4px;
border-radius: @btn-border-radius-small;
cursor: pointer;
text-decoration: none;
@ -68,6 +68,7 @@
&.@{tree-prefix-cls}-switcher,
&.@{tree-prefix-cls}-iconEle {
display: inline-block;
text-align: center;
width: 16px;
height: 16px;
line-height: 16px;

View file

@ -154,6 +154,11 @@
top: 5px;
}
&:hover {
.@{checkbox-inner-prefix-cls} {
border-color: @primary-color;
}
}
.@{checkbox-inner-prefix-cls}{
background-color: @primary-color;
border-color: @primary-color;