|
@@ -5,7 +5,7 @@ const { Group } = Input;
|
5
|
5
|
const { Option } = Select;
|
6
|
6
|
|
7
|
7
|
export default (props) => {
|
8
|
|
- const { fetch, placeholder, onSubmit } = props;
|
|
8
|
+ const { fetch, placeholder, disabled, onSubmit } = props;
|
9
|
9
|
|
10
|
10
|
const [data, setData] = useState([]);
|
11
|
11
|
const [value, setValue] = useState();
|
|
@@ -51,6 +51,7 @@ export default (props) => {
|
51
|
51
|
<Select
|
52
|
52
|
allowClear
|
53
|
53
|
showSearch
|
|
54
|
+ disabled={disabled}
|
54
|
55
|
value={value}
|
55
|
56
|
style={{ width: '50%' }}
|
56
|
57
|
placeholder={placeholder}
|
|
@@ -63,8 +64,14 @@ export default (props) => {
|
63
|
64
|
>
|
64
|
65
|
{options}
|
65
|
66
|
</Select>
|
66
|
|
- <InputNumber style={{ width: '30%' }} placeholder="请输入数量" value={amount} onChange={setAmount} />
|
67
|
|
- <Button type="primary" onClick={handleSubmit}>确定</Button>
|
|
67
|
+ <InputNumber
|
|
68
|
+ style={{ width: '30%' }}
|
|
69
|
+ placeholder="请输入数量"
|
|
70
|
+ disabled={disabled}
|
|
71
|
+ value={amount}
|
|
72
|
+ onChange={setAmount}
|
|
73
|
+ />
|
|
74
|
+ <Button type="primary" disabled={disabled} onClick={handleSubmit}>确定</Button>
|
68
|
75
|
</Group>
|
69
|
76
|
)
|
70
|
77
|
}
|