The echats data view click event is nested, and the number of executions of the internal click event will accumulate.

Use echarts to create a data linkage, generate carbon emission data for the climate region according to the selected year, and then click the climate region to generate the corresponding airport carbon emission data.

I started to use click nesting and found that as long as the outer click event is executed once, the inner ajax will be executed multiple times.

 

 

Use the unbind event, but it does not support writing like this, and the off event is used again, and it is found that an error is reported. Finally, one is used to bind, so that the internal click event can not be executed repeatedly.

 

 Last update once, clear once.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324687295&siteId=291194637