Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3.js与vue交互问题 #8

Closed
ZhitaoTian opened this issue Oct 8, 2021 · 1 comment
Closed

d3.js与vue交互问题 #8

ZhitaoTian opened this issue Oct 8, 2021 · 1 comment

Comments

@ZhitaoTian
Copy link

你好,我想请教你一个d3.js与vue交互的问题。
我想在d3.js点击事件发生后修改vue中data的数据,但是一直没有找到方法。
祝好,万分感谢!

@gywgithub
Copy link
Owner

可以在对 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants