fix param

This commit is contained in:
Qiuxia Fan 2022-03-26 21:21:06 +08:00
parent e95a4d6c41
commit 37aab6f41f
2 changed files with 3 additions and 4 deletions

View File

@ -125,7 +125,6 @@ function changeMetric(val: string) {
calculation: "",
...config[index],
};
console.log(currentConfig.value);
}
watch(
() => props.type,
@ -143,7 +142,6 @@ watch(
calculation: "",
...config[0],
};
console.log(config);
}
);
</script>

View File

@ -403,6 +403,7 @@ function updateSettings(config?: { [key: string]: MetricConfigOpt[] }) {
(d: any) => d.name && d.value && d.condition
);
const param = {
...dashboardStore.selectedGrid,
linkDashboard: states.linkDashboard,
nodeDashboard: isService
? items.filter((d: { scope: string; dashboard: string }) => d.dashboard)
@ -413,8 +414,8 @@ function updateSettings(config?: { [key: string]: MetricConfigOpt[] }) {
legend: metrics,
...config,
};
dashboardStore.selectWidget({ ...dashboardStore.selectedGrid, ...param });
dashboardStore.setConfigs({ ...dashboardStore.selectedGrid, ...param });
dashboardStore.selectWidget(param);
dashboardStore.setConfigs(param);
emit("update", param);
}
function updateLinkServerMetrics(options: Option[] | any) {