📅  最后修改于: 2022-03-11 15:04:09.346000             🧑  作者: Mango
import React from "react";
function Radio () {
const [status, setStatus] = React.useState(0) // 0: no show, 1: show yes, 2: show no.
const radioHandler = (status) => {
setStatus(status);
};
return (
<>
radioHandler(1)} />
radioHandler(2)} />
{status === 1 && drawYesContent()}
{status === 2 && drawNoContent()}
>
);
}
export default Radio;