mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-06-19 14:52:00 +08:00
【优化】中文判断
This commit is contained in:
parent
8f6e6fdb54
commit
d974124918
@ -9,5 +9,5 @@
|
|||||||
|
|
||||||
/** 判断字符串是否包含中文 */
|
/** 判断字符串是否包含中文 */
|
||||||
export const hasChinese = async (str) => {
|
export const hasChinese = async (str) => {
|
||||||
return /[\u4E00-\u9FA5]+/g.test(str)
|
return /[\u4e00-\u9fa5]/.test(str)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user