Closed HHH-bot-code closed 1 week ago
The updateNodeData in the website example does not effect local vue project have effect
Could you please provide more details about your problem
Could you please provide more details about your problem Click no effect
There is a bug in the example, you can refer to the following code modification, we will fix it as soon as possible:
graph.on(NodeEvent.CLICK, (event) => {
const { target, originalTarget } = event;
console.log('click', originalTarget);
if (originalTarget.className === 'light') { // use className
graph.updateNodeData([{ id: target.id, states: ['selected'], style: { labelText: 'Clicked!' } }]);
graph.draw();
}
});
Describe the bug / 问题描述
The updateNodeData in the website example does not take effect without using updateNodeData in local vue projects
Reproduction link / 重现链接
https://g6.antv.antgroup.com/examples/behavior/inner-event/#basic
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
🆕 5.x
Operating System / 操作系统
Windows
Browser / 浏览器
Chrome
Additional context / 补充说明
No response