fix: set different scope for topN metrics (#40)

This commit is contained in:
Fine0830
2022-03-27 14:36:35 +08:00
committed by GitHub
parent c00d5d2a05
commit d733594804
4 changed files with 47 additions and 8 deletions

View File

@@ -106,11 +106,12 @@ const getMetricConfig = computed(() => {
});
function changeConfigs(param: { [key: string]: string }) {
const metricConfig = getMetricConfig.value;
const metricConfig = getMetricConfig.value || [];
metricConfig[currentIndex.value] = {
...metricConfig[currentIndex.value],
...param,
};
currentConfig.value = metricConfig[currentIndex.value];
emit("update", { [props.type]: metricConfig });
}
function changeMetric(val: string) {