feat(Radio): 添加点击事件后的状态更新
- 在 Radio 组件中,点击事件后更新内部选中状态 - 触发 onChange 回调函数,传递新的选中状态
This commit is contained in:
@@ -39,6 +39,7 @@ const Radio: ParentComponent<RadioProps> = (props) => {
|
||||
return;
|
||||
}
|
||||
setInternalChecked((prev) => !prev);
|
||||
mProps.onChange?.(internalChecked());
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user