fix(components): 修复 Radio 组件中子元素渲染问题
- 将 props.children 替换为 mProps.children,以确保正确渲染子元素 - 此修改解决了 Radio 组件中子元素显示异常的问题
This commit is contained in:
@@ -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>
|
||||||
|
Reference in New Issue
Block a user