react for循环
2019-03-18 本文已影响0人
youngss
render(){
let day = (length,text) => {
var res = [];
for (var i = 0; i < length; i++) {
res.push(<Option key={i}>{i+1}{text}</Option>)
}
return res
}
return (
{ day(30,"日") }
)