mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
fix(components): [radio] change not trigger (#17047)
This commit is contained in:
parent
61c828f493
commit
b55163fde7
@ -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(() => <Radio v-model={radio.value} label="1" />)
|
||||
expect(wrapper.classes()).not.toContain('is-checked')
|
||||
await wrapper.trigger('click')
|
||||
expect(wrapper.classes()).toContain('is-checked')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -23,6 +23,7 @@
|
||||
:value="actualValue"
|
||||
:name="name || radioGroup?.name"
|
||||
:disabled="disabled"
|
||||
:checked="modelValue === actualValue"
|
||||
type="radio"
|
||||
@focus="focus = true"
|
||||
@blur="focus = false"
|
||||
|
Loading…
Reference in New Issue
Block a user