Merge pull request #13 from RickCole21/master

remark补充下delay配置项
This commit is contained in:
liaoxuezhi 2019-05-05 19:36:29 +08:00 committed by GitHub
commit 75fb596813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -98,12 +98,13 @@ export class TooltipWrapper extends React.Component<TooltipWrapperProps, Tooltip
}
handleShow() {
clearTimeout(this.timer);
const {
delay
} = this.props;
// clearTimeout(this.timer);
// const {
// delay
// } = this.props;
this.timer = setTimeout(this.show, delay);
// this.timer = setTimeout(this.show, delay);
this.show();
}
handleHide() {

View File

@ -57,6 +57,7 @@ export default class Remark extends React.Component<RemarkProps> {
rootClose={tooltip && tooltip.rootClose || rootClose}
trigger={tooltip && tooltip.trigger || trigger}
container={container}
delay={tooltip && tooltip.delay}
>
<div className={cx(`Remark`, tooltip && tooltip.className || className || `Remark--warning`)}>
<i className={cx('Remark-icon', tooltip && tooltip.icon || icon)} />