Skip to content

Commit d974124

Browse files
committed
【优化】中文判断
1 parent 8f6e6fd commit d974124

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/views/ai/utils/common-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99

1010
/** 判断字符串是否包含中文 */
1111
export const hasChinese = async (str) => {
12-
return /[\u4E00-\u9FA5]+/g.test(str)
12+
return /[\u4e00-\u9fa5]/.test(str)
1313
}

0 commit comments

Comments
 (0)