ant select动态渲染实现默认选中
Others 2020-10-27 06:12:30 2020-10-27 06:12:30 2391 次浏览<Select defaultValue={ textInput[i]["option"][0]?textInput[i]["option"][0]['value']:''} key={ textInput[i]["option"][0]?textInput[i]["option"][0]['value']:''}> { textInput[i]["option"].map(item=>( <Option key={item["value"]} value={item["value"]}> {item["label"]}</Option> )) }</Select>
给select添加key;
this.refs.form.setFieldsValue({flage:true})
Links: 484