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 | 4 | <span :class="arrowCls(item)" @click="setExpand(item.disabled, $index)"> |
| 5 | 5 | <Icon type="arrow-right-b"></Icon> |
| 6 | 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 | 7 | <Checkbox |
| 8 | + v-if="showCheckbox" | |
| 11 | 9 | :checked="item.checked && item.childrenCheckedStatus == 2" |
| 12 | 10 | :disabled="item.disabled || item.disableCheckbox" |
| 13 | 11 | :indeterminate="item.checked && item.childrenCheckedStatus == 1" |
| ... | ... | @@ -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 | 117 | titleCls (item) { |
| 130 | 118 | return [ |
| 131 | 119 | { | ... | ... |
src/styles/components/tree.less
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | font-size: @font-size-small; |
| 7 | 7 | li { |
| 8 | 8 | padding: 0; |
| 9 | - margin: 7px 0; | |
| 9 | + margin: 8px 0; | |
| 10 | 10 | list-style: none; |
| 11 | 11 | white-space: nowrap; |
| 12 | 12 | outline: 0; |
| ... | ... | @@ -47,7 +47,7 @@ |
| 47 | 47 | a { |
| 48 | 48 | display: inline-block; |
| 49 | 49 | margin: 0; |
| 50 | - padding: 1px 5px; | |
| 50 | + padding: 0 4px; | |
| 51 | 51 | border-radius: @btn-border-radius-small; |
| 52 | 52 | cursor: pointer; |
| 53 | 53 | text-decoration: none; |
| ... | ... | @@ -68,6 +68,7 @@ |
| 68 | 68 | &.@{tree-prefix-cls}-switcher, |
| 69 | 69 | &.@{tree-prefix-cls}-iconEle { |
| 70 | 70 | display: inline-block; |
| 71 | + text-align: center; | |
| 71 | 72 | width: 16px; |
| 72 | 73 | height: 16px; |
| 73 | 74 | line-height: 16px; | ... | ... |
src/styles/mixins/checkbox.less