feat: checkbox option support number
parent
4b9fe8242e
commit
8f20fd514a
|
@ -21,7 +21,7 @@ export default defineComponent({
|
||||||
);
|
);
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
return props.options.map(option => {
|
return props.options.map(option => {
|
||||||
if (typeof option === 'string') {
|
if (typeof option === 'string' || typeof option === 'number') {
|
||||||
return {
|
return {
|
||||||
label: option,
|
label: option,
|
||||||
value: option,
|
value: option,
|
||||||
|
|
|
@ -16,8 +16,8 @@ export const abstractCheckboxGroupProps = () => {
|
||||||
name: String,
|
name: String,
|
||||||
prefixCls: String,
|
prefixCls: String,
|
||||||
options: {
|
options: {
|
||||||
type: Array as PropType<Array<CheckboxOptionType | string>>,
|
type: Array as PropType<Array<CheckboxOptionType | string | number>>,
|
||||||
default: () => [] as Array<CheckboxOptionType | string>,
|
default: () => [] as Array<CheckboxOptionType | string | number>,
|
||||||
},
|
},
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
id: String,
|
id: String,
|
||||||
|
|
Loading…
Reference in New Issue