You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
{/** 手机号输入框 */}
<Input type='text' className='input' placeholder="手机号" value={mobile} onInput={this.handleMoble.bind(this)} />
// 手机号
handleMoble(event) {
let val = filterPhone(event.target.value)
this.setState({
mobile: val
})
return val
}
*/
const filterPhone = (tel) => {
var phone = String(tel).replace(/[^\d.]+/g, '').replace(/^+?86/g, '').substring(0, 11);
return phone;
}
Beta Was this translation helpful? Give feedback.
All reactions