From 5bad1f397dc07b2381cd0b84ab72fd95796f2590 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Mon, 15 Jan 2024 19:24:22 +0800 Subject: [PATCH] fix: capitalizeFirst error --- src/utils/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/common.js b/src/utils/common.js index 552efee26..7b10e40a1 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -417,7 +417,7 @@ export function formatFileSize(bytes) { export function capitalizeFirst(string) { if (!string) return string - return string.split(' ').map(item => { + return string.trim().split(' ').map(item => { return item[0].toUpperCase() + item.slice(1) }).join(' ') }