Skip to content

Commit 47e218d

Browse files
authored
fix(checkbox): onClick event triggered twice (#5363)
Co-authored-by: 张宏亮 <[email protected]>
1 parent 17acda5 commit 47e218d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/checkbox/Checkbox.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default defineComponent({
7272
id,
7373
prefixCls: prefixCls.value,
7474
...restAttrs,
75+
onClick,
7576
};
7677
if (checkboxGroup && !skipGroup) {
7778
checkboxProps.onChange = (...args) => {
@@ -103,7 +104,6 @@ export default defineComponent({
103104
style={style}
104105
onMouseenter={onMouseenter as EventHandler}
105106
onMouseleave={onMouseleave as EventHandler}
106-
onClick={onClick}
107107
>
108108
<VcCheckbox {...checkboxProps} class={checkboxClass} ref={checkboxRef} />
109109
{children.length ? <span>{children}</span> : null}

0 commit comments

Comments
 (0)