Skip to content

Commit 2feab99

Browse files
committed
fix: radio click trigger twice, close #5389
1 parent 7bf1e0d commit 2feab99

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

components/radio/Radio.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ export default defineComponent({
6161

6262
return () => {
6363
const radioGroup = radioGroupContext;
64-
const {
65-
prefixCls: customizePrefixCls,
66-
id = formItemContext.id.value,
67-
onClick,
68-
...restProps
69-
} = props;
64+
const { prefixCls: customizePrefixCls, id = formItemContext.id.value, ...restProps } = props;
7065

7166
const rProps: RadioProps = {
7267
prefixCls: prefixCls.value,
@@ -90,7 +85,7 @@ export default defineComponent({
9085
});
9186

9287
return (
93-
<label class={wrapperClassString} onClick={onClick}>
88+
<label class={wrapperClassString}>
9489
<VcCheckbox {...rProps} type="radio" ref={vcCheckbox} />
9590
{slots.default && <span>{slots.default()}</span>}
9691
</label>

0 commit comments

Comments
 (0)