咏竹莉
where there is a will,there is a way

1. 输入框禁止输入中文

<el-input v-model.trim="modalForm.password" placeholder="******" @input="modalForm.password = modalForm.password.replace(/[\u4E00-\u9FA5]/g,'')"></el-input>

  

2.  输入框只能输入数字加字母

 
            <el-input class="witdth320" v-model.trim="dialogData.formData.model" placeholder="请输入产品型号" @input="dialogData.formData.model = dialogData.formData.model.replace(/[^\w\.\/]/ig,'')"></el-input>
 

 

posted on 2021-12-17 17:34  咏竹莉  阅读(727)  评论(0编辑  收藏  举报