Skip to content

Commit

Permalink
fix(radio): 修复组件内 key 相关报错
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu committed Sep 12, 2023
1 parent 04a7880 commit 02b5685
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/packages/radio/radio.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,19 @@ export const Radio: FunctionComponent<
return renderButton()
}
if (reverseState) {
return [renderLabel(), renderIcon()]
return (
<>
{renderLabel()}
{renderIcon()}
</>
)
}
return [renderIcon(), renderLabel()]
return (
<>
{renderIcon()}
{renderLabel()}
</>
)
}
const handleClick: MouseEventHandler<HTMLDivElement> = (e) => {
if (disabledStatement || checkedStatement) return
Expand Down

0 comments on commit 02b5685

Please sign in to comment.