From 17b6c77b1357e0458dafee93df5556e800aada88 Mon Sep 17 00:00:00 2001 From: plainheart Date: Fri, 26 Sep 2025 13:51:42 +0800 Subject: [PATCH] fix(core): mark echarts instance object as raw in Vue (resolves #21267 and more similar issues) --- src/core/echarts.ts | 3 + test/echarts-in-vue.html | 325 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 328 insertions(+) create mode 100644 test/echarts-in-vue.html diff --git a/src/core/echarts.ts b/src/core/echarts.ts index b37012ae37..89f810088b 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -437,6 +437,9 @@ class ECharts extends Eventful { opts = opts || {}; + // mark the echarts instance as raw in Vue 3 to prevent the object being converted to be a proxy. + (this as any).__v_skip = true; + this._dom = dom; let defaultRenderer = 'canvas'; diff --git a/test/echarts-in-vue.html b/test/echarts-in-vue.html new file mode 100644 index 0000000000..0f0b49eaf4 --- /dev/null +++ b/test/echarts-in-vue.html @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +