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