Skip to content

Commit

Permalink
fix: radio click trigger twice, close #5389
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Mar 24, 2022
1 parent 7bf1e0d commit 2feab99
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions components/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ export default defineComponent({

return () => {
const radioGroup = radioGroupContext;
const {
prefixCls: customizePrefixCls,
id = formItemContext.id.value,
onClick,
...restProps
} = props;
const { prefixCls: customizePrefixCls, id = formItemContext.id.value, ...restProps } = props;

const rProps: RadioProps = {
prefixCls: prefixCls.value,
Expand All @@ -90,7 +85,7 @@ export default defineComponent({
});

return (
<label class={wrapperClassString} onClick={onClick}>
<label class={wrapperClassString}>
<VcCheckbox {...rProps} type="radio" ref={vcCheckbox} />
{slots.default && <span>{slots.default()}</span>}
</label>
Expand Down

0 comments on commit 2feab99

Please sign in to comment.