feat(Radio): 添加点击事件后的状态更新

- 在 Radio 组件中,点击事件后更新内部选中状态
- 触发 onChange 回调函数,传递新的选中状态
This commit is contained in:
Vixalie
2025-08-12 13:45:58 +08:00
parent c6e4ead508
commit e0e32c9651

View File

@@ -39,6 +39,7 @@ const Radio: ParentComponent<RadioProps> = (props) => {
return;
}
setInternalChecked((prev) => !prev);
mProps.onChange?.(internalChecked());
};
return (