2021-06-08
vue的element ui中输入框中去除空格
在输入框中使用:
οnkeyup=“this.value=this.value.replace(/[, ]/g,’’)”
就可以将输入框中的空格去除掉
<input type="text" v-model="searchname" class="input-text-search fl" placeholder="请输入产品名称" onkeyup="this.value=this.value.replace(/[, ]/g,'')"/>
...
原创
2021-06-08 14:41:15 ·
108 阅读 ·
0 评论