Skip to content

Commit 8f20fd5

Browse files
committed
feat: checkbox option support number
1 parent 4b9fe82 commit 8f20fd5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/checkbox/Group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineComponent({
2121
);
2222
const options = computed(() => {
2323
return props.options.map(option => {
24-
if (typeof option === 'string') {
24+
if (typeof option === 'string' || typeof option === 'number') {
2525
return {
2626
label: option,
2727
value: option,

components/checkbox/interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const abstractCheckboxGroupProps = () => {
1616
name: String,
1717
prefixCls: String,
1818
options: {
19-
type: Array as PropType<Array<CheckboxOptionType | string>>,
20-
default: () => [] as Array<CheckboxOptionType | string>,
19+
type: Array as PropType<Array<CheckboxOptionType | string | number>>,
20+
default: () => [] as Array<CheckboxOptionType | string | number>,
2121
},
2222
disabled: Boolean,
2323
id: String,

0 commit comments

Comments
 (0)