|
|
@@ -2,6 +2,7 @@ import {Col, Row, Select as SelectOri} from 'antd';
|
|
|
import css from './index.module.css';
|
|
|
import {FC} from 'react';
|
|
|
import {filterOptions} from '@utils';
|
|
|
+import classNames from 'classnames';
|
|
|
|
|
|
type Props = {
|
|
|
label: string;
|
|
|
@@ -28,17 +29,15 @@ const Select: FC<Props> = function ({
|
|
|
|
|
|
return (
|
|
|
<Col span={6}>
|
|
|
- <Row gutter={12}>
|
|
|
- <Col>
|
|
|
- <label htmlFor={`filter_${name}`} className={css.fieldLabel}>
|
|
|
- {label}:{' '}
|
|
|
- </label>
|
|
|
- </Col>
|
|
|
- <Col flex={1}>
|
|
|
+ <div className={css.field}>
|
|
|
+ <label htmlFor={`filter_${name}`} className={css.fieldLabel}>
|
|
|
+ {label}:
|
|
|
+ </label>
|
|
|
+ <div className={css.fieldWrapper}>
|
|
|
<SelectOri
|
|
|
showSearch={showSearch}
|
|
|
filterOption={showSearch ? filterOptions : false}
|
|
|
- className='width-full'
|
|
|
+ className={classNames('width-full')}
|
|
|
id={`filter_${name}`}
|
|
|
data-testid={`filter_${name}`}
|
|
|
placeholder={placeholder ?? '请输入'}
|
|
|
@@ -47,8 +46,8 @@ const Select: FC<Props> = function ({
|
|
|
onChange={onSelectChange}
|
|
|
getPopupContainer={(node: HTMLElement) => node.parentNode as HTMLElement}
|
|
|
/>
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</Col>
|
|
|
);
|
|
|
};
|