mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
refactor function
This commit is contained in:
parent
1f98d2bfa1
commit
7818a11aa5
@ -94,21 +94,7 @@ onMounted(async () => {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
function updateOptions() {
|
||||||
() => props.option,
|
|
||||||
(newVal, oldVal) => {
|
|
||||||
if (!available.value) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setOptions(newVal);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
watch(
|
|
||||||
() => props.filters,
|
|
||||||
() => {
|
|
||||||
const instance = getInstance();
|
const instance = getInstance();
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
return;
|
return;
|
||||||
@ -163,6 +149,24 @@ watch(
|
|||||||
seriesIndex: 0,
|
seriesIndex: 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.option,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
if (!available.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setOptions(newVal);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.filters,
|
||||||
|
() => {
|
||||||
|
updateOptions();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user