Commit b566d106c53d98ee05ceb8282e083ce1cb0d7cae
1 parent
07e243ff
update Tree
update Tree
Showing
3 changed files
with
9 additions
and
15 deletions
Show diff stats
src/components/tree/tree.vue
@@ -4,10 +4,8 @@ | @@ -4,10 +4,8 @@ | ||
4 | <span :class="arrowCls(item)" @click="setExpand(item.disabled, $index)"> | 4 | <span :class="arrowCls(item)" @click="setExpand(item.disabled, $index)"> |
5 | <Icon type="arrow-right-b"></Icon> | 5 | <Icon type="arrow-right-b"></Icon> |
6 | </span> | 6 | </span> |
7 | - <!--<span v-if="showCheckbox" :class="checkboxCls(item)" @click="setCheck(item.disabled||item.disableCheckbox,$index)">--> | ||
8 | - <!--<span :class="[prefixCls + '-checkbox-inner']"></span>--> | ||
9 | - <!--</span>--> | ||
10 | <Checkbox | 7 | <Checkbox |
8 | + v-if="showCheckbox" | ||
11 | :checked="item.checked && item.childrenCheckedStatus == 2" | 9 | :checked="item.checked && item.childrenCheckedStatus == 2" |
12 | :disabled="item.disabled || item.disableCheckbox" | 10 | :disabled="item.disabled || item.disableCheckbox" |
13 | :indeterminate="item.checked && item.childrenCheckedStatus == 1" | 11 | :indeterminate="item.checked && item.childrenCheckedStatus == 1" |
@@ -116,16 +114,6 @@ | @@ -116,16 +114,6 @@ | ||
116 | } | 114 | } |
117 | ]; | 115 | ]; |
118 | }, | 116 | }, |
119 | - checkboxCls (item) { | ||
120 | - return [ | ||
121 | - `${this.prefixCls}-checkbox`, | ||
122 | - { | ||
123 | - [`${this.prefixCls}-checkbox-disabled`]: item.disabled || item.disableCheckbox, | ||
124 | - [`${this.prefixCls}-checkbox-checked`]: item.checked && item.childrenCheckedStatus == 2, | ||
125 | - [`${this.prefixCls}-checkbox-indeterminate`]: item.checked && item.childrenCheckedStatus == 1 | ||
126 | - } | ||
127 | - ]; | ||
128 | - }, | ||
129 | titleCls (item) { | 117 | titleCls (item) { |
130 | return [ | 118 | return [ |
131 | { | 119 | { |
src/styles/components/tree.less
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | font-size: @font-size-small; | 6 | font-size: @font-size-small; |
7 | li { | 7 | li { |
8 | padding: 0; | 8 | padding: 0; |
9 | - margin: 7px 0; | 9 | + margin: 8px 0; |
10 | list-style: none; | 10 | list-style: none; |
11 | white-space: nowrap; | 11 | white-space: nowrap; |
12 | outline: 0; | 12 | outline: 0; |
@@ -47,7 +47,7 @@ | @@ -47,7 +47,7 @@ | ||
47 | a { | 47 | a { |
48 | display: inline-block; | 48 | display: inline-block; |
49 | margin: 0; | 49 | margin: 0; |
50 | - padding: 1px 5px; | 50 | + padding: 0 4px; |
51 | border-radius: @btn-border-radius-small; | 51 | border-radius: @btn-border-radius-small; |
52 | cursor: pointer; | 52 | cursor: pointer; |
53 | text-decoration: none; | 53 | text-decoration: none; |
@@ -68,6 +68,7 @@ | @@ -68,6 +68,7 @@ | ||
68 | &.@{tree-prefix-cls}-switcher, | 68 | &.@{tree-prefix-cls}-switcher, |
69 | &.@{tree-prefix-cls}-iconEle { | 69 | &.@{tree-prefix-cls}-iconEle { |
70 | display: inline-block; | 70 | display: inline-block; |
71 | + text-align: center; | ||
71 | width: 16px; | 72 | width: 16px; |
72 | height: 16px; | 73 | height: 16px; |
73 | line-height: 16px; | 74 | line-height: 16px; |
src/styles/mixins/checkbox.less
@@ -154,6 +154,11 @@ | @@ -154,6 +154,11 @@ | ||
154 | top: 5px; | 154 | top: 5px; |
155 | } | 155 | } |
156 | 156 | ||
157 | + &:hover { | ||
158 | + .@{checkbox-inner-prefix-cls} { | ||
159 | + border-color: @primary-color; | ||
160 | + } | ||
161 | + } | ||
157 | .@{checkbox-inner-prefix-cls}{ | 162 | .@{checkbox-inner-prefix-cls}{ |
158 | background-color: @primary-color; | 163 | background-color: @primary-color; |
159 | border-color: @primary-color; | 164 | border-color: @primary-color; |