一、代码实现
姓名: <Input v-model="name" placeholder="请输入" style="auto;" clearable @keyup.native="inputChange($event)" @keydown.native="inputChange($event)"/>
inputChange(e) { const o = e.target; o.value = o.value.replace(/[^u4E00-u9FA5]/g, ''); // 清除除了中文以外的输入的字符
this.name = o.value;
},