不能发送空白信息 方法一:把所有 空白字符 转为 空字符串 。 const str = " " const str2 = " cez " const isEmpty = str.replace(/\s/g, "") const isEmpty2 = str2.replace(/\s/g