fix(components): 修复 Radio 组件中子元素渲染问题

- 将 props.children 替换为 mProps.children,以确保正确渲染子元素
- 此修改解决了 Radio 组件中子元素显示异常的问题
This commit is contained in:
Vixalie
2025-08-12 13:52:03 +08:00
parent e0e32c9651
commit 388aa97cc3

View File

@@ -49,7 +49,7 @@ const Radio: ParentComponent<RadioProps> = (props) => {
class="text-[14px] stroke-1" class="text-[14px] stroke-1"
classList={{ 'text-primary': internalChecked() }} classList={{ 'text-primary': internalChecked() }}
/> />
<div>{props.children}</div> <div>{mProps.children}</div>
<Show when={isNotNil(mProps.name)}> <Show when={isNotNil(mProps.name)}>
<input type="hidden" name={mProps.name} value={internalChecked()} /> <input type="hidden" name={mProps.name} value={internalChecked()} />
</Show> </Show>