diff --git a/src/utils/index.ts b/src/utils/index.ts index 5415bf50ece9e2a60ff7348f21f8977a87f03c5c..9a724e844b7b7d790c2976c3b2df4fa998ce6839 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 +};