File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export default defineComponent({
108
108
onChange = { option . onChange }
109
109
class = { `${ groupPrefixCls . value } -item` }
110
110
>
111
- { option . label = == undefined ? slots . label ?.( option ) : option . label }
111
+ { slots . label ! == undefined ? slots . label ?.( option ) : option . label }
112
112
</ Checkbox >
113
113
) ) ;
114
114
}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ exports[`renders ./components/checkbox/demo/group.vue correctly 1`] = `
39
39
<div class = " ant-checkbox-group" ><label class = " ant-checkbox-wrapper ant-checkbox-group-item" ><span class = " ant-checkbox" ><input type = " checkbox" class = " ant-checkbox-input" value = " Apple" ><span class = " ant-checkbox-inner" ></span ></span ><span >Apple</span ></label ><label class = " ant-checkbox-wrapper ant-checkbox-wrapper-checked ant-checkbox-group-item" ><span class = " ant-checkbox ant-checkbox-checked" ><input type = " checkbox" class = " ant-checkbox-input" value = " Pear" ><span class = " ant-checkbox-inner" ></span ></span ><span >Pear</span ></label ><label class = " ant-checkbox-wrapper ant-checkbox-group-item" ><span class = " ant-checkbox" ><input type = " checkbox" class = " ant-checkbox-input" value = " Orange" ><span class = " ant-checkbox-inner" ></span ></span ><span >Orange</span ></label ></div >
40
40
<br >
41
41
<br >
42
- <div class = " ant-checkbox-group" ><label class = " ant-checkbox-wrapper ant-checkbox-wrapper-checked ant-checkbox-wrapper-disabled ant-checkbox-group-item" ><span class = " ant-checkbox ant-checkbox-checked ant-checkbox-disabled" ><input type = " checkbox" disabled = " " class = " ant-checkbox-input" value = " Apple" ><span class = " ant-checkbox-inner" ></span ></span ><span ><span style = " color: red;" >Apple</span ></span ></label ><label class = " ant-checkbox-wrapper ant-checkbox-wrapper-disabled ant-checkbox-group-item" ><span class = " ant-checkbox ant-checkbox-disabled" ><input type = " checkbox" disabled = " " class = " ant-checkbox-input" value = " Pear" ><span class = " ant-checkbox-inner" ></span ></span ><span >Pear</span ></label ><label class = " ant-checkbox-wrapper ant-checkbox-wrapper-disabled ant-checkbox-group-item" ><span class = " ant-checkbox ant-checkbox-disabled" ><input type = " checkbox" disabled = " " class = " ant-checkbox-input" value = " Orange" ><span class = " ant-checkbox-inner" ></span ></span ><span >Orange</span ></label ></div >
42
+ <div class="ant-checkbox-group"><label class="ant-checkbox-wrapper ant-checkbox-wrapper-checked ant-checkbox-wrapper-disabled ant-checkbox-group-item"><span class="ant-checkbox ant-checkbox-checked ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input" value="Apple"><span class="ant-checkbox-inner"></span></span><span><span style="color: red;">Apple</span></span></label><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled ant-checkbox-group-item"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input" value="Pear"><span class="ant-checkbox-inner"></span></span><span><span style="color: red;">Pear</span></span></label><label class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled ant-checkbox-group-item"><span class="ant-checkbox ant-checkbox-disabled"><input type="checkbox" disabled="" class="ant-checkbox-input" value="Orange"><span class="ant-checkbox-inner"></span></span><span><span style="color: red;">Orange</span></span></label></div>
43
43
`;
44
44
45
45
exports[`renders ./components/checkbox/demo/layout.vue correctly 1`] = `
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ Generate a group of checkboxes from an array
27
27
<br />
28
28
<br />
29
29
<a-checkbox-group v-model:value =" state.value4" :options =" optionsWithDisabled" disabled >
30
- <template #label =" { value } " >
31
- <span style =" color : red " >{{ value }}</span >
30
+ <template #label =" { label } " >
31
+ <span style =" color : red " >{{ label }}</span >
32
32
</template >
33
33
</a-checkbox-group >
34
34
</template >
@@ -42,7 +42,7 @@ const options = [
42
42
{ label: ' Orange' , value: ' Orange' },
43
43
];
44
44
const optionsWithDisabled = [
45
- { value: ' Apple' },
45
+ { label: ' Apple ' , value: ' Apple' },
46
46
{ label: ' Pear' , value: ' Pear' },
47
47
{ label: ' Orange' , value: ' Orange' , disabled: false },
48
48
];
You can’t perform that action at this time.
0 commit comments