diff --git a/components/apolloTable/component/base/extra/associationSearch/index.tsx b/components/apolloTable/component/base/extra/associationSearch/index.tsx index 6f4bb945f7246bac40ee1cfe0097ca9a42051382..20ef2793726877d55eb743ec80ad8ec17dc2c5bc 100644 --- a/components/apolloTable/component/base/extra/associationSearch/index.tsx +++ b/components/apolloTable/component/base/extra/associationSearch/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Spin, Select } from 'antd'; +import {Spin, Select, Tooltip} from 'antd'; import lodash from 'lodash'; import { Consumer } from '../../../context'; @@ -17,6 +17,7 @@ interface Props { value: any; label: string; }; + showTooltip?: boolean; } enum Loaded { @@ -229,7 +230,7 @@ class AssociationSearch extends React.Component { render() { const { data, value } = this.state; - const { selfCom, autoFocus, onChange, ...rest } = this.props; + const { selfCom, autoFocus, onChange, showTooltip, ...rest } = this.props; return ( {({ locale }: any) => { @@ -249,7 +250,13 @@ class AssociationSearch extends React.Component { {data.map((d: any) => { return ( - {d.label} + {showTooltip ? ( + + {d.label} + + ) : ( + d.label + )} ); })}