//去除首尾空格
this.usernmae.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
//全部空格
this.usernmae.replace(/\s+/g,"");