diff --git a/packages/components/radio/__tests__/radio.test.tsx b/packages/components/radio/__tests__/radio.test.tsx index 331164779c..3392a87d7c 100644 --- a/packages/components/radio/__tests__/radio.test.tsx +++ b/packages/components/radio/__tests__/radio.test.tsx @@ -379,5 +379,13 @@ describe('Radio Button', () => { expect(radioGroup2.attributes()['aria-label']).toBe('Bar') expect(radioGroup2.attributes()['aria-labelledby']).toBeFalsy() }) + + test('value is number change event need checked', async () => { + const radio = ref(1) + const wrapper = mount(() => ) + expect(wrapper.classes()).not.toContain('is-checked') + await wrapper.trigger('click') + expect(wrapper.classes()).toContain('is-checked') + }) }) }) diff --git a/packages/components/radio/src/radio.vue b/packages/components/radio/src/radio.vue index cce65b0a9c..40dc609ae5 100644 --- a/packages/components/radio/src/radio.vue +++ b/packages/components/radio/src/radio.vue @@ -23,6 +23,7 @@ :value="actualValue" :name="name || radioGroup?.name" :disabled="disabled" + :checked="modelValue === actualValue" type="radio" @focus="focus = true" @blur="focus = false"