const item = document.createElement('div');
const customStatus = `
<Select defaultValue="lucy" style={{ width: 120 }} onChange={handleChange}>
<Option value="jack">Jack</Option>
<Option value="lucy">Lucy</Option>
<Option value="disabled" disabled>
Disabled
</Option>
<Option value="Yiminghe">yiminghe</Option>
</Select>
`
item.innerHTML= customStatus;
container.appendChild(item);
}
是以这种方式么,还是以React.createElement来创建,这种创建也只能在render的时候才能渲染。。能否给个详细的案例 |