设备监控loading问题anotherName字段空判断

This commit is contained in:
zhujiyan
2024-09-24 14:14:31 +08:00
parent 5bfa895744
commit c2c0306a95

View File

@@ -151,7 +151,7 @@ const init = () => {
type: 'line', type: 'line',
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
name: item[0].anotherName name: item[0]?.anotherName
} }
}) })
}, },
@@ -174,7 +174,7 @@ const init = () => {
}, },
legend: { legend: {
data: res.data.map((item: any[]) => { data: res.data.map((item: any[]) => {
return item[0].anotherName return item[0]?.anotherName
}) })
}, },
yAxis: { yAxis: {