fix echarts

This commit is contained in:
Jingyi Yang 2022-12-01 17:37:24 +08:00
parent bb8af263e1
commit 9cec6a31a5

View File

@ -98,6 +98,7 @@ export function useEcharts(
function update(updateOptions: ECOption) {
if (isRendered()) {
chart?.clear();
chart!.setOption({ ...updateOptions, backgroundColor: 'transparent' });
}
}
@ -145,7 +146,7 @@ export function useEcharts(
const stopOptionWatch = watch(options, newValue => {
update(newValue);
});
}, { deep: true });
const stopDarkModeWatch = watch(
() => theme.darkMode,