element inputフォームの入力禁止

529 ワード

1.ページ使用@keyupメソッド

     
    
 

2.メソッド実行の置き換え
inputChange(type){
          if(type=='account'){
            this.form.account=this.form.account.replace(/([\u4e00-\u9fa5])|(\s)|[^\d\w]/g, '');
          }else{
            this.form.mobile=this.form.mobile.replace(/[^\d]/g,'');
          }
      },