Commit 07e243ffc1472a7149b353d30d5c0bea861a43eb
1 parent
b923c818
update Checkbox indeterminate style
update Checkbox indeterminate style
Showing
2 changed files
with
19 additions
and
0 deletions
Show diff stats
src/components/tree/tree.vue
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | <Checkbox |
11 | 11 | :checked="item.checked && item.childrenCheckedStatus == 2" |
12 | 12 | :disabled="item.disabled || item.disableCheckbox" |
13 | + :indeterminate="item.checked && item.childrenCheckedStatus == 1" | |
13 | 14 | @click.prevent="setCheck(item.disabled||item.disableCheckbox,$index)"></Checkbox> |
14 | 15 | <a :class="titleCls(item)" @click="setSelect(item.disabled, $index)"> |
15 | 16 | <span :class="[prefixCls + '-title']" v-html="item.title"></span> | ... | ... |
src/styles/mixins/checkbox.less
... | ... | @@ -142,6 +142,24 @@ |
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
145 | + // 半选状态 | |
146 | + .@{checkbox-prefix-cls}-indeterminate{ | |
147 | + .@{checkbox-inner-prefix-cls}:after{ | |
148 | + content: ''; | |
149 | + width: 8px; | |
150 | + height: 1px; | |
151 | + transform: scale(1); | |
152 | + position: absolute; | |
153 | + left: 2px; | |
154 | + top: 5px; | |
155 | + } | |
156 | + | |
157 | + .@{checkbox-inner-prefix-cls}{ | |
158 | + background-color: @primary-color; | |
159 | + border-color: @primary-color; | |
160 | + } | |
161 | + } | |
162 | + | |
145 | 163 | .@{checkbox-prefix-cls}-wrapper { |
146 | 164 | cursor: pointer; |
147 | 165 | font-size: @font-size-small; | ... | ... |