fix: update selector params and list graphs (#54)

This commit is contained in:
Fine0830
2022-04-02 12:09:02 +08:00
committed by GitHub
parent f57fdf9312
commit f19bcc856d
5 changed files with 33 additions and 14 deletions

View File

@@ -53,6 +53,9 @@ const available = computed(
(Array.isArray(props.option.series.data) && props.option.series.data[0])
);
onMounted(async () => {
if (!available.value) {
return;
}
await setOptions(props.option);
chartRef.value && addResizeListener(unref(chartRef), resize);
setTimeout(() => {
@@ -70,6 +73,9 @@ onMounted(async () => {
watch(
() => props.option,
(newVal, oldVal) => {
if (!available.value) {
return;
}
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
return;
}