fix: fix default behavior for notMerge, close #691

This commit is contained in:
Justineo
2023-02-08 16:22:51 +08:00
parent 4313d301e4
commit 6159c7d684
5 changed files with 13 additions and 10 deletions

View File

@ -232,8 +232,11 @@ export default defineComponent({
if (!chart.value) {
init();
} else {
console.log(`notMerge: ${option !== oldOption}`);
chart.value.setOption(option, {
notMerge: option.value !== oldOption?.value,
// mutating `option` will lead to `notMerge: false` and
// replacing it with new reference will lead to `notMerge: true`
notMerge: option !== oldOption,
...realUpdateOptions.value
});
}