天气窗口与执行约束 温度和速度显示
This commit is contained in:
@@ -159,6 +159,15 @@ export function getWeatherType(weatherText = "") {
|
||||
return "cloudy";
|
||||
}
|
||||
|
||||
export const fix2 = (val) => {
|
||||
if (val === null || val === undefined || isNaN(val)) return '-';
|
||||
return Number(val).toFixed(2);
|
||||
};
|
||||
|
||||
export const getVal = (val) => val == "no_rain" ? "无" : (val || '-');
|
||||
|
||||
|
||||
|
||||
// ==============================================
|
||||
// 通用导出表格为 CSV / Excel(通用版,不写死任何字段)
|
||||
// ==============================================
|
||||
|
||||
Reference in New Issue
Block a user