input的type=‘number’和type=‘digit’都不好使,还是能输入字母
mobileInput:
function
(e) {
var
mobile = e.detail.value.replace(/[^\d]/g,
''
)
this
.setData({
mobile: mobile
})
return
mobile
}