mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-17 23:50:52 +08:00
fix onVisible again (#2134)
This commit is contained in:
parent
193fa8e9d6
commit
151dc957a8
@ -9,7 +9,7 @@ title: 基本
|
|||||||
import { Tooltip } from 'antd';
|
import { Tooltip } from 'antd';
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<Tooltip title="提示文字" onVisibleChange={visible => console.log(visible)}>
|
<Tooltip title="提示文字">
|
||||||
<span>鼠标移上来就会出现提示</span>
|
<span>鼠标移上来就会出现提示</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
, mountNode);
|
, mountNode);
|
||||||
|
@ -78,14 +78,14 @@ export default class Tooltip extends React.Component {
|
|||||||
? `${children.props.className} ${openClassName}` : openClassName;
|
? `${children.props.className} ${openClassName}` : openClassName;
|
||||||
return (
|
return (
|
||||||
<RcTooltip
|
<RcTooltip
|
||||||
{...this.props}
|
|
||||||
transitionName={transitionName}
|
transitionName={transitionName}
|
||||||
builtinPlacements={placements}
|
builtinPlacements={placements}
|
||||||
overlay={title}
|
overlay={title}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
onVisibleChange={this.onVisibleChange}
|
|
||||||
onPopupAlign={this.onPopupAlign}
|
onPopupAlign={this.onPopupAlign}
|
||||||
ref="tooltip"
|
ref="tooltip"
|
||||||
|
{...this.props}
|
||||||
|
onVisibleChange={this.onVisibleChange}
|
||||||
>
|
>
|
||||||
{visible ? cloneElement(children, { className: childrenCls }) : children}
|
{visible ? cloneElement(children, { className: childrenCls }) : children}
|
||||||
</RcTooltip>
|
</RcTooltip>
|
||||||
|
Loading…
Reference in New Issue
Block a user