fix: 修复卫星名称提取逻辑,增强类型安全性

This commit is contained in:
严浩
2025-03-12 14:32:16 +08:00
parent 92d795ba88
commit 4fba5091be

View File

@@ -22,7 +22,7 @@ interface SatelliteItem {
// 初始化卫星数据 // 初始化卫星数据
const satellites = ref<SatelliteItem[]>( const satellites = ref<SatelliteItem[]>(
tleList.map((tle) => { tleList.map((tle) => {
const name = tle.split('\n')[0].trim(); const name = (tle.split('\n') as [string, string, string])[0].trim();
return { return {
entity: null, entity: null,
name, name,