select标签的disabled属性设置等于true或者等于false,为啥在页面中都是不可下来的状态?
把disabled属性去掉后就可以下拉了
哪怎么用变量控制是否可下拉呀?
<Col span={5}>
{/**源库位**/}
<FormItem
{...itemLayout}
label={<FormattedMessage {...messages.YKW} />}
>
{getFieldDecorator(`names5_${k}`, {
initialValue: "",
rules: [
{
required: true,
whitespace: true,
message: <FormattedMessage {...messages.QXZYKW} />,
},
],
})(
<Select
showSearch
allowClear
optionFilterProp="children"
id="names5_${k}"
disabled ="false"
>
{this.state.locationData.map((item, index) => {
return (
<Select.Option
value={item.locationCode + "," + item.sendSpot}
key={index}
>
{item.locationCode}({item.sendSpot})
</Select.Option>
);
})}
</Select>
)}
</FormItem>
</Col>
第一个问题:
第二个问题: