延迟显示的数字调整为整数 #10

This commit is contained in:
heixiansen
2025-04-25 18:18:13 +08:00
parent ced035dc36
commit 88f06fbeba
5 changed files with 11 additions and 6 deletions
+6 -1
View File
@@ -54,7 +54,11 @@
prop="lat_ms"
width="100"
label="延迟/ms"
></ElTableColumn>
>
<template #default="{ row }">
{{ row.lat_ms && !isNaN(Number(row.lat_ms)) ? Number(row.lat_ms).toFixed(0) : row.lat_ms || "-" }}
</template>
</ElTableColumn>
<ElTableColumn
sortable
width="100"
@@ -108,6 +112,7 @@
import { ATJ, parseCliInfo } from "@/utils";
import { ElConfirmDanger } from "~/utils/element";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { isNaN } from "lodash-es";
// enum NatType {
// // has NAT; but own a single public IP, port is not changed
// Unknown = 0;