From ba4641e12a9437d6ae9b3da091168771e61bed8b Mon Sep 17 00:00:00 2001 From: zhangwenshuai Date: Thu, 30 Jul 2020 10:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E4=B8=AD=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/base/edit/search/index.tsx | 14 ++++++++++---- .../component/base/edit/select/index.tsx | 14 ++++++++++---- .../base/extra/dataEntry/textSelect/index.tsx | 13 +++++++++---- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/components/apolloTable/component/base/edit/search/index.tsx b/components/apolloTable/component/base/edit/search/index.tsx index fe04005..a149f2a 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 03c8c7f..28f96dc 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 (