Skip to content

Commit

Permalink
fix(radio): 修复组件内 key 相关报错【1.x】 (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Sep 13, 2023
1 parent 04a7880 commit bf6ab8d
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 bf6ab8d

Please sign in to comment.