我使用的是VUE但是都是相通的,因为都是使用replace来进行正则匹配
解决方法也简单,只要在var 添加 toString 方法
如:str.toString().replace()
str.toString()