{item.type == 'select' ? (
<Select>
{many.map((items, index) => {
return <Option value={items.value}>{items.label}</Option>;
})}
</Select>
) : item.type == 'input' ? (
<Input />
) : item.type == 'inputNumber' ? (
<Input type="number" />
) : item.type == 'radio' ? (
<Checkbox />
) : (
'1'
)}{item.type == 'select' ? (
<Select>
{many.map((items, index) => {
return <Option value={items.value}>{items.label}</Option>;
})}
</Select>
) : item.type == 'input' ? (
<Input />
) : item.type == 'inputNumber' ? (
<Input type="number" />
) : item.type == 'radio' ? (
<Checkbox />
) : (
'1'
)}
react三元表达式通过状态输出标签
最新推荐文章于 2024-07-16 14:30:20 发布