Skip to content

Commit 6159c7d

Browse files
committed
fix: fix default behavior for notMerge, close #691
1 parent 4313d30 commit 6159c7d

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.5.3
2+
3+
* Fixed default behavior for `notMerge` option (#691).
4+
15
## 6.5.2
26

37
* Added `dist/csp/*` to support strict CSP with extracted CSS file.

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,11 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
224224
<summary>Vue 3 <a href="https://stackblitz.com/edit/vue-echarts-vue-3-global?file=index.html">Demo →</a></summary>
225225

226226
<!-- vue3Scripts:start -->
227-
228227
```html
229228
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
230229
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
231-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
230+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3"></script>
232231
```
233-
234232
<!-- vue3Scripts:end -->
235233

236234
```js
@@ -246,13 +244,11 @@ app.component('v-chart', VueECharts)
246244
<summary>Vue 2 <a href="https://stackblitz.com/edit/vue-echarts-vue-2-global?file=index.html">Demo →</a></summary>
247245

248246
<!-- vue2Scripts:start -->
249-
250247
```html
251248
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
252249
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
253-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
250+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3"></script>
254251
```
255-
256252
<!-- vue2Scripts:end -->
257253

258254
```js

README.zh-Hans.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ import "echarts";
227227
```html
228228
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
229229
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
230-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
230+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3"></script>
231231
```
232232
<!-- vue3Scripts:end -->
233233

@@ -247,7 +247,7 @@ app.component('v-chart', VueECharts)
247247
```html
248248
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
249249
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
250-
<script src="https://cdn.jsdelivr.net/npm/[email protected].2"></script>
250+
<script src="https://cdn.jsdelivr.net/npm/[email protected].3"></script>
251251
```
252252
<!-- vue2Scripts:end -->
253253

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-echarts",
3-
"version": "6.5.2",
3+
"version": "6.5.3",
44
"description": "Vue.js component for Apache ECharts.",
55
"author": "GU Yiling <[email protected]>",
66
"scripts": {

src/ECharts.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,11 @@ export default defineComponent({
232232
if (!chart.value) {
233233
init();
234234
} else {
235+
console.log(`notMerge: ${option !== oldOption}`);
235236
chart.value.setOption(option, {
236-
notMerge: option.value !== oldOption?.value,
237+
// mutating `option` will lead to `notMerge: false` and
238+
// replacing it with new reference will lead to `notMerge: true`
239+
notMerge: option !== oldOption,
237240
...realUpdateOptions.value
238241
});
239242
}

0 commit comments

Comments
 (0)