Commit c7ea261f by 李伟康

```

fix(earlyWarningManager): 修复历史目标组件中的空值处理问题

- 修改 HistoryTarget.vue 中的数据访问逻辑,添加空值检查避免 undefined 错误
- 将数组索引访问结果与 null 进行默认值处理
- 更新条件判断逻辑,使用 val != null 替代 val 简单判断以正确处理 0 值情况
```
1 parent bee4390a
...@@ -98,8 +98,8 @@ export default { ...@@ -98,8 +98,8 @@ export default {
2: 'batteryPenetrationRate', 2: 'batteryPenetrationRate',
3: 'ewLtPenetrationRate' 3: 'ewLtPenetrationRate'
}[this.index] }[this.index]
] ] || null
return val ? val + '%' : '-' return val != null ? val + '%' : '-'
} }
}, },
{ {
...@@ -113,8 +113,8 @@ export default { ...@@ -113,8 +113,8 @@ export default {
2: 'batteryConversionRate', 2: 'batteryConversionRate',
3: 'ewLtConRate' 3: 'ewLtConRate'
}[this.index] }[this.index]
] ] || null
return val ? val + '%' : '-' return val != null ? val + '%' : '-'
} }
}, },
] ]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!