Merge pull request #159 from jake484/main

fix echarts
This commit is contained in:
Soybean 2022-12-02 01:53:19 +08:00 committed by GitHub
commit 091ca1a4fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,