mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-14 19:23:28 +08:00
fix: make watch source correct
This commit is contained in:
@ -104,15 +104,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const { autoresize, manualUpdate, loading, loadingOptions } = toRefs(props);
|
||||||
theme,
|
|
||||||
initOptions,
|
|
||||||
group,
|
|
||||||
autoresize,
|
|
||||||
manualUpdate,
|
|
||||||
loading,
|
|
||||||
loadingOptions
|
|
||||||
} = toRefs(props);
|
|
||||||
let unwatchOption: (() => void) | null = null;
|
let unwatchOption: (() => void) | null = null;
|
||||||
watch(
|
watch(
|
||||||
manualUpdate,
|
manualUpdate,
|
||||||
@ -151,16 +143,22 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
watch([theme, initOptions], () => {
|
watch(
|
||||||
cleanup();
|
[() => props.theme, () => props.initOptions],
|
||||||
init();
|
() => {
|
||||||
});
|
cleanup();
|
||||||
|
init();
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => group,
|
() => props.group,
|
||||||
group => {
|
group => {
|
||||||
if (group && group.value && chart.value) {
|
if (group && chart.value) {
|
||||||
chart.value.group = group.value;
|
chart.value.group = group;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user