From c65af89bbd6b7eea143db8282f59035d01392d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Thu, 19 Sep 2024 02:13:06 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83=E5=8C=96?= =?UTF-8?q?=20update=20src/utils/index.ts.=20=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 程序员小墨 <2291200076@qq.com> --- src/utils/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 5415bf5..9a724e8 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -33,7 +33,11 @@ export const stringTrim = (text: string) => { return String(text).trim(); }; -// 过滤掉一下字符 -export function filterCharacter(str: string) { +/** + * 过滤掉以下字符 + * @param str + * @returns + */ +export function filterCharacter(str: string) { return str.replace(/[-_\\\/.·]/g, ' '); -} \ No newline at end of file +}; -- Gitee