fix(checkbox): onClick event triggered twice (#5363)
Co-authored-by: 张宏亮 <hongliang@yunshan.net>cssinjs
parent
17acda5655
commit
47e218d7ab
|
@ -72,6 +72,7 @@ export default defineComponent({
|
||||||
id,
|
id,
|
||||||
prefixCls: prefixCls.value,
|
prefixCls: prefixCls.value,
|
||||||
...restAttrs,
|
...restAttrs,
|
||||||
|
onClick,
|
||||||
};
|
};
|
||||||
if (checkboxGroup && !skipGroup) {
|
if (checkboxGroup && !skipGroup) {
|
||||||
checkboxProps.onChange = (...args) => {
|
checkboxProps.onChange = (...args) => {
|
||||||
|
@ -103,7 +104,6 @@ export default defineComponent({
|
||||||
style={style}
|
style={style}
|
||||||
onMouseenter={onMouseenter as EventHandler}
|
onMouseenter={onMouseenter as EventHandler}
|
||||||
onMouseleave={onMouseleave as EventHandler}
|
onMouseleave={onMouseleave as EventHandler}
|
||||||
onClick={onClick}
|
|
||||||
>
|
>
|
||||||
<VcCheckbox {...checkboxProps} class={checkboxClass} ref={checkboxRef} />
|
<VcCheckbox {...checkboxProps} class={checkboxClass} ref={checkboxRef} />
|
||||||
{children.length ? <span>{children}</span> : null}
|
{children.length ? <span>{children}</span> : null}
|
||||||
|
|
Loading…
Reference in New Issue