let a = this.nsrsbh =this.nsrsbh.replace(/(^\s*)|(\s*$)/g,"")
左边是处理完以后的 ,let a= 也就是a这个变量才是处理过的
结果是,页面上写空格不会再出现报错的情况了