diff --git a/components/apolloTable/component/base/edit/search/index.tsx b/components/apolloTable/component/base/edit/search/index.tsx index fe04005cb2748411f1631a79de96f0c43ba14d04..a149f2a2159761f6efa9b0d06dbf343c6f51641d 100644 --- a/components/apolloTable/component/base/edit/search/index.tsx +++ b/components/apolloTable/component/base/edit/search/index.tsx @@ -44,6 +44,15 @@ export const ApolloSearch = (props: ApolloSearchProps) => { } }; + const extra: any = {}; + // 表格中限制下拉类组件弹框高度 + if (maxPopHeight) { + extra.dropdownClassName = s.searchDropdown; + extra.dropdownStyle = { + maxHeight: maxPopHeight, + }; + } + return ( { onDropdownVisibleChange={selfProps.mode === 'multiple' ? multipleBlurFn : singleBlurFn} onChange={changeValue} initDataType="onfocus" - dropdownClassName={s.searchDropdown} - dropdownStyle={{ - maxHeight: maxPopHeight, - }} + {...extra} /> ); }; diff --git a/components/apolloTable/component/base/edit/select/index.tsx b/components/apolloTable/component/base/edit/select/index.tsx index 03c8c7f88fa260b07102dd972ac68c90ee23bb59..28f96dcf351f29a19fd39110d52acceb7b6194dd 100644 --- a/components/apolloTable/component/base/edit/select/index.tsx +++ b/components/apolloTable/component/base/edit/select/index.tsx @@ -4,6 +4,7 @@ import { onBlurFn } from '../onBlurFn'; import { ApolloSelectProps } from '../editInterface'; import { antiAssign } from '../../../../utils/utils'; import styles from './styles.less'; +import s from "@/submodule/components/apolloTable/component/base/edit/search/index.less"; export const ApolloSelect = (props: ApolloSelectProps) => { const { options = [], onChange, isMultiple, maxPopHeight } = props; @@ -31,16 +32,21 @@ export const ApolloSelect = (props: ApolloSelectProps) => { } }; + const extra: any = {}; + if (maxPopHeight) { + extra.dropdownClassName = s.searchDropdown; + extra.dropdownStyle = { + maxHeight: maxPopHeight, + }; + } + return (