remark补充下delay属性

This commit is contained in:
rickcole 2019-05-05 18:59:54 +08:00
parent 179858deb2
commit 31156b3c96
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)} />