fix: config

This commit is contained in:
Fine 2023-02-03 11:09:00 +08:00
parent 190d66268b
commit 70704bb232

View File

@ -80,11 +80,13 @@ limitations under the License. -->
tips: encodeURIComponent(dashboardStore.selectedGrid.widget.tips), tips: encodeURIComponent(dashboardStore.selectedGrid.widget.tips),
}; };
const metricConfig = (dashboardStore.selectedGrid.metricConfig || []).map((d: any) => { const metricConfig = (dashboardStore.selectedGrid.metricConfig || []).map((d: any) => {
return { if (d.label) {
...d, d.label = encodeURIComponent(d.label);
label: encodeURIComponent(d.label), }
unit: encodeURIComponent(d.unit), if (d.unit) {
}; d.unit = encodeURIComponent(d.unit);
}
return d;
}); });
const config = JSON.stringify({ const config = JSON.stringify({
type: dashboardStore.selectedGrid.type, type: dashboardStore.selectedGrid.type,