import classNames from 'classnames';
import React, {
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { Icon } from '../Icon';
import { ConfigProvider, Select as AntdSelect, SelectProps } from 'antd';
import './index.less';
import { AOP } from '../utils/AOP';
import { SelectHandler } from 'rc-select/lib/Select';
import { DefaultOptionType, LabeledValue } from 'antd/lib/select';
const Select = (props: SelectProps) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('btri-select');
// 为了与 antd 的生态保持兼容性,我们要求必须要使用 `.@{ant-prefix}` 变量来生成类名
const { suffixIcon, removeIcon, loading } = props;
const customSuffixIcon = useMemo(() => {
return loading
? {
suffixIcon: (