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

我在动态改变line的name时lengend会不停的增加? #8

Open
xiatianshitiancai opened this issue Sep 23, 2022 · 2 comments
Open

Comments

@xiatianshitiancai
Copy link

代码示例如下
https://codesandbox.io/s/vuecharts3-connect-demo-forked-93n9si?file=/src/App.vue

@lloydzhou
Copy link
Owner

  1. 这里确实实现上针对循环渲染组件的时候,对key的处理不是很妥当。
  2. 这个库在实现的时候,也是考虑到调用setOption这个函数的时候,不是很好处理。所以对每一个抽象的组件都定义了一个id,以达到去重的逻辑。

所以,你的这个demo,可以考虑给组件加上id(id避免使用0),我测试了,给了id之后表现是正常的

image

@lloydzhou
Copy link
Owner

image

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