mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: Action行为按钮组件修复 tooltip 部分属性配置不生效问题 (#3994)
Co-authored-by: ”jiatianqi“ <”jiatianqi@baidu.com“>
This commit is contained in:
parent
4b501dc52b
commit
4f35ec2a89
@ -827,8 +827,8 @@ export class Action extends React.Component<ActionProps, ActionState> {
|
||||
disabled={disabled}
|
||||
componentClass={isMenuItem ? 'a' : componentClass}
|
||||
overrideClassName={isMenuItem}
|
||||
tooltip={filterContents(tooltip, data)}
|
||||
disabledTip={filterContents(disabledTip, data)}
|
||||
tooltip={tooltip}
|
||||
disabledTip={disabledTip}
|
||||
tooltipPlacement={tooltipPlacement}
|
||||
tooltipContainer={tooltipContainer}
|
||||
tooltipTrigger={tooltipTrigger}
|
||||
|
@ -56,7 +56,7 @@ export function filterContents(
|
||||
tooltip:
|
||||
| string
|
||||
| undefined
|
||||
| {title?: string; render?: any; content?: string; body?: string},
|
||||
| {title?: string; children?: any; content?: string; body?: string},
|
||||
data: any
|
||||
) {
|
||||
if (typeof tooltip === 'string') {
|
||||
@ -64,7 +64,7 @@ export function filterContents(
|
||||
} else if (tooltip) {
|
||||
return tooltip.title
|
||||
? {
|
||||
render: tooltip.render ? () => tooltip.render(data) : undefined,
|
||||
children: tooltip?.children,
|
||||
title: filter(tooltip.title, data),
|
||||
content:
|
||||
tooltip.content || tooltip.body
|
||||
|
Loading…
Reference in New Issue
Block a user