input添加@input事件
this.name为input绑定的data值
//限制只能输入汉字
onKeyNameInput: function(event){
var value = event.detail.value;
if(!value || value == " "){
return '';
}
const rule = /[^\u4E00-\u9FA5]/g;
this.$nextTick(function () {
this.name = value.replace(rule,'');
})
},