From 4aaae263a6c728eaa2a3f45a1ae36082619b52a0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 25 五月 2026 17:32:01 +0800
Subject: [PATCH] 宝东 1.小数点后四位修改
---
src/components/AIChatSidebar/index.vue | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/components/AIChatSidebar/index.vue b/src/components/AIChatSidebar/index.vue
index 6d724de..fe7775d 100644
--- a/src/components/AIChatSidebar/index.vue
+++ b/src/components/AIChatSidebar/index.vue
@@ -1951,8 +1951,8 @@
const bytes = Number(size)
if (!Number.isFinite(bytes) || bytes <= 0) return '0 B'
if (bytes < 1024) return `${bytes} B`
- if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1).replace(/\.0$/, '')} KB`
- return `${(bytes / (1024 * 1024)).toFixed(1).replace(/\.0$/, '')} MB`
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(4).replace(/\.0$/, '')} KB`
+ return `${(bytes / (1024 * 1024)).toFixed(4).replace(/\.0$/, '')} MB`
}
const createLocalFileSnapshot = (file, index = 0) => {
@@ -2585,7 +2585,7 @@
const formatCompactNumber = (value) => {
const amount = Number(value) || 0
if (Math.abs(amount) >= 10000) {
- return `${(amount / 10000).toFixed(2).replace(/\.?0+$/, '')}\u4e07`
+ return `${(amount / 10000).toFixed(4).replace(/\.?0+$/, '')}\u4e07`
}
return amount.toLocaleString('zh-CN', { maximumFractionDigits: 2 })
}
--
Gitblit v1.9.3