d3.js与vue交互问题
ZhitaoTian opened this issue · comments
ZhitaoTian commented
你好,我想请教你一个d3.js与vue交互的问题。
我想在d3.js点击事件发生后修改vue中data的数据,但是一直没有找到方法。
祝好,万分感谢!
草帽lufei commented
可以在对 d3 的点击事件中调用 vue 的函数,可以参考这个例子
d3 点击事件
https://github.com/gywgithub/vue-d3-examples/blob/master/src/components/TreeVIII.vue#L383
调用的 vue 函数
https://github.com/gywgithub/vue-d3-examples/blob/master/src/components/TreeVIII.vue#L337