mirror of
https://github.com/VisActor/VTable
synced 2024-11-22 01:52:03 +00:00
docs: supplement showTooltip api description
This commit is contained in:
parent
aaa03b6351
commit
25e1b32e72
@ -790,6 +790,8 @@ Show tooltip information prompt box
|
||||
|
||||
Note: For the time being, it only supports setting tooltip.renderMode='html' globally, and calling this interface is valid
|
||||
|
||||
If you want the tooltip to be hover by the mouse, you need to configure the interface tooltip.disappearDelay so that it does not disappear immediately.
|
||||
|
||||
Where the TooltipOptions type is:
|
||||
|
||||
```
|
||||
@ -816,6 +818,8 @@ export type TooltipOptions = {
|
||||
padding?: number[];
|
||||
arrowMark?: boolean;
|
||||
};
|
||||
/** set tooltip's vanishing time */
|
||||
disappearDelay?: number;
|
||||
};
|
||||
|
||||
```
|
||||
|
@ -785,7 +785,9 @@ enum HierarchyState {
|
||||
showTooltip(col: number, row: number, tooltipOptions?: TooltipOptions) => void
|
||||
```
|
||||
|
||||
注意:暂时只支持全局设置了 tooltip.renderMode='html',调用该接口才有效
|
||||
注意:暂时只支持全局设置了 tooltip.renderMode='html',调用该接口才有效。
|
||||
|
||||
如果想要 tooltip 可以被鼠标 hover 上去,需要配置接口 tooltip.disappearDelay,让其不立即消失。
|
||||
|
||||
其中 TooltipOptions 类型为:
|
||||
|
||||
@ -813,6 +815,8 @@ export type TooltipOptions = {
|
||||
padding?: number[];
|
||||
arrowMark?: boolean;
|
||||
};
|
||||
/** 设置tooltip的消失时间 */
|
||||
disappearDelay?: number;
|
||||
};
|
||||
|
||||
```
|
||||
|
@ -111,6 +111,7 @@ The interface showTooltip can actively display tooltip information, which is use
|
||||
font: 'normal bold normal 14px/1 STKaiti',
|
||||
arrowMark: true,
|
||||
},
|
||||
disappearDelay: 100,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -99,7 +99,7 @@ const tableInstance = new VTable.ListTable({
|
||||
## 通过接口显示 tooltip 自定义信息
|
||||
|
||||
接口 showTooltip 可主动显示 tooltip 信息,如下使用方式:(监听单元格 hover 事件,调用接口)
|
||||
[参考接口说明](https://visactor.io/vtable/option/Methods#showTooltip)
|
||||
[参考接口说明](../api/Methods#showTooltip)
|
||||
|
||||
```
|
||||
tableInstance.on('mouseenter_cell', (args) => {
|
||||
@ -116,6 +116,7 @@ const tableInstance = new VTable.ListTable({
|
||||
font: 'normal bold normal 14px/1 STKaiti',
|
||||
arrowMark: true,
|
||||
},
|
||||
disappearDelay: 100,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user