<el-input size="small" v-model="city" placeholder=" Please enter city name "
@blur="addCity(scope.$index)" @keyup.native="btKeyUp"
@keydown.native="btKeyDown" ></el-input> // methods within // Only Chinese characters can be input , english , number
btKeyDown(e) { e.target.value =
e.target.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g,""); }, // Restrict input of special characters
btKeyUp(e) { e.target.value =
e.target.value.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】,;‘’,.]/g,"");
}
stay el-input  within   use keyup Events, etc   Need to add .native    Otherwise, the event cannot be executed normally

Here is Only numbers can be entered
<el-input size="small" v-model="scope.row.order_number"
v-show="scope.row.isShowInp_order" @blur="editOrder(scope.$index,scope.row)"
v-focus @keyup.native="UpNumber" @keydown.native="UpNumber" class="table_input"
></el-input> // Only numbers can be entered UpNumber(e) { e.target.value =
e.target.value.replace(/[^\d]/g,""); }
 

 

 

 

Technology