uniapp输入空格

Posted J__F

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了uniapp输入空格相关的知识,希望对你有一定的参考价值。

uniapp   密码框输入空格(去除空格)的时候一直回显不及时  经过一番折腾 终于搞定

1.先赋值:     this.pwd = e.detail.value

2. 使用setTimeout(再次赋值 )

 setTimeout(() => { this.pwd = e.detail.value;this.pwd=this.pwd.replace(/s+/g,‘‘);}, 0)

以上是关于uniapp输入空格的主要内容,如果未能解决你的问题,请参考以下文章