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

小程序循环遍历多个echart饼图在同一页,报错canvas_id in this page has already existed #97

Open
blackomilk opened this issue Aug 12, 2022 · 0 comments

Comments

@blackomilk
Copy link

业务场景为一个list里有多份数据,v-for循环遍历后把数据传给自己封装的组件


<mpvue-echarts
class="echart-pie"
id="main"
:ref="canvasId"
:echarts="echarts"
@onInit="initChart"
:canvasId="canvasId"
>


组件里再将每次传进来的canvasId 传给mpvue-echarts,但是每次都会报canvas_id in this page has already existed,id格式是pie_index,貌似是循环带来的问题,但是想不明白到底是哪

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

1 participant