antvis/G6

vue3 中使用内置的Tooltip无法消失 #5966

weiyuxiang0125 posted onGitHub

Describe the bug / 问题描述

版本: G6:4.8.21, vue:3.4.27 我设置的内置的tooltip,显示正确,但是移出节点的时候,Tooltip依旧显示,没有消失!在vue2中是正常的

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

4.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

modes: { default: [ { type: "tooltip", formatText(model) { var text = content; return text; }, shouldBegin(e) { return that.tooltipFlag; }, shouldUpdate() { return true; }, }, "drag-canvas", "zoom-canvas", ], },


目前没有收到更多 Vue3 用户的类似反馈,建议先进行自查

posted by Aarebecca 10 months ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

同样的问题,鼠标从节点移开,tooltip不关闭

posted by wuyadan 9 months ago

同样的问题,vue3,G6 4.8.21, tooltip不会消失

ToolTip

tooltip: new G6.Tooltip({ // offsetX: 10, // offsetY: 20, getContent(e) { const outDiv = document.createElement("div"); outDiv.style.maxWidth = "150px"; outDiv.innerHTML = ’e.item.getModel().title‘; return outDiv; }, itemTypes: ["node"], }),

graph

this.graph = new G6.Graph({ container: this.containerId, data: value, layout: { type: "force", preventOverlap: true, nodeSize: 32, unitRadius: 100, linkDistance: 100, }, defaultNode: { labelCfg: { style: { fill: "#fff", fontSize: 12, lineWidth: 0, }, }, }, defaultEdge: { size: 1, style: {}, labelCfg: { label: { label: false, }, }, }, nodeStateStyles: { highlight: { opacity: 0.1, }, }, edgeStateStyles: { highlight: { opacity: 0.1, }, }, plugins: [this.tooltip], modes: { default: ["drag-canvas", "zoom-canvas", "drag-node"], }, });

效果

https://github.com/user-attachments/assets/cfe9b385-6703-4664-a2da-6f20b254fb49

posted by zzj9468 4 months ago

Fund this Issue

$0.00
Funded

Pull requests