|
@@ -15,13 +15,15 @@ interface ContractSelectProps {
|
|
|
onChange?: (value?: number) => void;
|
|
onChange?: (value?: number) => void;
|
|
|
placeholder?: string;
|
|
placeholder?: string;
|
|
|
disabled?: boolean;
|
|
disabled?: boolean;
|
|
|
|
|
+ style?: React.CSSProperties;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const ContractSelect: React.FC<ContractSelectProps> = ({
|
|
const ContractSelect: React.FC<ContractSelectProps> = ({
|
|
|
value,
|
|
value,
|
|
|
onChange,
|
|
onChange,
|
|
|
placeholder = '请选择合同',
|
|
placeholder = '请选择合同',
|
|
|
- disabled = false
|
|
|
|
|
|
|
+ disabled = false,
|
|
|
|
|
+ style,
|
|
|
}) => {
|
|
}) => {
|
|
|
const [searchValue, setSearchValue] = useState('');
|
|
const [searchValue, setSearchValue] = useState('');
|
|
|
|
|
|
|
@@ -66,7 +68,7 @@ const ContractSelect: React.FC<ContractSelectProps> = ({
|
|
|
showSearch
|
|
showSearch
|
|
|
filterOption={false}
|
|
filterOption={false}
|
|
|
onSearch={handleSearch}
|
|
onSearch={handleSearch}
|
|
|
- style={{ width: '100%' }}
|
|
|
|
|
|
|
+ style={style || { width: '100%' }}
|
|
|
options={options}
|
|
options={options}
|
|
|
notFoundContent={isLoading ? <Spin size="small" /> : '未找到匹配合同'}
|
|
notFoundContent={isLoading ? <Spin size="small" /> : '未找到匹配合同'}
|
|
|
/>
|
|
/>
|