Skip to content

Commit

Permalink
feat: 新增标签内文本溢出后,hover展示全部信息
Browse files Browse the repository at this point in the history
  • Loading branch information
F-jianchao authored and CheshireJCat committed Dec 4, 2024
1 parent 942005c commit 13f2aa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ exports[`1. Renderer:Picker base 2`] = `
class="cxd-Picker-values"
>
<div
class="cxd-Picker-value"
class="cxd-OverflowTpl cxd-Picker-value"
>
<span
class="cxd-Picker-valueIcon"
Expand Down
8 changes: 5 additions & 3 deletions packages/amis/src/renderers/Form/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
isIntegerInRange,
setThemeClassName
} from 'amis-core';
import {Html, Icon, TooltipWrapper} from 'amis-ui';
import {Html, Icon, OverflowTpl, TooltipWrapper} from 'amis-ui';
import {FormOptionsSchema, SchemaTpl} from '../../Schema';
import intersectionWith from 'lodash/intersectionWith';
import type {TooltipWrapperSchema} from '../TooltipWrapper';
Expand Down Expand Up @@ -543,7 +543,9 @@ export default class PickerControl extends React.PureComponent<
} = this.props;

return (
<div
<OverflowTpl
inline={false}
tooltip={getVariable(item, labelField || 'label')}
key={index}
className={cx(
`${ns}Picker-value`,
Expand Down Expand Up @@ -601,7 +603,7 @@ export default class PickerControl extends React.PureComponent<
}`
)}
</span>
</div>
</OverflowTpl>
);
}

Expand Down

0 comments on commit 13f2aa3

Please sign in to comment.