fix: fix updateOptions

This commit is contained in:
Justineo
2021-03-29 19:51:21 +08:00
parent 289a0b59dc
commit 23eba11c8f

View File

@ -160,10 +160,7 @@ export default defineComponent({
if (!chart.value) {
init(option);
} else {
chart.value.setOption(option, {
...realUpdateOptions.value,
...updateOptions
});
chart.value.setOption(option, updateOptions || {});
}
}
@ -193,7 +190,7 @@ export default defineComponent({
if (!chart.value) {
init();
} else {
chart.value.setOption(option, props.updateOptions);
chart.value.setOption(option, realUpdateOptions.value);
}
},
{ deep: true }