node.js
{string} event 发送事件名称
{number} data 发送事件数据
this.emit('butterflyNode', { data: nodeInfo, ele, ele });
vue 监听
canvas.on('butterflyNode', (data: any) => {
console.log('此处逻辑处理 发送ajax---nodeInfo为节点信息');
console.log(data);
});
本文介绍如何在Vue应用中使用node.js发送'butterflyNode'事件,并展示在Vue组件中监听并处理该事件,从而进行数据操作和Ajax通信。
node.js
{string} event 发送事件名称
{number} data 发送事件数据
this.emit('butterflyNode', { data: nodeInfo, ele, ele });
vue 监听
canvas.on('butterflyNode', (data: any) => {
console.log('此处逻辑处理 发送ajax---nodeInfo为节点信息');
console.log(data);
});

被折叠的 条评论
为什么被折叠?