From b01e609595c4ea850dc0c1efc32e4affbabac75f Mon Sep 17 00:00:00 2001 From: ajaxzheng <894103554@qq.com> Date: Mon, 2 Dec 2024 20:23:33 +0800 Subject: [PATCH] fix: [button-group] fixed the bug that multiple clicks on the same button would trigger multiple events --- packages/renderless/src/button-group/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/renderless/src/button-group/index.ts b/packages/renderless/src/button-group/index.ts index c2725c84bf..05508f05d0 100644 --- a/packages/renderless/src/button-group/index.ts +++ b/packages/renderless/src/button-group/index.ts @@ -22,7 +22,7 @@ export const handleChange = export const handleClick = ({ emit, props, state }: Pick) => (node: IButtonGroupNode): void => { - if (!state.disabled && !node.disabled) { + if (!state.disabled && !node.disabled && state.value !== node[props.valueField]) { state.value = node[props.valueField] emit('update:modelValue', state.value) }